/* ==========================================================================
   ABCENANCE - Luxury Editorial Lookbook Component
   Top-Right Floating Trigger + Prada Photo Stream Animation
   Instagram Vertical Reel / Feed Experience (Mobile First)
   ========================================================================== */

/* 1. Floating Trigger under Shopping Cart (Top Right) */
.lookbook-floating-trigger {
    position: fixed;
    top: 96px;
    right: 24px;
    z-index: 48;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .lookbook-floating-trigger {
        top: 84px;
        right: 14px;
    }
}

/* Prada-Style Stream Track (Editorial square photo cards floating left-to-right into button) */
.lookbook-stream-track {
    position: absolute;
    right: calc(100% - 10px);
    top: 50%;
    transform: translateY(-50%);
    width: 140px;
    height: 38px;
    display: flex;
    align-items: center;
    pointer-events: none;
    margin-right: 0;
    overflow: visible;
    transition: opacity 0.4s ease;
}

.lookbook-stream-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 42px;
    height: 42px;
    border-radius: 4px;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    background: #141414;
    opacity: 0;
    transform: translateY(-50%) translateX(-80px) scale(0.65);
    will-change: transform, opacity;
}

.lookbook-stream-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Prada Stream Keyframes: move left to right, then scale down & dissolve into the button */
@keyframes pradaStreamFlow {
    0% {
        opacity: 0;
        transform: translateY(-50%) translateX(-75px) scale(0.7) rotate(-8deg);
    }
    18% {
        opacity: 1;
        transform: translateY(-50%) translateX(-30px) scale(1) rotate(0deg);
    }
    68% {
        opacity: 0.95;
        transform: translateY(-50%) translateX(65px) scale(0.9) rotate(5deg);
    }
    92% {
        opacity: 0.3;
        transform: translateY(-50%) translateX(115px) scale(0.35) rotate(10deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-50%) translateX(130px) scale(0.1) rotate(14deg);
    }
}

.lookbook-stream-thumb.thumb-1 {
    animation: pradaStreamFlow 1.7s cubic-bezier(0.25, 1, 0.4, 1) 0.3s forwards;
}

.lookbook-stream-thumb.thumb-2 {
    animation: pradaStreamFlow 1.7s cubic-bezier(0.25, 1, 0.4, 1) 0.85s forwards;
}

.lookbook-stream-thumb.thumb-3 {
    animation: pradaStreamFlow 1.7s cubic-bezier(0.25, 1, 0.4, 1) 1.4s forwards;
}

/* Main Pill Button */
.lookbook-pill-btn {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 38px;
    padding: 0 16px 0 13px;
    border-radius: 9999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #111111;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

/* Absorb pulse when thumbnails enter button */
@keyframes pradaButtonAbsorb {
    0% { transform: scale(1); }
    35% { transform: scale(1.08); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22); }
    100% { transform: scale(1); }
}

.lookbook-pill-btn.is-absorbing {
    animation: pradaButtonAbsorb 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.lookbook-pill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.lookbook-pill-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
    fill: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lookbook-pill-icon svg circle:last-of-type {
    fill: currentColor;
}

.lookbook-pill-text {
    line-height: 1;
}

.lookbook-pill-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    min-width: 22px;
    padding: 0 6px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    font-size: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 500;
    line-height: 1;
    transition: background 0.3s ease;
}

.lookbook-pill-btn:hover {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.lookbook-pill-btn:hover .lookbook-pill-icon svg {
    transform: scale(1.15);
}

.lookbook-pill-btn:hover .lookbook-pill-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* 2. Fullscreen Modal Backdrop */
.lookbook-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(8, 8, 8, 0.96);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
    display: flex;
    flex-direction: column;
}

.lookbook-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lookbook-modal-window {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* 3. Modal Header with Horizontal White Logo */
.lookbook-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: rgba(14, 14, 14, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 20;
}

.lookbook-header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

@media (min-width: 861px) {
    .lookbook-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .lookbook-header-top-row {
        display: contents;
    }
    .lookbook-brand {
        order: 1;
    }
    .lookbook-filters {
        order: 2;
    }
    .lookbook-header-actions {
        order: 3;
    }
}

.lookbook-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.lookbook-brand-logo {
    height: 16px;
    width: auto;
    max-width: 125px;
    display: block;
    object-fit: contain;
}

.lookbook-brand-sep {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.25);
}

.lookbook-brand-sub {
    font-size: 11px;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.lookbook-count-tag {
    font-size: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
    border-radius: 9999px;
}

/* Filters */
.lookbook-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px 0;
}

.lookbook-filters::-webkit-scrollbar {
    display: none;
}

.lookbook-filter-btn {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 13px;
    border-radius: 9999px;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lookbook-filter-btn:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

.lookbook-filter-btn.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.2);
}

/* Header Actions */
.lookbook-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.lookbook-toggle-view-btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lookbook-toggle-view-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
}

.lookbook-close-btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.lookbook-close-icon {
    width: 12px;
    height: 12px;
    stroke: currentColor;
}

.lookbook-close-btn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

/* Responsive Mobile Header Tweaks */
@media (max-width: 860px) {
    .lookbook-header {
        padding: 8px 14px 6px 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .lookbook-brand-sep,
    .lookbook-brand-sub,
    .lookbook-count-tag {
        display: none !important; /* Hide count and sub on mobile as requested */
    }
    .lookbook-brand-logo {
        height: 14px;
        max-width: 105px;
    }
    .lookbook-header-actions {
        gap: 6px;
    }
    .lookbook-toggle-view-btn {
        padding: 5px 11px;
        font-size: 10px;
    }
    .lookbook-close-btn {
        padding: 5px 11px;
        font-size: 10px;
    }
    .lookbook-close-text {
        display: none; /* Only show ✕ on mobile for minimal height */
    }
    .lookbook-filters {
        width: 100%;
        padding-bottom: 2px;
        gap: 6px;
    }
    .lookbook-filter-btn {
        padding: 4px 10px;
        font-size: 10px;
    }
    .lookbook-feed-view {
        height: calc(100vh - 78px);
    }
    .lookbook-feed-item {
        height: calc(100vh - 78px);
    }
}

/* 4. Grid Scroll View */
.lookbook-grid-view {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 24px 24px 64px 24px;
    display: block;
}

.lookbook-grid-view.is-hidden {
    display: none !important;
}

.lookbook-masonry {
    column-count: 4;
    column-gap: 20px;
    width: 100%;
    margin: 0 auto;
}

@media (max-width: 1300px) {
    .lookbook-masonry {
        column-count: 3;
        column-gap: 16px;
    }
}

@media (max-width: 860px) {
    .lookbook-masonry {
        column-count: 2;
        column-gap: 10px;
    }
    .lookbook-grid-view {
        padding: 12px 10px 40px 10px;
    }
}

/* Masonry Card */
.lookbook-card {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 20px;
    display: inline-block;
    width: 100%;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: #141414;
    cursor: pointer;
    transform: translateZ(0);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s ease;
}

.lookbook-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.25);
}

.lookbook-card.is-hidden {
    display: none !important;
}

.lookbook-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
    background: #181818;
}

.lookbook-card:hover img {
    transform: scale(1.035);
    filter: brightness(1.04);
}

.lookbook-card-tags {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    pointer-events: none;
}

.lookbook-card-tag {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 3px 7px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    text-transform: uppercase;
}

.lookbook-footer-note {
    text-align: center;
    padding: 40px 0 20px 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ==========================================================================
   5. INSTAGRAM VERTICAL REEL / FEED VIEW (Mobile-First Up/Down Scroller)
   ========================================================================== */
.lookbook-feed-view {
    flex: 1 1 auto;
    height: calc(100vh - 65px);
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    display: none;
    background: #000000;
    position: relative;
}

.lookbook-feed-view.is-active {
    display: block !important;
}

/* Individual Post Slide (100vh snap, centered like Instagram Reels) */
.lookbook-feed-item {
    position: relative;
    width: 100%;
    height: calc(100vh - 65px);
    min-height: 500px;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000000;
}

.lookbook-feed-item.is-hidden {
    display: none !important;
}

/* Blurred Ambient Glow Background */
.lookbook-feed-ambient {
    position: absolute;
    inset: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    object-fit: cover;
    filter: blur(50px) brightness(0.28);
    opacity: 0.75;
    pointer-events: none;
    transform: scale(1.15);
}

/* Main Feed Photo */
.lookbook-feed-media {
    position: relative;
    z-index: 2;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85);
}

/* Instagram Bottom Overlay Meta Info */
.lookbook-feed-meta {
    position: absolute;
    bottom: 24px;
    left: 20px;
    right: 20px;
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.lookbook-feed-caption-wrap {
    max-width: 80%;
    background: rgba(15, 15, 15, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.lookbook-feed-title {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.lookbook-feed-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.lookbook-feed-tag {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 2px 7px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    text-transform: uppercase;
}

.lookbook-feed-counter {
    background: rgba(15, 15, 15, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* Feed Up/Down Navigation Hints */
.lookbook-feed-nav-arrows {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lookbook-feed-arrow-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(20, 20, 20, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lookbook-feed-arrow-btn:hover {
    background: #ffffff;
    color: #000000;
    transform: scale(1.08);
}

@media (max-width: 768px) {
    .lookbook-feed-nav-arrows {
        display: none;
    }
    .lookbook-feed-meta {
        bottom: 16px;
        left: 12px;
        right: 12px;
    }
    .lookbook-feed-title {
        font-size: 11px;
    }
    .lookbook-feed-caption-wrap {
        padding: 8px 12px;
    }
}
