/* =========================================================
   ASENRA · Album Lightbox (wireframe layout)
   Header (logo) + Sidebar (slide-item list) + Main preview + Footer
   Class names: album-wrapper, album-header, album-logo,
                album-sidebar, slide-item, main-preview, album-footer
   ========================================================= */
.alb-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(28, 22, 17, .55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    opacity: 0;
    transition: opacity .3s ease;
    user-select: none;
    touch-action: pan-y;
    overscroll-behavior: contain;
    padding: clamp(12px, 3vw, 32px);
}
.alb-overlay.is-open { display: flex; opacity: 1; align-items: center; justify-content: center; animation: albFade .3s ease; }
@keyframes albFade { from { opacity: 0; } to { opacity: 1; } }
body.alb-locked { overflow: hidden; }

/* ============================================================
   ALBUM WRAPPER
   ============================================================ */
.album-wrapper {
    --albm-radius: 14px;
    --albm-line:   rgba(28, 22, 17, .12);
    --albm-paper:  #ffffff;
    --albm-soft:   #fbf7ec;
    --albm-text:   #1c1611;
    --albm-mute:   #6e6149;
    --albm-accent: #2f5d3a;

    width: 100%;
    max-width: 1240px;
    height: min(86vh, 820px);
    background: var(--albm-paper);
    border-radius: var(--albm-radius);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
    color: var(--albm-text);
    position: relative;
    animation: albPanelIn .35s cubic-bezier(.2, .8, .2, 1);
}
@keyframes albPanelIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
[data-theme="dark"] .album-wrapper {
    --albm-paper: #1b1610;
    --albm-soft:  #16120c;
    --albm-text:  #f4ebd3;
    --albm-mute:  #a8946a;
    --albm-line:  rgba(216, 176, 106, .18);
    --albm-accent:#62b27a;
}

/* ============================================================
   1. HEADER
   ============================================================ */
.album-header {
    position: relative;
    height: clamp(110px, 13vw, 140px);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0 clamp(14px, 2vw, 22px);
    border-bottom: 1px solid var(--albm-line);
    background: var(--albm-paper);
}
.album-corner {
    width: 44px; height: 44px;
    border-radius: 10px;
    border: 1px solid var(--albm-line);
    background: var(--albm-soft);
    color: var(--albm-text);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.album-corner svg { width: 20px; height: 20px; }
.album-corner:hover {
    background: var(--albm-accent);
    border-color: var(--albm-accent);
    color: #fff;
    transform: translateY(-1px);
}
.album-corner--right:hover { background: #b34141; border-color: #b34141; }

.album-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.album-logo-img {
    height: clamp(80px, 10vw, 110px);
    width: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(28, 22, 17, .14));
}

/* ============================================================
   2. BODY  (sidebar + main preview)
   ============================================================ */
.album-body {
    display: grid;
    grid-template-columns: minmax(220px, 25%) 1fr;
    min-height: 0;
}

/* ============================================================
   3. SIDEBAR
   ============================================================ */
.album-sidebar {
    border-right: 1px solid var(--albm-line);
    background: var(--albm-soft);
    overflow: hidden;
    display: flex; flex-direction: column;
}
.album-sidebar__list {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding: 4px 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--albm-line) transparent;
}
.album-sidebar__list::-webkit-scrollbar { width: 6px; }
.album-sidebar__list::-webkit-scrollbar-thumb { background: var(--albm-line); border-radius: 3px; }
.album-sidebar__list::-webkit-scrollbar-track { background: transparent; }

.slide-item {
    width: 100%;
    min-height: 96px;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--albm-line);
    transition: background .2s ease;
    position: relative;
}
.slide-item:last-child { border-bottom: 0; }
.slide-item:hover { background: rgba(47, 93, 58, .05); }
[data-theme="dark"] .slide-item:hover { background: rgba(98, 178, 122, .08); }
.slide-item.is-active {
    background: rgba(47, 93, 58, .10);
}
[data-theme="dark"] .slide-item.is-active { background: rgba(98, 178, 122, .14); }
.slide-item.is-active::before {
    content: "";
    position: absolute;
    left: 0; top: 14px; bottom: 14px;
    width: 3px;
    background: var(--albm-accent);
    border-radius: 0 3px 3px 0;
}

.slide-item__icon {
    flex: 0 0 auto;
    width: 64px; height: 64px;
    border-radius: 8px;
    background: var(--albm-paper);
    border: 1px solid var(--albm-line);
    overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
}
.slide-item__icon img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.slide-item__text {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
    gap: 6px;
}
.slide-item__title {
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--albm-text);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.slide-item__line {
    display: block;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--albm-line), transparent);
    width: 80%;
}
.slide-item__sub {
    font-size: 11.5px;
    color: var(--albm-mute);
    letter-spacing: .04em;
    text-transform: uppercase;
    font-weight: 500;
}

/* ============================================================
   4. MAIN PREVIEW
   ============================================================ */
.main-preview {
    position: relative;
    background: var(--albm-paper);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.main-preview__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--albm-mute);
    background: var(--albm-paper);
    transition: opacity .3s ease;
    pointer-events: none;
    z-index: 1;
}
.main-preview__placeholder.is-hidden { opacity: 0; }
.main-preview__icon {
    width: 96px; height: 96px;
    color: var(--albm-line);
}
.main-preview__icon svg { width: 100%; height: 100%; }
.main-preview__label {
    font-size: 12px;
    letter-spacing: .3em;
    color: var(--albm-mute);
    font-weight: 600;
}

.alb-img {
    position: relative;
    z-index: 2;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    background: var(--albm-paper);
    opacity: 0;
    transition: opacity .25s ease, transform .35s ease;
    cursor: zoom-in;
}
.alb-img.is-loaded { opacity: 1; }
.alb-img.is-zoom { cursor: zoom-out; max-width: none; max-height: none; }

.alb-loader {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 40px; height: 40px;
    border: 3px solid var(--albm-line);
    border-top-color: var(--albm-accent);
    border-radius: 50%;
    animation: alb-spin 1s linear infinite;
    display: none;
    z-index: 3;
}
.alb-overlay.is-loading .alb-loader { display: block; }
@keyframes alb-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.alb-caption {
    position: absolute;
    left: 50%; bottom: 18px;
    transform: translateX(-50%);
    background: rgba(28, 22, 17, .78);
    color: #fbf7ec;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12.5px;
    max-width: calc(100% - 40px);
    text-align: center;
    z-index: 4;
    font-weight: 500;
    letter-spacing: .02em;
}

/* ============================================================
   5. FOOTER
   ============================================================ */
.album-footer {
    height: clamp(64px, 7vw, 78px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 clamp(14px, 2vw, 22px);
    background: var(--albm-soft);
    border-top: 1px solid var(--albm-line);
}
.album-footer__counter {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 16px;
    color: var(--albm-text);
    letter-spacing: .1em;
}
.album-footer__counter .alb-i { font-weight: 700; color: var(--albm-accent); }
.album-footer__sep { margin: 0 4px; color: var(--albm-mute); }

.album-footer__nav {
    display: flex;
    align-items: center;
    gap: 8px;
}
.album-footer__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--albm-line);
    background: var(--albm-paper);
    color: var(--albm-text);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.album-footer__btn svg { width: 16px; height: 16px; }
.album-footer__btn:hover {
    background: var(--albm-accent);
    border-color: var(--albm-accent);
    color: #fff;
    transform: translateY(-1px);
}
.album-footer__btn--zoom { width: 42px; padding: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .alb-overlay { padding: 0; }
    .album-wrapper {
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
    }
    .album-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    .album-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--albm-line);
        max-height: 110px;
    }
    .album-sidebar__list {
        display: flex;
        flex-direction: row;
        gap: 0;
        padding: 8px 8px;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .slide-item {
        flex: 0 0 auto;
        min-height: 0;
        width: 200px;
        padding: 10px 12px;
        border-bottom: 0;
        border-right: 1px solid var(--albm-line);
        gap: 10px;
    }
    .slide-item:last-child { border-right: 0; }
    .slide-item.is-active::before {
        left: 8px; right: 8px; top: auto; bottom: 0;
        width: auto; height: 3px;
        border-radius: 3px 3px 0 0;
    }
    .slide-item__icon { width: 52px; height: 52px; }
    .slide-item__title { -webkit-line-clamp: 1; font-size: 13px; }
    .album-header { height: 88px; }
    .album-logo-img { height: 64px; }
    .album-corner { width: 40px; height: 40px; }
    .album-footer__btn span { display: none; }
    .album-footer__btn { padding: 0; width: 42px; }
}
@media (max-width: 520px) {
    .album-footer { padding: 0 10px; gap: 10px; }
    .album-footer__counter { font-size: 14px; }
    .alb-caption { font-size: 11.5px; padding: 6px 12px; bottom: 10px; }
}
