/* ============================================================
   RIVET & WELD — LOOKBOOK PAGE
   lookbook.css
   ============================================================ */

.rw-lookbook-page {
    background: var(--rw-black);
}

/* ── Hero ────────────────────────────────────────────────── */
.rw-lookbook-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--rw-charcoal);
}

.rw-lookbook-hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 75% 50%, rgba(196,80,26,0.09) 0%, transparent 65%),
        repeating-linear-gradient(
            135deg,
            transparent,
            transparent 40px,
            rgba(240,228,196,0.018) 40px,
            rgba(240,228,196,0.018) 41px
        );
}

.rw-lookbook-hero__content {
    position: relative;
    z-index: 2;
    padding: 72px 48px 56px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    animation: lbFadeUp 0.7s ease both;
}

@keyframes lbFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rw-lookbook-hero__title {
    font-family: 'Bebas Neue', sans-serif !important;
    font-size: clamp(72px, 13vw, 172px) !important;
    line-height: 0.88 !important;
    letter-spacing: 0.02em !important;
    color: var(--rw-cream) !important;
    margin: 10px 0 0 !important;
}

.rw-lookbook-hero__title span {
    color: var(--rw-rust);
}

.rw-lookbook-hero__sub {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--rw-cream-dim);
    margin: 14px 0 0;
}

.rw-lookbook-hero__stripe {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rw-rust), var(--rw-brass), var(--rw-rust));
    background-size: 200%;
    animation: lbStripe 4s ease infinite;
    z-index: 3;
}

@keyframes lbStripe {
    0%, 100% { background-position: 0%; }
    50%       { background-position: 100%; }
}

/* ── Grid Body ───────────────────────────────────────────── */
.rw-lookbook-body {
    padding: 2px 0 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ── Base cell styles ────────────────────────────────────── */
.rw-lb-cell {
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: var(--rw-charcoal);
}

.rw-lb-cell__inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.rw-lb-cell__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.rw-lb-cell:hover .rw-lb-cell__img {
    transform: scale(1.04);
}

.rw-lb-cell__overlay {
    position: absolute;
    inset: 0;
    background: rgba(14, 12, 10, 0);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 16px 20px;
    transition: background 0.25s;
}

.rw-lb-cell:hover .rw-lb-cell__overlay {
    background: rgba(14, 12, 10, 0.45);
}

.rw-lb-cell__caption {
    font-family: 'Special Elite', monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--rw-cream);
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.25s;
}

.rw-lb-cell__expand {
    color: var(--rw-cream);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.25s;
    margin-left: auto;
}

.rw-lb-cell:hover .rw-lb-cell__caption,
.rw-lb-cell:hover .rw-lb-cell__expand {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ============================================================
   LAYOUT 0 — Hero left (2/3) + stack right (2 cells)
   ============================================================ */
.rw-lb-row--0 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 480px 320px;
    gap: 2px;
}

.rw-lb-row--0 .rw-lb-cell--0 {
    grid-row: 1 / 3;
}

.rw-lb-row--0 .rw-lb-cell--1 { grid-column: 2; grid-row: 1; }
.rw-lb-row--0 .rw-lb-cell--2 { grid-column: 2; grid-row: 2; }

/* hide extras beyond 3 */
.rw-lb-row--0 .rw-lb-cell--3,
.rw-lb-row--0 .rw-lb-cell--4 { display: none; }

/* ============================================================
   LAYOUT 1 — 3 equal columns, tall
   ============================================================ */
.rw-lb-row--1 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 560px;
    gap: 2px;
}

.rw-lb-row--1 .rw-lb-cell--3,
.rw-lb-row--1 .rw-lb-cell--4 { display: none; }

/* ============================================================
   LAYOUT 2 — 5 cell mosaic: banner top, 4 below
   ============================================================ */
.rw-lb-row--2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 380px 380px;
    gap: 2px;
}

.rw-lb-row--2 .rw-lb-cell--0 {
    grid-column: 1 / 3;
    grid-row: 1;
}

.rw-lb-row--2 .rw-lb-cell--1 {
    grid-column: 3 / 5;
    grid-row: 1;
}

.rw-lb-row--2 .rw-lb-cell--2 { grid-column: 1; grid-row: 2; }
.rw-lb-row--2 .rw-lb-cell--3 { grid-column: 2; grid-row: 2; }
.rw-lb-row--2 .rw-lb-cell--4 { grid-column: 3 / 5; grid-row: 2; }

/* ============================================================
   LAYOUT 3 — stack left (2 cells) + hero right (2/3)
   ============================================================ */
.rw-lb-row--3 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-rows: 400px 400px;
    gap: 2px;
}

.rw-lb-row--3 .rw-lb-cell--0 { grid-column: 1; grid-row: 1; }
.rw-lb-row--3 .rw-lb-cell--1 { grid-column: 1; grid-row: 2; }
.rw-lb-row--3 .rw-lb-cell--2 { grid-column: 2; grid-row: 1 / 3; }

.rw-lb-row--3 .rw-lb-cell--3,
.rw-lb-row--3 .rw-lb-cell--4 { display: none; }

/* ── Empty State ─────────────────────────────────────────── */
.rw-lookbook-empty {
    background: var(--rw-black);
    padding: 80px 48px;
}

.rw-lookbook-empty__inner {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.rw-lookbook-empty__inner h2 {
    margin: 8px 0 16px;
}

.rw-lookbook-empty__inner > p {
    color: var(--rw-cream-dim);
    margin-bottom: 40px;
}

.rw-lookbook-empty__steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
    text-align: left;
}

.rw-lookbook-empty__step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px 24px;
    background: var(--rw-charcoal);
    border: 1px solid var(--rw-rule);
    border-left: 3px solid var(--rw-rust);
}

.rw-lookbook-empty__num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px;
    color: var(--rw-rust);
    opacity: 0.6;
    line-height: 1;
    flex-shrink: 0;
}

.rw-lookbook-empty__step p {
    font-size: 15px;
    color: var(--rw-cream-dim);
    margin: 0;
    padding-top: 4px;
}

.rw-lookbook-empty__step strong {
    color: var(--rw-cream);
    font-family: 'Special Elite', monospace;
    font-size: 13px;
    letter-spacing: 0.08em;
}

/* ── Shop CTA ────────────────────────────────────────────── */
.rw-lookbook-cta {
    background: var(--rw-charcoal);
    border-top: 3px solid var(--rw-rust);
    padding: 80px 48px;
    text-align: center;
}

.rw-lookbook-cta__inner {
    max-width: 480px;
    margin: 0 auto;
}

.rw-lookbook-cta__inner .rw-eyebrow {
    margin-bottom: 10px;
}

.rw-lookbook-cta__title {
    font-family: 'Bebas Neue', sans-serif !important;
    font-size: clamp(48px, 7vw, 80px) !important;
    line-height: 1 !important;
    color: var(--rw-cream) !important;
    margin: 0 0 14px !important;
}

.rw-lookbook-cta__sub {
    font-family: 'Crimson Pro', serif;
    font-size: 18px;
    color: var(--rw-cream-dim);
    margin-bottom: 32px;
}

/* ── Lightbox ────────────────────────────────────────────── */
.rw-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.rw-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 7, 0.96);
    cursor: pointer;
}

.rw-lightbox__stage {
    position: relative;
    z-index: 1;
    max-width: calc(100vw - 120px);
    max-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rw-lightbox__img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 80px);
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s;
}

.rw-lightbox__img.is-loaded {
    opacity: 1;
}

.rw-lightbox__close {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 2;
    background: transparent;
    border: none;
    color: rgba(240,228,196,0.5);
    font-size: 32px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: color 0.18s;
}

.rw-lightbox__close:hover { color: var(--rw-cream); }

.rw-lightbox__prev,
.rw-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(20,18,16,0.7);
    border: 1px solid rgba(240,228,196,0.15);
    color: var(--rw-cream-dim);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s;
}

.rw-lightbox__prev { left: 20px; }
.rw-lightbox__next { right: 20px; }

.rw-lightbox__prev:hover,
.rw-lightbox__next:hover {
    background: var(--rw-rust);
    border-color: var(--rw-rust);
    color: var(--rw-cream);
}

.rw-lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Special Elite', monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(240,228,196,0.4);
    z-index: 2;
    white-space: nowrap;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .rw-lb-row--0 { grid-template-rows: 380px 260px; }
    .rw-lb-row--1 { grid-template-rows: 440px; }
    .rw-lb-row--2 { grid-template-rows: 300px 300px; }
    .rw-lb-row--3 { grid-template-rows: 320px 320px; }
}

@media (max-width: 768px) {
    .rw-lookbook-hero__content { padding: 56px 24px 44px; }
    .rw-lookbook-cta            { padding: 64px 24px; }
    .rw-lookbook-empty          { padding: 64px 24px; }

    /* All layouts collapse to 2-column stacks on mobile */
    .rw-lb-row--0,
    .rw-lb-row--1,
    .rw-lb-row--2,
    .rw-lb-row--3 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto !important;
    }

    .rw-lb-row--0 .rw-lb-cell,
    .rw-lb-row--1 .rw-lb-cell,
    .rw-lb-row--2 .rw-lb-cell,
    .rw-lb-row--3 .rw-lb-cell {
        display: block !important;
        grid-column: auto !important;
        grid-row: auto !important;
        aspect-ratio: 1 / 1;
    }

    .rw-lightbox__stage {
        max-width: calc(100vw - 40px);
    }

    .rw-lightbox__prev { left: 8px; }
    .rw-lightbox__next { right: 8px; }
}

@media (max-width: 480px) {
    .rw-lb-row--0,
    .rw-lb-row--1,
    .rw-lb-row--2,
    .rw-lb-row--3 {
        grid-template-columns: 1fr;
    }
}
