html {
    scroll-behavior: smooth;
}

/* --- Typography (Your Preferred Styles) --- */
.mrs-eaves {
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: clamp(34px, 6vw, 60px); /* Fluid scaling for luxury headers */
    margin: 20px 0;
    font-weight: 300;
}

.dm-eyebrow {
    color: #B8A686; /* Muted Gold from your reference */
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 14px;
    display: block;
    margin-bottom: 25px;
}

/* --- Layout Structure --- */

/* --- Desktop Logic (matches image_477822.jpg) --- */

.hero-header-section {
    height: 100vh;
    background-size: cover;
    display: flex;
    align-items: center;
    padding-left: 6%;
    margin-top: 70px;
}

.hero-info-box {
    background-color: rgba(32, 35, 31, 0.89);
    padding: 90px 60px;
    max-width: 550px;
    border: 1px solid #B8A686; /* Gold frame from your UI */
    position: relative;
    text-align: center;
}

.hero-info-box::after {
    content: '';
    position: absolute;
    top: 15px; left: 15px; right: 15px; bottom: 15px;
    border: 1px solid rgba(184, 166, 134, 0.3); /* Inner trim */
    pointer-events: none;
}

.mobile-tagline-area, .m-label { display: none; }

/* Adjusting internal spacing for the box */
.hero-info-box .collection-logo {
    max-width: 200px;
    margin-bottom: 10px;
    position: relative;
    z-index: 2; /* Ensures content stays above the trim */
}

.collection-logo-mobile {
    display: none;
}

.hero-info-box .mrs-eaves {
    font-size: 30px;
    color: #ffffff;
    margin-bottom: 35px;
    line-height: 1.2;
    position: relative;
    z-index: 2;
}

.hero-info-box .dm-btn-outline {
    position: relative;
    z-index: 2;
}

/* --- Centered Footer Logo in Box --- */
.company-logo-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(184, 166, 134, 0.2); /* Faint gold separator */
}

.shifman-footer-logo {
    max-width: 200px;
    height: auto;
}


/* --- Button Styling --- */
.dm-btn-outline {
    display: inline-block;
    padding: 12px 28px;
    border: 1px solid #B8A686;
    background-color: #2C1011;
    color: #B8A686;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 11px; /* Slightly smaller button text */
    text-decoration: none;
    transition: 0.3s ease;
}

.dm-btn-outline:hover {
    background-color: #B8A686;
    color: #2C1011;
}

.hero-content-wrap {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 900px;
    padding: 0 20px;
}

/* Section 2: Cinematic Story & Video (Dark Panel) */
.cinematic-story-section {
    background-color: #241F1E; /* Matches your header/brand color */
    padding: 60px 0;
    text-align: center;
    color: #ffffff;
    scroll-margin-top: 95px;
}

.editorial-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 300;
    line-height: 1.15;
    margin: 0 0 35px 0;
}

.editorial-title.two-line {
    display: flex;
    flex-direction: column; /* Forces the vertical stack */
    align-items: center;    /* Keeps everything centered */
    line-height: 1.1;
}

.title-main {
    display: block;
    margin-bottom: 5px; /* Space between the two lines */
}

.title-sub {
    display: block;
    font-size: 0.6em;   /* Slightly smaller than the main title for hierarchy */
    font-style: italic;  /* Adds that premium Bloomingdale's touch */
    opacity: 0.9;
}

.story-text-wrap {
    max-width: 800px;
    margin: 0 auto 60px;
}

.story-text-wrap .mrs-eaves {
    line-height: 1;
}

.shifman-hero-caption {
    font-family: 'Montserrat', serif;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 50px;
}

/* --- Interactive Elements --- */

.video-frame-container {
    max-width: 1000px; /* Slightly wider for the cinematic feel you liked */
    margin: 0 auto 60px;
    width: 90%;
}

.video-frame-container iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    box-shadow: 0 40px 100px rgba(0,0,0,0.6); /* Deeper shadow for luxury depth */
}

.mobile-label {
    display: none;
}

/* TABLET OPTIMIZATION */
@media screen and (min-width: 820px) and (max-width: 1024px) {
    .hero-header-section {
        /* Align the flex children to the top and left */
        display: flex;
        align-items: flex-start; 
        justify-content: flex-start;
        
        /* Control exactly how far from the edges the box "hangs" */
        padding-top: 113px; 
        padding-left: 5%; 
        
        /* Ensure height allows the mattress image to show behind it */
        height: 53vh; 
        margin-top: 50px;
    }

    .hero-info-box {
        /* Scaling the box down slightly for tablet real estate */
        max-width: 450px;
        padding: calc(40px + (60 - 40) * ((100vw - 820px) / (1024 - 820)));
        background-color: rgba(32, 35, 31, 0.89);
        border: 1px solid #B8A686;
    }

    .shifman-footer-logo {
        max-width: 232px;
        height: auto;
    }

    .cinematic-story-section {
        scroll-margin-top: 80px;
    }
}

/* --- Mobile Specific Fixes --- */
@media (max-width: 768px) {
    .hero-header-section {
        height: 127vw;
        background-position: 80% center; /* Focus on mattress/rug */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 80px;
        position: relative;
        margin-top: 85px;
    }

    .collection-logo {
        max-width: 170px;
        margin-bottom: 25px;
    }

    .collection-logo-mobile {
        max-width: 140px;
        left: 25px;
        top: 55px;
        display: block;
        position: absolute;
    }

    .hero-info-box {
        display: none;
    }

    /* Hide the tagline inside the box for mobile */
    .desktop-only-tagline {
        display: none;
    }

    /* Move the independent tagline to the rug area */
    .mobile-tagline-area {
        display: block;
        position: absolute;
        bottom: 40px; /* Anchors it to the bottom rug area */
        left: 0;
        width: 100%;
        padding: 0 20px;
        text-align: center;
        z-index: 10;
    }

    .mobile-tagline-area .mrs-eaves {
        font-size: 28px !important;
        color: #ffffff;
        line-height: 1.2;
        text-shadow: 0 2px 15px rgba(0,0,0,0.7); /* Ensures readability against rug patterns */
        margin: 0;
    }

    /* Button Label Toggle */
    .d-label { display: none; }
    .m-label { display: inline; }
    
    .company-logo-footer {
        margin-top: 20px;
        border-top: 1px solid rgba(184, 166, 134, 0.2);
        padding-top: 20px;
    }

    .cinematic-story-section {
        padding: 60px 29px;
    }
}

/* --- Desktop Specific (Ensures tagline stays IN the box) --- */
@media (min-width: 769px) {
    .mobile-tagline-area {
        display: none;
    }
    .desktop-only-tagline {
        display: block;
    }
    .d-label { display: inline; }
    .m-label { display: none; }
}

/* Lineup Style */
/* --- 1. THE CONTROL PANEL --- */
:root {
    /* Theme Colors from product-base.css */
    --lineup-bg: #f9f7f2;       /* Updated to var(--shifman-cream) */
    --lineup-border: #8c7662;   /* Updated to var(--shifman-taupe) */
    --lineup-mahogany: #7c534e; /* Added for accents */

    --boda-pos: center; /* Shifts focal point to the right as requested */
    --after-pos: center;
    --champ-pos: center;

    --text-y-mobile: 80%; 
    --title-size-mobile: 22px;
}

@media (min-width: 1025px) {
    :root {
        --boda-pos: center;
        --after-pos: center;
        --champ-pos: center;
        --text-y-desktop: 90%;
        --boda-text-l: 60px;
        --after-text-l: 65px;
        --champ-text-l: 65px;
        --title-size: 32px;
    }
}

/* --- 2. CORE LAYOUT (Shared/Mobile) --- */

.lineup-1893-locked {
    background-color: var(--lineup-bg);
    padding: 80px 20px;
}

/* CENTERED TITLES */
.lineup-section-title {
    font-family: 'Cormorant Garamond', serif; /* Match section-title style */
    color: var(--lineup-border);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 1.6rem;
    margin-bottom: 25px;
}

.lineup-section-title, 
.lineup-tagline {
    text-align: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.lineup-tagline {
    font-family: 'Montserrat', sans-serif; /* Match desc-body style */
    color: var(--lineup-mahogany);
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 40px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.lineup-outer-frame {
    background-color: #ffffff;
    border: 1px solid var(--lineup-border);
    width: 100%; max-width: 1400px; margin: 0 auto;
    padding: 20px; box-sizing: border-box;
}

.lineup-mosaic-grid {
    display: flex; flex-direction: column; gap: 15px; width: 100%;
}

.mosaic-tile {
    display: block;
    position: relative;
    width: 100%;
    height: 350px; 
    overflow: hidden;
    text-decoration: none;
}

.lineup-item-inner {
    width: 100%; height: 100%;
    background-size: cover;
    position: relative;
}

/* IMAGE FOCAL POINTS */
#tile-bodaciousness .lineup-item-inner { background-position: var(--boda-pos); }
#tile-afternoonified .lineup-item-inner { background-position: var(--after-pos); }
#tile-champagne .lineup-item-inner { background-position: var(--champ-pos); }

/* MOBILE OVERLAY */
.tile-overlay {
    position: absolute;
    top: var(--text-y-mobile);
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    z-index: 10;
}

.product-name {
    font-family: 'Montserrat', serif;
    color: #ffffff; text-transform: uppercase;
    font-size: var(--title-size-mobile);
    letter-spacing: 0.1em;
    text-shadow: 2px 2px 12px rgba(0,0,0,0.8);
}

/* --- 3. DESKTOP GRID OVERRIDE (1025px+) --- */
@media (min-width: 1025px) {
    .lineup-1893-locked {
        height: 100vh;
        display: block; /* Change from flex to block to stop vertical centering */
        padding: 60px 20px;
    }
    
    .lineup-outer-frame {
        height: auto; /* Let content dictate height or use 90vh */
        min-height: 80vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Force content to the top */
    }

    .lineup-mosaic-grid {
        display: grid; 
        grid-template-columns: 1fr 1fr; 
        grid-template-rows: 1fr 1fr;
        flex-grow: 1; 
        gap: 25px;
        align-items: start; /* CRITICAL: Aligns both columns to start at the top */
        margin-top: 20px;
    }

    .hero-tile { 
        grid-row: span 2; 
        height: 100%; /* Forces hero to stretch to bottom of second row */
    }
    
    .mosaic-tile { height: 100%; }

    /* RESET MOBILE CENTERING */
    .tile-overlay {
        top: var(--text-y-desktop);
        left: 0;
        transform: translateY(-50%);
        text-align: left;
        width: 100%;
    }

    /* APPLY DESKTOP NUDGES */
    #tile-bodaciousness .tile-overlay { padding-left: var(--boda-text-l); transform: translateY(-84%); }
    #tile-afternoonified .tile-overlay { padding-left: var(--after-text-l); }
    #tile-champagne .tile-overlay { padding-left: var(--champ-text-l); }

    .product-name { font-size: var(--title-size); }
}

/* --- 4. TABLET OVERRIDE --- */
@media (min-width: 768px) and (max-width: 1024px) {
    .tile-overlay {
        top: 90% !important;
        transform: translate(-50%, -50%);
        left: 50%;
    }
}