/* ══════════════════════════════════════════════════════════════
   Creative Soul Streetstyle — Lightbox Premium
   ══════════════════════════════════════════════════════════════ */

.cs-ss-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s ease;
}

.cs-ss-lightbox.cs-ss-lb-visible {
    opacity: 1;
}

.cs-ss-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

.cs-ss-lightbox-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 40px;
}

.cs-ss-lightbox-canvas {
    position: relative;
    background: transparent;
    padding: 16px;
    max-width: calc(100vw - 120px);
    max-height: calc(100vh - 100px);
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .3s ease, opacity .2s ease, background .2s ease;
    opacity: 0;
}

.cs-ss-lightbox-canvas img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 180px);
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.cs-ss-lightbox.cs-ss-image-ready .cs-ss-lightbox-canvas {
    background: #fff;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
    opacity: 1;
}

/* ── Controls ───────────────────────────────────────────────── */

.cs-ss-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 10;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s;
    border-radius: 0;
}

.cs-ss-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}

.cs-ss-lightbox-prev,
.cs-ss-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s;
    border-radius: 0;
}

.cs-ss-lightbox-prev { left: 16px; }
.cs-ss-lightbox-next { right: 16px; }

.cs-ss-lightbox-prev:hover,
.cs-ss-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
}

.cs-ss-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    letter-spacing: 1px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}



.cs-ss-lightbox-look {
    position: absolute;
    bottom: 20px;
    left: 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    letter-spacing: 1px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-transform: uppercase;
    display: none;
}

.cs-ss-lightbox-credit {
    position: absolute;
    bottom: 20px;
    right: 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    letter-spacing: 1px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-transform: uppercase;
    display: none;
}

/* ── Mobile ─────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .cs-ss-lightbox-container {
        padding: 16px;
    }

    .cs-ss-lightbox-canvas {
        padding: 8px;
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 80px);
    }

    .cs-ss-lightbox-canvas img {
        max-height: calc(100vh - 96px);
    }

    .cs-ss-lightbox-prev,
    .cs-ss-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }

    .cs-ss-lightbox-prev { left: 4px; }
    .cs-ss-lightbox-next { right: 4px; }

    .cs-ss-lightbox-close {
        top: 8px;
        right: 8px;
        width: 38px;
        height: 38px;
    }
}


/* Meta bar (filtros del item) */
.cs-ss-lightbox-meta{
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 140px);
    padding: 10px 14px;
    background: rgba(0,0,0,.82);
    color: #fff;
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    border-radius: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 3;
    pointer-events: none;
}

/* Ajuste móvil */
@media (max-width: 600px){
    .cs-ss-lightbox-meta{
        top: 14px;
        max-width: calc(100% - 30px);
        padding: 9px 12px;
        font-size: 11px;
        letter-spacing: .10em;
    }
}


/* ── Under-photo metadata (Look + Credit) ─────────────────── */

.cs-ss-lightbox-frame{
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
}

.cs-ss-lightbox-under{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin-top: 10px;
    padding: 0 2px 2px;
}

.cs-ss-lightbox-look,
.cs-ss-lightbox-credit{
    position: static;
    display: none;
    margin: 0;
    padding: 0;
    color: rgba(0,0,0,.78);
    font-size: 12px;
    letter-spacing: .12em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 48%;
}

.cs-ss-lightbox-look{
    text-align: left;
}

.cs-ss-lightbox-credit{
    text-align: right;
}

@media (max-width: 600px){
    .cs-ss-lightbox-under{
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .cs-ss-lightbox-look,
    .cs-ss-lightbox-credit{
        max-width: 100%;
        white-space: normal;
    }
    .cs-ss-lightbox-credit{
        text-align: left;
    }
}


/* Under-photo space: ensures Look/Foto are visible within viewport */
.cs-ss-lightbox-frame{ padding-bottom: 2px; }


/* Override: ensure under-photo meta is visible (white bar under the photo within the same width) */
.cs-ss-lightbox-under{
    background: #fff;
    padding: 10px 12px 12px;
    margin-top: 0;
    border-top: 1px solid rgba(0,0,0,.08);
}
.cs-ss-lightbox-look,
.cs-ss-lightbox-credit{
    color: rgba(0,0,0,.78);
}
