html {
    scroll-behavior: smooth;
}

/* Container setup */
.hero-section {
    height: 100vh;
    min-height: 700px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding-left: 5% !important; /* Positions the box to the left as seen in the image */
}

/* The Box */
.hero-card {
    background-color: rgba(144, 140, 123, 0.85); /* Accurate Taupe */
    color: #ffffff;
    padding: 25px;
    width: 100%;
    max-width: 402px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero-card-inner-border {
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 58px 31px;
    text-align: center;
}

/* Typography */
.hero-headline {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.4;
}

/* Logo Styling */

.collection-logo {
    max-width: 280px; /* Adjust based on your logo's dimensions */
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Button */
.hero-btn {
    display: inline-block;
    background-color: #7c534e; /* The specific brownish-red button color */
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.hero-btn:hover {
    background-color: #5a3c39;
    transform: translateY(-1px);
}

/* --- Hide Mobile Content on Desktop --- */
.mobile-hero-content { display: none; }

/* --- Mobile Logic (768px and below) --- */
@media (max-width: 768px) {
    .hero-section {
        height: 85vh; 
        min-height: 550px;
        background-position: 53% center;
        padding: 0; /* Remove desktop side padding */
        position: relative;
    }

    /* 1. Hide the Desktop Box */
    .hero-card { display: none !important; }

    /* 2. Show the Mobile Overlay */
    .mobile-hero-content {
        display: flex;
        flex-direction: column;
        justify-content: space-between; /* Pushes content to top and bottom */
        width: 100%;
        height: 100%;
        padding: 120px 30px 60px;
        box-sizing: border-box;
        text-align: center;
    }

    /* 3. Top Logo (The Script Logo) */
    .mobile-logo {
        max-width: 340px;
        height: auto;
        margin: 0 auto;
    }

    /* 4. Bottom Headline (Serif White Text) */
    .mobile-headline {
        font-family: 'Playfair Display', serif;
        font-size: 1.6rem; /* Slightly smaller to fit better in the shorter view */
        color: #ffffff;
        line-height: 1.3;
        text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    }
}

/* Section 2: Cinematic Story & Video (Dark Panel) */
.dm-eyebrow {
    color: #B8A686; /* Muted Gold from your reference */
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 14px;
    display: block;
    margin-bottom: 25px;
}

.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;
}

@media (max-width: 768px) {
    .cinematic-story-section {
        padding: 80px 40px;
    }
}



/* --- Contained Tech Section --- */
.collection-tech-inset {
    background-color: #F4F4F4; /* Light, clean grey */
    padding: 80px 0;
    width: 100%;
}

/* Restricts the overall size so it doesn't feel "Big" */
.tech-canvas {
    max-width: 1000px; /* Much narrower than previous sections */
    margin: 0 auto;
    padding: 0 40px;
}

.tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Equal split */
    align-items: center;
    gap: 60px;
}

/* Image Frame - Scaled Down */
.tech-media .media-frame {
    background: #fff;
    padding: 10px;
    border: 1px solid #e0e0e0;
    line-height: 0;
}

.tech-media img {
    width: 100%;
    height: auto;
    display: block;
}

/* Typography Refinements */
.tech-info {
    text-align: left;
}

.small-heading {
    font-size: 1.8rem !important; /* Forces a smaller, more elegant size */
    margin: 15px 0;
    color: #4a3633;
}

.minimal-divider {
    width: 30px;
    height: 1px;
    background: var(--shifman-gold);
    margin-bottom: 25px;
}

.tech-info .desc-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 25px;
}

.text-cta {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--shifman-gold);
    text-decoration: none;
    transition: letter-spacing 0.3s ease;
}

.text-cta:hover {
    letter-spacing: 3px;
}

/* Mobile: Simple stack */
@media (max-width: 768px) {
    .tech-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    .tech-info { text-align: center; }
    .minimal-divider { margin: 0 auto 25px; }
}



/* Lineup Section Styles */
:root {
    --shifman-taupe: #8c7662;
    --shifman-mahogany: #7c534e;
    --shifman-cream: #f9f7f2;
}

.lineup-section { 
    background-color: var(--shifman-cream); 
    padding: 60px 20px; 
}

.canvas-frame {
    max-width: 1400px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--shifman-taupe);
    padding: 80px 60px;
    box-sizing: border-box;
}

.lineup-title {
    text-align: center;
    font-family: 'Playfair Display', serif;
    color: var(--shifman-taupe);
    letter-spacing: 5px;
    margin-bottom: 80px;
    text-transform: uppercase;
    font-size: 1.6rem;
}

/* Symmetrical Grid */
.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 60px;
    row-gap: 80px; /* Uniform spacing between rows */
}

.grid-item {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0; /* Subtle horizontal separation */
}

/* Clear vertical lines on desktop for that "framed" look */
.grid-item:nth-child(odd) {
    border-right: 1px solid #f0f0f0;
    padding-right: 40px;
}
.grid-item:nth-child(even) {
    padding-left: 40px;
}

.product-media {
    background: #ffffff;
    margin-bottom: 10px; /* Reduced from 30px to pull text up */
    text-align: center;
    height: 400px; /* Force a consistent, shorter height */
    display: flex;
    align-items: flex-end; /* Pushes the mattress to the bottom of the container */
    justify-content: center;
    overflow: hidden;
}

.product-media img {
    width: 100%;
    max-width: 450px; /* Slightly smaller to save vertical space */
    height: 100%;
    object-fit: contain; /* Ensures the whole mattress is visible without distortion */
    display: block;
    /* This creates a "crop" effect on transparent padding */
    transform: scale(1.15); 
    transform-origin: bottom center;
}
/* Typography */
.product-feel {
    display: block;
    color: var(--shifman-taupe);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: bold;
}

h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--shifman-taupe);
    margin-bottom: 15px;
    font-weight: 600;
}

.product-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 25px;
    min-height: 3.2em; /* Ensures text blocks stay relatively even */
}

/* Feature Tags */
.feature-tags {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.feature-tags li {
    font-size: 0.75rem;
    color: #888;
    background: #f9f9f9;
    padding: 4px 10px;
    border: 1px solid #eee;
}

/* Buttons */
.button-set { display: flex; gap: 10px; }
.btn-mahogany, .btn-taupe {
    display: inline-flex;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.7rem;
    letter-spacing: 1px;
    align-items: center;    /* Vertically centers text */
    justify-content: center;
    flex: 1; /* Makes buttons equal width */
}
.btn-mahogany { background: var(--shifman-mahogany); }
.btn-taupe { background: var(--shifman-taupe); }

/* Tablet & Mobile */
@media (max-width: 991px) {
    .grid-container { grid-template-columns: 1fr; row-gap: 60px; }
    .grid-item { border-right: none !important; padding: 0 !important; text-align: center; }
    .feature-tags { justify-content: center; }
    .button-set { justify-content: center; }
    .canvas-frame { padding: 40px 20px; }
}

@media (max-width: 767px) {
    .product-media {
        height: 280px; /* Force a consistent, shorter height */
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .product-media {
        margin-bottom: -40px; /* Reduced from 30px to pull text up */
        height: 370px; /* Force a consistent, shorter height */
    }
}