/* ============================================
   MPP Jewellers - Collection Lightbox
   B.C.Sen-style fullscreen product gallery
   ============================================ */

body.clb-lock {
    overflow: hidden;
}

.clb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 9, 7, 0.96);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}
.clb-overlay.clb-open {
    opacity: 1;
    visibility: visible;
}

/* Top bar */
.clb-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 22px;
    z-index: 3;
    background: linear-gradient(180deg, rgba(0,0,0,0.55), transparent);
}
.clb-title {
    font-family: 'Cinzel', serif;
    color: #d4b96a;
    font-size: 1.05rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.clb-counter {
    color: rgba(240, 236, 228, 0.7);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
}
.clb-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(212, 185, 106, 0.4);
    background: rgba(0, 0, 0, 0.35);
    color: #d4b96a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s, transform 0.2s;
    flex-shrink: 0;
}
.clb-close:hover {
    background: rgba(212, 185, 106, 0.18);
    transform: rotate(90deg);
}
.clb-close svg { width: 20px; height: 20px; }

/* Stage & image */
.clb-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 76px 90px 130px;
    box-sizing: border-box;
}
.clb-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: scale(0.985);
    transition: opacity 0.3s ease, transform 0.3s ease;
    user-select: none;
}
.clb-image.clb-loaded {
    opacity: 1;
    transform: scale(1);
}

/* Spinner */
.clb-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border-radius: 50%;
    border: 3px solid rgba(212, 185, 106, 0.2);
    border-top-color: #d4b96a;
    animation: clbSpin 0.9s linear infinite;
}
@keyframes clbSpin { to { transform: rotate(360deg); } }

/* Arrows */
.clb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid rgba(212, 185, 106, 0.45);
    background: rgba(0, 0, 0, 0.4);
    color: #d4b96a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background 0.25s, border-color 0.25s, transform 0.2s;
}
.clb-arrow:hover {
    background: rgba(212, 185, 106, 0.22);
    border-color: #d4b96a;
    transform: translateY(-50%) scale(1.06);
}
.clb-arrow svg { width: 26px; height: 26px; }
.clb-prev { left: 22px; }
.clb-next { right: 22px; }

/* Caption bar */
.clb-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 26px 22px;
    background: linear-gradient(0deg, rgba(0,0,0,0.72), transparent);
    z-index: 3;
}
.clb-name {
    font-family: 'Cinzel', serif;
    color: #f0ece4;
    font-size: 1.15rem;
    margin: 0 0 4px;
    letter-spacing: 1px;
}
.clb-meta {
    color: rgba(240, 236, 228, 0.65);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.8px;
    margin: 0;
}
.clb-caption-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.clb-view-btn,
.clb-archive-btn {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 26px;
    transition: all 0.25s;
    white-space: nowrap;
}
.clb-view-btn {
    background: linear-gradient(135deg, #a68a3e, #c9a84c);
    color: #14110a;
    font-weight: 600;
}
.clb-view-btn:hover { filter: brightness(1.12); }
.clb-archive-btn {
    border: 1px solid rgba(212, 185, 106, 0.5);
    color: #d4b96a;
    background: transparent;
}
.clb-archive-btn:hover {
    background: rgba(212, 185, 106, 0.14);
}

/* Loading state on the clicked link */
.clb-loading-link {
    opacity: 0.55;
    pointer-events: none;
    cursor: progress;
}

/* Mobile */
@media (max-width: 640px) {
    .clb-stage { padding: 66px 12px 150px; }
    .clb-arrow { width: 44px; height: 44px; }
    .clb-prev { left: 8px; }
    .clb-next { right: 8px; }
    .clb-title { font-size: 0.85rem; }
    .clb-name { font-size: 0.95rem; }
    .clb-caption { padding: 12px 14px 16px; }
    .clb-view-btn, .clb-archive-btn { padding: 8px 14px; font-size: 0.66rem; }
}
