/*
 * Robbie Rose Gallery System - Master Stylesheet
 * Version: 1.1.0
 * Consolidates styles from all design source files.
 */

/*=========================================================================================
 I. ROOT & BASE STYLES
=========================================================================================*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Custom Properties for easier theming */
:root {
    /* Typography */
    --primary-font: 'Avril Fatface', sans-serif;
    --secondary-font: 'Source Serif Pro', serif;
    --font-xs: 11px;
    --font-sm: 13px;
    --font-base: 16px; /* slightly larger base for readability */
    --font-md: 17px;
    --font-lg: 20px;
    --font-xl: 22px;
    --font-2xl: 26px;
    --font-3xl: 30px;
    --font-4xl: 36px;
    --font-5xl: 48px;
    /* content width for readable measure */
    --content-max-width: 720px;

    /* Weights */
    --weight-light: 200;
    --weight-regular: 400;
    --weight-medium: 400;
    --weight-bold: 700;
    --weight-black: 900;

    /* Spacing */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 30px;
    --space-xl: 40px;
    --space-2xl: 60px;
    --space-3xl: 80px;
    --space-4xl: 120px;

    /* Colors */
    --color-silver-100: #f8fafc;
    --color-silver-200: #e2e8f0;
    --color-silver-300: #cbd5e1;
    --color-silver-400: #94a3b8;
    --color-silver-500: #64748b;
    --color-silver-600: #475569;
    --color-silver-700: #334155;
    --color-silver-800: #1e293b;
    --color-silver-900: #0f172a;

    /* Backgrounds & Surfaces */
    --background-color: #FDFCF8; /* From Travail */
    --content-bg: #F7F5F0; /* From Travail */
    --color-background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); /* From Landing */
    --color-surface: rgba(255, 255, 255, 0.8); /* From Landing */

    /* Accents */
    --accent-color: #64748b; /* From Travail */
}

body {
    font-family: var(--primary-font);
    font-size: var(--font-base);
    font-weight: var(--weight-light); /* lighter weight for editorial tone */
    color: var(--color-silver-600);
    background-color: var(--color-silver-100);
    line-height: 1.65; /* improved measure for paragraphs */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-width: 500px; /* Enforce a minimum width for the entire site */
}

/* CRITICAL: Global Image Containment - Prevents overflow */
img, video {
    display: block;
    max-width: 100% !important;
    height: auto !important;
}

/* Responsive Image Class for Consistent Sizing */
.responsive-image {
    max-width: 100%;
    height: auto;
    object-fit: contain; /* Ensure images fit without cropping */
    display: block;
}

/*=========================================================================================
 II. TYPOGRAPHY & TEXT STYLES
=========================================================================================*/
.text-title {
    font-family: 'Source Serif Pro', serif;
    font-size: var(--font-4xl);
    font-weight: var(--weight-light);
    letter-spacing: 2px;
    color: var(--color-silver-800);
}

.text-heading {
    font-family: 'Source Serif Pro', serif;
    font-size: var(--font-2xl);
    font-weight: var(--weight-light);
    letter-spacing: 1px;
    color: var(--color-silver-800);
}

.text-body {
    font-size: var(--font-base);
    font-weight: var(--weight-regular);
    line-height: 1.7;
    color: var(--color-silver-700); /* stronger contrast for readability */
}

.text-caption {
    font-size: var(--font-sm);
    font-weight: var(--weight-regular);
    color: var(--color-silver-500);
}

.text-small {
    font-size: var(--font-xs);
    color: var(--color-silver-400);
}

/*=========================================================================================
 III. GLOBAL & REUSABLE COMPONENTS
=========================================================================================*/
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%; /* CRITICAL: Prevents container from being wider than viewport */
}

/* Default Header for sub-pages */
.site-header {
    background: #fff;
    padding: 1rem 2rem;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header.listing-page-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Left, Center, Right */
    align-items: center;
    padding: var(--space-md) var(--space-lg);
}

.site-header .site-header-left {
    justify-self: start;
}
.site-header .site-header-center {
    justify-self: center;
}
.site-header .site-header-right {
    justify-self: end;
}


.site-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

/* Inline Nav Link for Travail */
.nav-link-inline,
.nav-link-inline a {
    color: #ea580c; /* slightly orange */
    text-decoration: underline dotted rgba(234,88,12,0.6);
    cursor: pointer;
    display: inline-block;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background-color 200ms ease, color 200ms ease;
    font-weight: 200; /* light weight */
}

.nav-link-inline:hover,
.nav-link-inline a:hover {
    background: rgba(234, 88, 12, 0.08);
    color: #dc2626; /* darker orange */
}

.nav-link-inline.visited,
.nav-link-inline a.visited {
    color: #fb923c; /* muted orange */
    text-decoration-style: dotted;
}

/* Collections Page Fixes */
.product-carousel-container {
    max-width: 600px; /* About 60% of previous size */
    margin: 3rem auto; /* Center horizontally, space between products */
}

.product-main-display {
    position: relative;
}

.product-main-image {
    width: 100%;
    height: auto;
    display: block;
}

.product-price {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
}

.product-thumbnails {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.product-thumb {
    width: 120px;
    height: 120px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.product-thumb.active {
    opacity: 1;
    border: 2px solid black;
}

/* Consistent Back Arrow Styling */
.back-arrow-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: currentColor;
    margin-bottom: 2rem;
}

.back-arrow-link svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s;
}

.back-arrow-link:hover svg {
    transform: translateX(-4px);
}

.page-header-with-back {
    margin-bottom: 3rem;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
    .collections-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .collection-card.is-expanded {
        grid-column: 1 / -1; /* Span all columns */
    }
}

/* Inline popover preview for travail inline links */
.inline-nav-popover {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 8px 24px rgba(2,6,23,0.08);
    padding: 10px 12px;
    border-radius: 8px;
    max-width: 320px;
    z-index: 9999;
    font-size: 14px;
    color: #0f172a;
    transition: transform 140ms ease, opacity 120ms ease;
}
.inline-nav-popover::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    transform: rotate(45deg);
    border-left: 1px solid rgba(15,23,42,0.06);
    border-top: 1px solid rgba(15,23,42,0.06);
    top: -6px;
    left: 18px;
}
.inline-nav-popover .popover-title {
    font-weight: 600;
    margin-bottom: 4px;
}
.inline-nav-popover .popover-preview {
    font-size: 13px;
    color: #334155;
    margin-bottom: 8px;
}
.inline-nav-popover .popover-actions .popover-explore {
    background: transparent;
    border: none;
    color: var(--color-silver-800);
    cursor: pointer;
    font-weight: 600;
    padding: 4px 6px;
}

@media (max-width: 520px) {
    .inline-nav-popover {
        position: fixed !important;
        left: 12px !important;
        right: 12px !important;
        top: auto !important;
        bottom: 16vh !important;
        max-width: calc(100% - 32px);
        transform: translateY(6px);
    }
    .inline-nav-popover::after { display: none; }
}

/* Small "See also" inline suggestion placed under paragraphs */
.inline-see-also {
    margin-top: 8px;
    font-size: 13px;
    color: var(--color-silver-700);
}
.inline-see-also .see-also-link {
    color: var(--color-silver-800);
    text-decoration: none;
    padding: 2px 4px;
}
.inline-see-also .see-also-link.visited {
    color: var(--color-silver-500);
    opacity: 0.8;
}

/*=========================================================================================
 IV. LANDING PAGE STYLES (`template-home.php`)
=========================================================================================*/
/* Landing Page Header */
.site-header-landing {
    width: 100%;
    padding: var(--space-lg) var(--space-md);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background-color: var(--color-silver-100);
    margin-bottom: 20px;
    transition: height 0.3s ease, padding 0.3s ease;
}

.site-header-landing.is-expanded {
    padding: var(--space-2xl) var(--space-md);
}

/* Main Content */
.main-content {
    transition: transform 0.3s ease;
}

.site-logo,
.process-header .site-title,
.context-header .site-title {
    /* Removed intentional blur for crisper branding */
    filter: none;
}

/* Back navigation styling (mobile friendly, fades on scroll) */
.back-navigation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background: rgba(255,255,255,0.9);
    color: var(--text-color-dark);
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: opacity 260ms ease, transform 260ms ease;
}
.back-navigation.back-hidden {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

/* Ensure header layout remains tidy on small screens */
@media (max-width: 640px) {
    .site-header .site-left { display:flex; align-items:center; gap:8px; }
    .site-title { font-size: 1rem; }
    .site-right { display: none; } /* hide phone on small screens to save space */
}

/* Hero image mobile adjustments: avoid heavy cropping on narrow viewports */
@media (max-width: 640px) {
    .hero-image { aspect-ratio: 16 / 9; max-height: 50vh; }
    .hero-image-full { width: 100%; height: auto; object-fit: contain; object-position: center; }
}
/* Media Delay Notification Bubble */
.media-delay-notification {
    background-color: var(--color-silver-800);
    color: var(--color-silver-100);
    padding: var(--space-sm) var(--space-md);
    text-align: center;
    font-size: var(--font-sm);
    font-weight: var(--weight-medium);
}

.media-delay-notification p {
    margin: 0;
}

.media-delay-notification a {
    color: var(--color-silver-300);
    font-weight: var(--weight-bold);
    text-decoration: underline;
}

/* Hero Carousel */
.hero-carousel {
    width: 100%;
    height: 85vh;
    max-height: 800px;
    padding: 0 var(--space-md); /* Side padding that adjusts with screen size */
    position: relative;
    overflow: hidden;
    margin-bottom: var(--space-2xl);
}

.carousel-viewport {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    cursor: grab; /* Indicate that the element is draggable */
    user-select: none; /* Prevent text selection during drag */
}

.carousel-viewport.is-dragging {
    cursor: grabbing; /* Change cursor during active drag */
}

.carousel-track-new {
    display: flex;
    height: 100%;
    will-change: transform;
}

.carousel-slide-new {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    padding: 0 var(--space-md); 
    display: flex; /* Add flexbox */
    align-items: center; /* Vertically center content */
    justify-content: center; /* Horizontally center content */
    position: relative;
}

.carousel-slide-new .hero-image-link {
    display: block;
    width: 100%; /* Ensure link fills the container */
    height: 100%; /* Ensure link fills the container */
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide-new .hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure the whole image is visible without being cropped */
    object-position: center;
    max-width: 100%; /* Redundant but safe */
    max-height: 100%; /* Ensure it doesn't overflow its container */
}

.carousel-dots {
    position: absolute;
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-xs);
    background-color: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border-radius: 12px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.25s cubic-bezier(.2,.9,.2,1);
    cursor: pointer;
    pointer-events: all; /* Ensure dots are clickable for JS, but clicks will pass through if not handled */
}

.carousel-dot.active {
    background: rgba(255, 255, 255, 0.9);
}

/* NEW: BEM-scoped Hero Carousel Styles */
.hero-carousel {
    width: 100%;
    height: 85vh;
    max-height: 800px;
    position: relative;
    overflow: hidden;
    margin-bottom: var(--space-2xl);
    cursor: grab;
    user-select: none;
}

.hero-carousel.is-dragging {
    cursor: grabbing;
}

.hero-carousel__track {
    display: flex;
    height: 100%;
    will-change: transform;
}

.hero-carousel__slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    padding: 0 var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-carousel__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Ensure hero is legible on small screens */
@media (max-width: 640px) {
    .hero-carousel {
        height: 50vh;
        padding: 0 var(--space-sm);
    }
}

/* Landing content readable measure */
.page-home-landing .content-area,
.page-home-landing .travail-section,
.page-home-landing .philosophy-section {
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
}

.page-home-landing .text-body {
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
}

/* Tranquility Section on Home Page */
.tranquility-section {
    width: 100%;
    padding: var(--space-4xl) 0 var(--space-2xl) 0; /* Reduced bottom padding */
    text-align: center;
}

.tranquility-section .text-title {
    padding: 0 var(--space-sm); /* Add padding only to the title */
}

.tranquility-hero-container {
    width: 100%;
    margin-top: var(--space-2xl);
}

.tranquility-hero-link {
    display: block;
    text-decoration: none;
}

.tranquility-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: filter 0.3s ease;
}

.tranquility-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Travail Link Section */

/* Loading overlay for in-place navigation */
.loading {
    position: relative;
}
.loading::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.6);
    z-index: 9999;
}
.loading::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 36px;
    height: 36px;
    margin-left: -18px;
    margin-top: -18px;
    border-radius: 50%;
    border: 4px solid rgba(0,0,0,0.08);
    border-top-color: rgba(0,0,0,0.45);
    animation: rr-spin 0.9s linear infinite;
    z-index: 10000;
}

@keyframes rr-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Exclusive Creation thumbnails and More button */
.exclusive-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    align-items: center;
}
.exclusive-thumb {
    background: transparent;
    border: 1px solid rgba(15,23,42,0.06);
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
}
.exclusive-thumb img { width: 72px; height: 72px; object-fit: cover; display: block; }
.exclusive-thumb.active { box-shadow: 0 6px 18px rgba(2,6,23,0.06); border-color: rgba(15,23,42,0.12); }
.exclusive-more-btn {
    display: inline-block;
    margin-left: 12px;
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: var(--color-silver-800);
    font-weight: 600;
    cursor: pointer;
}
.exclusive-more-btn:hover { text-decoration: underline; }
.travail-section {
    width: 100%;
    padding: var(--space-4xl) var(--space-sm);
    text-align: center;
}

.travail-collection-link {
    display: block;
    text-decoration: none;
    margin: 50px auto;
    width: 97.5%;
}

.image-overlay-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    border-radius: 3px;
    overflow: hidden;
}

.travail-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: filter 0.3s ease;
}

.travail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay-container:hover .travail-image {
    filter: brightness(0.7);
}

.image-title-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: var(--font-md);
}

.image-overlay-container:hover .image-title-overlay {
    opacity: 1;
}

/* Philosophy Section */
.philosophy-section {
    width: 100%;
    padding: var(--space-2xl) var(--space-sm);
}

.discussion-article {
    width: 100%;
    margin-bottom: var(--space-4xl);
    min-height: 60vh;
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.cta-button {
    display: inline-block;
    background-color: transparent;
    border: 1px solid var(--color-silver-400);
    color: var(--color-silver-600);
    padding: var(--space-xs) var(--space-md);
    margin: var(--space-md) 0;
    border-radius: 20px;
    text-decoration: none;
    font-weight: var(--weight-light);
    font-size: var(--font-sm);
    transition: all 0.2s ease;
}

.cta-button:hover {
    background-color: var(--color-silver-800);
    color: var(--color-silver-100);
    border-color: var(--color-silver-800);
}

.discussion-article.right-align {
    flex-direction: row-reverse;
}

.article-image-wrapper { /* Renamed for clarity */
    flex: 1;
}

.article-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

.article-content-text {
    flex: 1;
    padding: 0 var(--space-lg);
}

/* Improve paragraph spacing for readability on landing */
.page-home-landing .text-body p,
.page-home-landing .text-body {
    margin-bottom: 1.2rem;
}

/* Collections Carousels */
.collections-section {
    width: 100%;
    padding: var(--space-2xl) var(--space-sm);
    text-align: center;
}

.collections-title {
    margin-bottom: var(--space-2xl);
}

.cta-link {
    background: none;
    border: none;
    color: var(--color-silver-700);
    text-decoration: underline;
    font-weight: var(--weight-bold);
    cursor: pointer;
    padding: 0;
}

.carousels-container {
    display: grid;
    grid-template-columns: 1fr; /* single column by default */
    gap: var(--space-2xl);
    margin: var(--space-3xl) auto;
    max-width: 1200px;
}

.carousel-title {
    font-family: 'Source Serif Pro', serif;
    font-size: var(--font-xl);
    color: var(--color-silver-600);
}

.item-price, .collection-product-count {
    font-family: 'Avril Fatface', sans-serif;
}


.collection-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    width: 280px;
    position: relative;
}

.arrow {
    width: 50px;
    height: 25px;
    cursor: pointer;
    background: transparent;
    border: none;
    position: relative;
}

.arrow-up::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border-top: 3px solid var(--color-silver-600);
    border-right: 3px solid var(--color-silver-600);
    transform: translate(-50%, -30%) rotate(-45deg);
}

.arrow-down::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border-top: 3px solid var(--color-silver-600);
    border-right: 3px solid var(--color-silver-600);
    transform: translate(-50%, -70%) rotate(135deg);
}

.image-container {
    width: 100%;
    max-width: 280px;
    /* Keep proportional image cards without a rigid height */
    aspect-ratio: 4 / 5; /* portrait-oriented card similar to 280x380 */
    max-height: 60vh;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.sculpture-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    position: absolute;
    inset: 0;
}

.sculpture-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-text {
    font-family: 'Source Serif Pro', serif;
    font-size: var(--font-md);
    font-weight: var(--weight-medium);
    color: var(--color-silver-800);
    position: absolute;
    bottom: var(--space-md);
    left: var(--space-md);
    background: rgba(255, 255, 255, 0.6);
    padding: 4px 10px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.purchase-link {
    position: absolute;
    bottom: var(--space-sm);
    right: var(--space-sm);
    font-size: var(--font-xs);
    font-weight: var(--weight-bold);
    color: var(--color-silver-600);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.indicator {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.indicator-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-silver-300);
}

.indicator-dot.active {
    background: var(--color-silver-600);
}

.process-carousel-wrapper .process-carousel {
    overflow: hidden;
    border-radius: 3px;
}

.process-carousel__track {
    display: flex;
    transition: transform 0.5s ease;
}

/* SCOPED: This rule is now specific enough to only target the process carousel slides. */
.process-carousel .process-carousel__slide {
    flex: 0 0 100%; /* Ensure each slide takes up the full viewport width */
    padding: 0 var(--space-sm); /* Add horizontal padding to create space between slides */
    min-width: 100%;
    padding: var(--space-xl); /* Reduce padding to better fit the smaller container */
    background: var(--color-surface);
    text-align: center;
}

.process-carousel__slide img {
    border: 1px solid var(--color-silver-200); /* Add a clear border around the image */
}

.process-carousel__slide-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.process-carousel__image {
    max-width: 800px; /* Constrain the image container width */
    width: 100%; /* Ensure it's responsive */
    margin: 0 auto var(--space-lg) auto; /* Center it horizontally and add bottom margin */
    aspect-ratio: 16 / 9;
    border-radius: 3px;
    cursor: pointer;
}

/* Style the titles within the process carousel */
.process-carousel__slide .process-carousel__slide-heading {
    font-family: var(--primary-font); /* Sulphur Point */
    font-weight: var(--weight-light); /* Light weight */
    font-size: var(--font-2xl); /* Larger font size */
    color: var(--color-silver-700);
    margin-top: var(--space-sm);
    margin-bottom: var(--space-xs);
}

/* Style the paragraph text within the process carousel */
.process-carousel__slide .process-carousel__slide-body {
    font-size: var(--font-md); /* Larger font size */
    font-weight: var(--weight-light); /* Lighter font weight */
    max-width: 50ch; /* Limit line length for readability */
    margin: 0 auto;
}

.process-carousel__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Landing Page Footer */
.site-footer-landing {
    width: 100%;
    padding: var(--space-4xl) var(--space-lg);
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

/* Footer: slightly larger, more legible links */
.site-footer-landing .footer-link {
    font-size: var(--font-md);
    color: var(--color-silver-700);
}

/* New Logo Image Styles */
.site-logo-image {
    height: 40px; /* Adjust as needed for your logo's proportions */
    width: auto;
    display: block;
}

/* Smaller logo for contextual headers (Travail, Process, etc.) */
.site-logo-image.small {
    height: 24px;
    object-fit: contain;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

.footer-link {
    color: var(--color-silver-600);
    text-decoration: none;
    font-size: var(--font-base);
}

/*=========================================================================================
 V. TRAVAIL PAGE STYLES (`template-travail.php`)
=========================================================================================*/
.page-travail-node {
    background: var(--background-color);
}

.page-travail-node .site-header {
    display: none; /* Hide the default header on travail pages */
}

/* Travail Header */
.context-header {
    width: 100%;
    height: 5vh;
    min-height: 60px;
    padding: 0 40px;
    background: var(--background-color);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
} 

.back-navigation {
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: 0.3s ease;
    text-decoration: none;
}

.context-header .site-title {
    color: var(--text-color-secondary);
}

.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin: 0 40px;
}

.reading-progress {
    width: 15%;
    min-width: 120px;
    height: 4px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.exploration-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--accent-color);
}

.exploration-indicator .exploration-count {
    font-weight: var(--weight-bold);
    color: var(--text-color-secondary);
}

.content-frame {
    width: 72%;
    max-width: 980px;
    margin: 40px auto;
    background: var(--content-bg);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    min-height: 72vh;
}
.page-container {
    padding: 36px 28px;
    padding-bottom: 70px; /* Space for the drawer handle */
}

.section-header {
    text-align: center;
    padding-bottom: 60px;
}

.section-title {
    color: var(--text-color-dark);
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-color-secondary);
    font-style: italic;
}

.text-block {
    max-width: 720px;
    margin: 0 auto 16px auto;
    padding: 0 1rem; /* Add some horizontal padding */
}

.paragraph {
    color: var(--text-color-primary);
}

.page-travail-node .image-container-link {
    display: block;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.image-container {
    margin: 20px 0;
    text-align: center;
}

.inline-image {
    display: inline-block;
    width: 48%;
    margin: 0 1%;
    vertical-align: top;
}

.centered-large {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    margin: 20px 0;
}

.hero-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    position: relative;
    border-radius: 8px;
    margin: 0 auto;
    overflow: hidden;
}

/* --- Quick Navigation Drawer --- */
.quick-nav-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none; /* Allow clicks to pass through the container */
}

.quick-nav-drawer {
    background: var(--background-color);
    border-top: 1px solid var(--color-silver-200);
    transition: transform 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
    transform: translateY(calc(100% - 50px)); /* Start collapsed, showing only the handle (50px height) */
    pointer-events: auto; /* Make the drawer itself clickable again */
}

.quick-nav-drawer.is-open {
    transform: translateY(0);
}

.drawer-handle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    height: 50px;
    cursor: pointer;
}

.handle-left { display: flex; align-items: center; gap: 12px; }
.handle-chevron { transition: transform 0.3s ease; }
.quick-nav-drawer.is-open .handle-chevron { transform: rotate(180deg); }

.drawer-content {
    padding: 20px 28px;
    max-height: 40vh;
    overflow-y: auto;
}

.navigation-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 50%; /* Take up half the width as requested */
}

.quick-nav-link {
    display: block;
    text-decoration: none;
    color: var(--text-color-primary);
    padding: 10px;
    border-radius: 4px;
}
.nav-option-preview {
    font-size: 11px;
    line-height: 1.4;
    opacity: 0.9;
    margin-bottom: 5px;
}
.nav-option-connections {
    font-size: 9px;
    opacity: 0.7;
}

/*=========================================================================================
 VI. TRAVAIL PAGE STYLES (`template-travail.php`)
=========================================================================================*/
.breadcrumb-trail {
    padding: 0 30px 40px;
    font-size: var(--font-sm);
    color: var(--text-color-secondary);
    text-align: center;
}

.breadcrumb-trail a {
    color: var(--text-color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-trail .breadcrumb-separator {
    margin: 0 10px;
    color: var(--accent-color);
}

.breadcrumb-trail span:last-of-type {
    color: var(--text-color-dark);
    font-weight: var(--weight-bold);
}

/*=========================================================================================
 VII. GLOBAL BRANDING & MISC
=========================================================================================*/

/*=========================================================================================
 VIII. SINGLE LISTING PAGE (`template-listing.php`)
=========================================================================================*/
.single-listing .container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    background: #fff;
}
.listing-hero {
    text-align: center;
    margin-bottom: var(--space-2xl);
}
.listing-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 70vh;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: var(--space-lg);
}
.listing-title {
    font-size: var(--font-4xl);
    font-weight: var(--weight-light);
    color: var(--text-color-dark);
}
.listing-content {
    padding: var(--space-xl);
    text-align: center;
}
.listing-content .section-heading {
    font-size: var(--font-2xl);
    margin-bottom: var(--space-md);
}
.listing-excerpt {
    font-size: var(--font-lg);
    color: var(--text-color-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-xl) auto;
}

/*=========================================================================================
 IX. PROCESS/FABRICATION PAGE (`template-process.php`)
=========================================================================================*/
.page-fabrication .container {
    background-color: #fafaf9;
}

.process-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 3rem;
    position: relative;
}

.process-header .back-button {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #a8a29e;
}

.process-header .site-title {
    font-size: 1.5rem;
    font-weight: var(--weight-light);
    color: #0c0a09;
}

.fabrication-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.fabrication-title {
    font-size: 3.75rem;
    font-family: 'Source Serif Pro', serif;
    font-weight: var(--weight-light);
    margin-bottom: 1rem;
    background-image: linear-gradient(135deg, #475569 0%, #1e293b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fabrication-subtitle {
    font-size: 1.875rem;
    font-family: 'Source Serif Pro', serif;
    font-weight: var(--weight-light);
    margin-bottom: 0.5rem;
}

.fabrication-description {
    font-size: 1.125rem;
    color: #374151;
    max-width: 48rem;
    margin: 0 auto;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    align-items: center;
}

.content-grid.reverse {
    direction: rtl;
}

.content-grid.reverse > * {
    direction: ltr;
}

.content-section {
    padding: 1.5rem;
}

.content-heading {
    font-size: 1.5rem;
    font-family: 'Source Serif Pro', serif;
    font-weight: var(--weight-light);
    color: #0c0a09;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.content-heading::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    width: 3px;
    height: 100%;
    background-image: linear-gradient(135deg, #f5f5dc 0%, #f7f7e8 25%, #f2f2d6 50%, #f5f5dc 75%, #ebebd6 100%);
    transform: translateY(-50%);
}

.content-text {
    color: #1c1917;
    margin-bottom: 1rem;
}

.image-placeholder {
    position: relative;
    height: 24rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quote-section {
    margin-bottom: 4rem;
}

.quote-container {
    padding: 3rem;
    text-align: center;
}

.quote-text {
    font-size: 1.5rem;
    font-family: 'Source Serif Pro', serif;
    font-style: normal;
    font-weight: var(--weight-light);
    color: #0c0a09;
    max-width: 64rem;
    margin: 0 auto;
}

.full-width-image {
    position: relative;
    height: 24rem;
    margin: 4rem 0;
    border-radius: 1rem;
    overflow: hidden;
}

.full-width-image img {
    filter: saturate(0);
    transition: filter 0.3s ease;
}


.full-width-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Scrollable Video on Process Page */
.scroll-video-section {
    margin: 4rem 0;
}

.scroll-video-container {
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    line-height: 0; /* Removes bottom space under video */
}

.scroll-video-container.is-loading::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 36px;
    height: 36px;
    margin-left: -18px;
    margin-top: -18px;
    border-radius: 50%;
    border: 4px solid rgba(0,0,0,0.1);
    border-top-color: rgba(0,0,0,0.6);
    animation: rr-spin 0.9s linear infinite;
    z-index: 10;
}

.scroll-video-container.is-loading .video-scrollbar,
.scroll-video-container.is-loading .video-scrollbar-thumb {
    opacity: 0.5;
    pointer-events: none;
}

.scroll-video {
    width: 100%;
    height: auto;
    /* Style the poster image to behave like the video */
    object-fit: cover;
    background-size: cover;
    background-position: center;
}

.scroll-video {
    width: 100%;
    height: auto;
}

.video-scrollbar {
    width: 100%;
    height: 10px;
    background-color: var(--color-silver-200);
    border-radius: 3px;
    margin-top: var(--space-md);
    position: relative;
    cursor: pointer;
    touch-action: pan-x; /* Allow horizontal pan for scrub on mobile */
}

.video-scrollbar-thumb {
    position: absolute;
    top: 0;
    left: 50%; /* Start in the middle */
    width: 20px;
    height: 10px;
    background-color: var(--color-silver-500);
    border-radius: 3px;
    transform: translateX(-50%);
    cursor: grab;
}

.video-scrollbar-thumb:active {
    cursor: grabbing;
}

/* Ensure the philosophy video grid doesn't get reversed on mobile */
.page-philosophy .content-grid .scroll-video-section {
    direction: ltr !important;
    order: initial !important;
}

/*=========================================================================================
 NEW: ADVANCED MANUFACTURING PAGE STYLES
=========================================================================================*/

.slideshow-overlay-glass {
    position: absolute;
        /* Use aspect-ratio to keep images proportional instead of fixed heights */
        aspect-ratio: 4 / 3;
        max-height: 60vh; /* allow images to grow but cap at viewport fraction */
    background-color: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.overlay-text {
    font-family: 'Sulphur Point', sans-serif;
    font-size: var(--font-3xl);
    font-weight: var(--weight-light);
    color: var(--color-blue-800);
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.macro-trio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin: var(--space-xl) 0;
}

.trio-image-item {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
}

.trio-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*=========================================================================================
 X. RESPONSIVE MEDIA QUERIES
=========================================================================================*/

/* Tablet and up: Enable two-column layouts */
@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile: Single column, centered */
@media (max-width: 768px) {
    .carousels-container {
        grid-template-columns: 1fr;
        max-width: 320px; /* Center single column on mobile */
    }
    .discussion-article {
        flex-direction: column !important;
    }
}

/* Large screens (1024px+): Enhanced layouts for pages that were breaking */
@media (min-width: 1024px) {
    /* Fix container widths for pages that were breaking */
    .page-computational-design .container,
    .page-advanced-manufacturing .container,
    .page-exclusive-creation .container,
    .page-philosophy .container,
    .page-fabrication .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 3rem 2rem;
    }

    /* Ensure content areas don't stretch too wide */
    .page-computational-design .content-area,
    .page-advanced-manufacturing .content-area,
    .page-exclusive-creation .content-area,
    .page-philosophy .content-area,
    .page-fabrication .content-area {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Extra large screens (1200px+): Optimize for ultra-wide displays */
@media (min-width: 1200px) {
    /* Further constrain containers on ultra-wide screens */
    .page-computational-design .container,
    .page-advanced-manufacturing .container,
    .page-exclusive-creation .container,
    .page-philosophy .container,
    .page-fabrication .container {
        max-width: 1400px;
        padding: 4rem 3rem;
    }

    /* Maintain readable content widths */
    .page-computational-design .content-area,
    .page-advanced-manufacturing .content-area,
    .page-exclusive-creation .content-area,
    .page-philosophy .content-area,
    .page-fabrication .content-area {
        max-width: 1000px;
    }
}

/* Large screens (1024px+): Enhance layouts for more space */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px; /* Increase container width */
        padding: 3rem 2rem; /* More padding for breathing room */
    }

    .product-layout-grid {
        grid-template-columns: 1fr 1fr; /* Ensure two-column on larger screens */
        gap: var(--space-3xl); /* Increase gap */
    }

    .product-details-column {
        position: sticky;
        top: var(--space-2xl);
    }

    .discussion-article {
        gap: var(--space-3xl); /* More space between elements */
    }

    .hero-carousel {
        height: 90vh; /* Slightly taller hero on large screens */
        max-height: 900px;
    }

    .travail-section,
    .philosophy-section {
        max-width: 1400px; /* Allow wider content areas */
        margin-left: auto;
        margin-right: auto;
    }

    .collections-portal-header {
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }

    .collection-product-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Larger cards */
        gap: var(--space-3xl);
    }
}

/* Extra large screens (1200px+): Optimize for ultra-wide displays */
@media (min-width: 1200px) {
    .container {
        max-width: 1800px; /* Even wider container for better desktop utilization */
        padding: 4rem 3rem; /* Even more padding */
    }

    .product-layout-grid {
        gap: var(--space-4xl);
    }

    .hero-carousel {
        height: 95vh;
        max-height: 1000px;
    }

    .discussion-article {
        gap: var(--space-4xl);
    }

    .collection-product-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* Even larger cards */
        gap: var(--space-4xl);
    }

    .travail-section,
    .philosophy-section,
    .collections-portal-header {
        max-width: 2000px; /* Maximize content width for ultra-wide screens */
    }

    /* Ensure images and videos scale properly */
    .responsive-image,
    img,
    video {
        max-width: 100%;
        height: auto;
    }

    /* Prevent any potential overflows */
    .product-gallery-column,
    .product-details-column {
        overflow: hidden; /* Prevent content from breaking out */
    }
}

/* Fix for listing page containers on larger screens */
@media (min-width: 1024px) {
    .single-listing .container {
        max-width: 1200px; /* Increase from 800px */
        margin: 3rem auto;
        padding: 2rem;
    }
}

@media (min-width: 1200px) {
    .single-listing .container {
        max-width: 1400px;
        margin: 4rem auto;
        padding: 3rem;
    }
}

/* Ensure drawers and overlays work on larger screens */
@media (min-width: 1024px) {
    .purchase-drawer-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
    }

    .purchase-drawer {
        max-width: 600px; /* Constrain drawer width on large screens */
        margin: 0 auto;
    }

    .drawer--from-left .purchase-drawer {
        margin-left: 10%; /* Position from left */
    }

    .drawer--from-right .purchase-drawer {
        margin-right: 10%; /* Position from right */
    }
}

/* Masonry carousel fixes for larger screens */
@media (min-width: 1024px) {
    .masonry-carousel-section {
        padding: var(--space-4xl) 0;
    }

    .masonry-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* More columns */
        gap: var(--space-xl);
    }
}

@media (min-width: 1200px) {
    .masonry-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: var(--space-2xl);
    }
}

/*=========================================================================================
 XI. NAVIGATION SCROLLBAR (HOME PAGE)
=========================================================================================*/
.nav-scrollbar {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: min(140px, 32vw);
    height: 12px;
}

.nav-scrollbar-track {
    width: 100%;
    height: 100%;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    position: relative;
}

.nav-scrollbar-thumb {
    height: 100%;
    background: var(--color-silver-800);
    border-radius: 10px;
    position: absolute;
    top: 0;
    cursor: grab;
}

/*=========================================================================================
 XI. UNBOXING SECTION (HOME PAGE)
=========================================================================================*/

/* Section wrapper */
.unboxing-section {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 2rem;
}

/* Header/toggle button */
.unboxing-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    border-bottom: 1px solid var(--color-silver-200);
}

.unboxing-header h2 {
    margin: 0;
    font-size: 1.5rem;    font-weight: var(--weight-light);
}

.drawer-icon {
    transition: transform 0.3s;
}

.unboxing-header.is-open .drawer-icon {
    transform: rotate(180deg);
}

/* Drawer container */
.unboxing-drawer {
    max-height: 0;
    overflow: hidden;
    overflow: hidden; /* Keep this to hide content when closed */
    transition: max-height 0.5s ease;
}

.unboxing-drawer.open {
    max-height: 150vh; /* Large enough for any content */
}

/* Inner content with border to show it's a container */
.unboxing-drawer .drawer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem;
    display: flex; /* Changed to flexbox for a single column layout */
    flex-direction: column;
    gap: 2rem; /* Consistent gap between sections */
    padding: 2rem;
    margin-top: 1rem;
    border: 1px solid var(--color-silver-200);
    background: #fafafa;
    border-radius: 4px;
    overflow: hidden; /* Prevent children from breaking out */
    overflow: visible; /* Allow shadows or other elements to peek out if needed */
}

.drawer-text-column p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}
.drawer-text-content p {
    max-width: 65ch; /* Improve readability */
    margin: 0 auto; /* Center the text block */
    text-align: center;
    line-height: 1.7;
    color: var(--color-silver-600);
}

.drawer-media-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 0; /* Critical - allows flex children to shrink below content size */
}

/* Video wrapper - small and cropped */
.scrub-video-wrapper {
    width: 140px;
    height: 280px; /* 1:2 ratio */
    width: 100%;
    aspect-ratio: 16 / 9; /* Use a standard video aspect ratio */
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid var(--color-silver-200);
    cursor: grab;
    align-self: flex-start; /* Don't stretch to column width */
}

.scrub-video-wrapper:active {
    cursor: grabbing;
}

.scrub-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay - exactly matches video size */
.scrub-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s;
    pointer-events: none;
}

.scrub-video-wrapper:hover .scrub-overlay,
.scrub-video-wrapper.is-interacting .scrub-overlay {
    opacity: 0;
}

.scrub-instruction {
    color: white;
    font-size: 0.875rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Detail images */
/* New container for supporting images */
.drawer-supporting-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.packaging-inline-image,
.packaging-detail-image {
    width: 100%;
    max-width: 350px;
    height: auto;
    object-fit: contain; /* Don't crop, scale proportionally */
    height: auto; /* Let height be automatic based on aspect ratio */
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--color-silver-200);
}

/* Full width image */
.packaging-full-width-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid var(--color-silver-200);
    margin: 2rem 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Mobile styles */
@media (max-width: 768px) {
    .unboxing-section {
        padding: 0 1rem;
        margin: 2rem auto;
    }
    
    .drawer-inner {
        grid-template-columns: 1fr;
        flex-direction: column; /* Already column, but good to be explicit */
        gap: 2rem;
        padding: 2rem 1rem;
    }
    
    .scrub-video-wrapper {
        width: 120px;
        height: 240px;
        margin: 0 auto;
    .drawer-supporting-images {
        grid-template-columns: 1fr; /* Stack images on mobile */
    }
    
    .packaging-detail-image {
        max-width: 100%;
    }
}

/* Top Carousel */
.single-listing .listing-carousel-section {
    margin-bottom: 8rem; /* Generous whitespace */
    position: relative;
}

.listing-carousel-container {
    overflow: hidden;
    border-radius: 5px;
}

.listing-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.listing-carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.listing-carousel-slide img {
    width: 100%;
    height: 70vh; /* Define a consistent height for all carousel slides */
    object-fit: cover; /* Ensure image covers the area without distortion */
    display: block;
    background-color: var(--color-silver-200);
}

.listing-carousel-dots {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.listing-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-silver-300);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.listing-carousel-dot.active {
    background-color: var(--color-silver-600);
}

/* General Responsive Polish for Listing Page */
.single-listing .page-wrapper {
    overflow-x: hidden; /* Prevent horizontal scroll on wide/narrow mismatches */
}


.drawer-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-silver-200);
    position: relative; /* Needed for absolute positioning of the close button */
    min-height: 80px; /* Ensure header has space */
}
.drawer-header .redirect-text {
    font-size: var(--font-xs);
    color: var(--color-silver-500);
    margin-left: auto;
    margin-right: var(--space-md);
}
.drawer-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.drawer-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-silver-500);
    position: absolute; /* Keep absolute positioning */
    top: var(--space-md); /* Consistent vertical position */
    right: var(--space-lg); /* Default to top right */
    padding: 0;
}

/* Specific override for left-opening drawers */
.drawer--from-left .drawer-close-btn {
    right: auto; /* Unset the right position */
    left: var(--space-lg); /* Set the left position */
}

.drawer-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: var(--space-lg) var(--space-xl);
}

.artwork-preview {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.drawer-excerpt { margin-bottom: var(--space-xl); }

/* Brick Layering Content */
.content-bricks-container {
    display: flex;
    flex-direction: column;
    gap: 1.6rem; /* tighter gap for comfortable reading */
}

.content-brick { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); align-items: stretch; }
.content-brick:nth-child(even) .brick-text { order: 2; }
.content-brick:nth-child(even) .brick-image { order: 1; }
.brick-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; display:block; }

/*=========================================================================================
 XII. NEW LISTING PAGE STYLES (Brick Layer & Drawer)
=========================================================================================*/

.purchase-button-wrapper {
    width: 100%;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
}
.summary-row span:first-child {
    color: var(--color-silver-600);
}
.summary-row span:last-child {
    font-weight: var(--weight-medium);
}
.summary-row.total {
    font-size: var(--font-lg);
    font-weight: var(--weight-bold);
    border-top: 1px solid var(--color-silver-300);
    padding-top: var(--space-sm);
    margin-top: var(--space-sm);
    margin-bottom: 0;
}
.form-section {
    margin-bottom: var(--space-lg);
}
.section-title {
    font-size: var(--font-md);
    font-weight: var(--weight-light);
    color: var(--color-silver-800);
    margin-bottom: var(--space-md);
    letter-spacing: 0.05em;
}
.form-group {
    margin-bottom: var(--space-md);
}
.form-group label {
    display: block;
    font-size: var(--font-sm);
    font-weight: var(--weight-medium);
    color: var(--color-silver-600);
    margin-bottom: var(--space-xs);
}
.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-silver-300);
    border-radius: 10px;
    font-family: var(--primary-font);
    font-size: var(--font-base);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}
.form-group input:focus {
    outline: none;
    border-color: var(--color-silver-600);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 0 0 3px rgba(100, 116, 139, 0.1);
    transform: translateY(-1px);
}
.form-group input::placeholder {
    color: var(--color-silver-400);
    opacity: 0.8;
}
#card-element {
    padding: 12px;
    border: 1px solid var(--color-silver-300);
    border-radius: 6px;
    background: white;
}
.error-message {
    color: #dc3545;
    font-size: var(--font-sm);
    margin-top: var(--space-xs);
}
.submit-button {
    width: 100%;
    padding: var(--space-md);
    background: linear-gradient(135deg, var(--color-silver-700) 0%, var(--color-silver-800) 100%);
    color: var(--color-silver-100);
    border: none;
    border-radius: 8px;
    font-size: var(--font-md);
    font-weight: var(--weight-bold);
    cursor: pointer;
    margin-top: var(--space-md);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.submit-button:hover::before {
    left: 100%;
}
.submit-button:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}
.submit-button:disabled {
    background: var(--color-silver-400);
    cursor: not-allowed;
}
.signature-container {
    text-align: center;
    margin: var(--space-lg) 0 var(--space-md) 0;
}

.checkout-signature {
    max-width: 180px;
    height: auto;
    opacity: 0.9;
    filter: none;
    border-radius: 8px;
}

/* Success Message Styles */
.success-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    padding: var(--space-lg);
    border-radius: 10px;
    border: 1px solid #c3e6cb;
    margin-bottom: var(--space-xl);
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    animation: slideIn 0.5s ease-out;
}

.success-message h3 {
    margin: 0 0 var(--space-sm) 0;
    font-size: var(--font-lg);
    font-weight: var(--weight-bold);
}

.success-message p {
    margin: 0;
    font-size: var(--font-base);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/*=========================================================================================
 XI. SINGLE LISTING PAGE (`template-listing.php`)
=========================================================================================*/

.single-listing .listing-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
    margin-bottom: var(--space-lg);
}

.single-listing .container {
    max-width: 900px;
    margin: 0 auto; /* Override default container margin */
}

.single-listing .listing-page-header .back-arrow-link {
    margin-bottom: 0; /* Remove margin from global back arrow style */
}

@media (min-width: 768px) {
    /* Collapse brick layout to single column */
    .content-brick {
        grid-template-columns: 1fr 1fr; /* Two columns on desktop */
    }
    .content-brick:nth-child(even) .brick-text {
        order: 2;
    }
    .content-brick:nth-child(even) .brick-image {
        order: 1;
    }
}

/* Wide Screen: Handle Expansion */



@media (max-width: 480px) {
    .brick-image img, .brick-text img { max-width: 90vw; max-height: 250px; }
}
.collection-featured .collection-image-col { width: 100%; }
.collection-featured .collection-meta-col { padding: var(--space-md); }
.collection-featured .collection-info { margin-top: var(--space-md); }
.collection-featured .collection-info .text-body { margin: 0 0 var(--space-md) 0; }
.collection-featured .purchase-link { display: inline-block; }


/* --- Immersive Collections Page --- */
.collection-card.is-expanded .view-link {
    font-family: 'Sulphur Point', sans-serif;
}

/*=========================================================================================
 NEW: ADVANCED MANUFACTURING PAGE STYLES
=========================================================================================*/
.page-advanced-manufacturing .content-area {
    max-width: 900px; /* Constrain the main content width */
    margin-left: auto;
    margin-right: auto;
}

.page-advanced-manufacturing .scrub-video-container {
    position: relative;
    width: 100%;
    margin: var(--space-lg) auto; /* Center the container */
    border-radius: 8px;
    overflow: hidden;
    cursor: grab;
}

.page-advanced-manufacturing .scrub-video-container:active {
    cursor: grabbing;
}

.page-advanced-manufacturing .scrub-video {
    display: block;
    width: 100%;
    height: auto;
}

.page-advanced-manufacturing .scrub-overlay {
    position: absolute;
    inset: 0; /* Cover the parent container exactly */
    background: rgba(0, 0, 0, 0.4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--primary-font);
    font-size: var(--font-lg);
    font-weight: var(--weight-bold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Allow clicks to pass through to the video container */
}

.page-advanced-manufacturing .scrub-video-container:hover .scrub-overlay,
.page-advanced-manufacturing .scrub-video-container.is-interacting .scrub-overlay {
    opacity: 0;
}

/*=========================================================================================
 XIII. COMPUTATIONAL DESIGN PAGE STYLES
=========================================================================================*/
.page-computational-design .hero-section {
    display: grid;
    grid-template-columns: 1fr; /* Mobile-first: single column */
    gap: var(--space-lg);
    align-items: center;
    margin-bottom: var(--space-3xl);
    text-align: left; /* Change from centered to left-aligned */
}

@media (min-width: 768px) {
    .page-computational-design .hero-section {
        grid-template-columns: 1fr 1fr; /* Two columns on desktop */
    }
}

.page-computational-design .hero-text-content {
    grid-column: 1 / -1; /* Make text span full width since image is gone */
    text-align: center;
    max-width: 70ch;
    margin: 0 auto;
}

.page-computational-design .hero-image-content {
    display: none; /* Hide the hero image container */
}

.page-computational-design .carousel-dots {
    display: none; /* Hide the old thumbnail container */
}

/* New Slider Control Styles */
.slider-control {
    position: relative;
    width: 100%; /* Narrower width */
    height: 48px; /* Match the height of the handle */
    margin: var(--space-lg) auto 0 auto; /* Use margin to create space, not height */
    display: flex;
    align-items: center;
}

.slider-track {
    position: absolute;
    width: 100%;
    height: 10px; /* 3x thicker line */
    background-color: var(--color-silver-300);
    border-radius: 3px;
}

.slider-dot {
    width: 25px; /* Larger dots */
    height: 25px; /* Larger dots */
    background-color: var(--color-silver-300);
    border-radius: 50%;
    position: absolute;
    transform: translateX(-50%);
    transition: background-color 0.3s ease;
}

/* Position each dot along the track */
.slider-dot[data-index="0"] { left: 0%; }
.slider-dot[data-index="1"] { left: 33.333%; }
.slider-dot[data-index="2"] { left: 66.666%; }
.slider-dot[data-index="3"] { left: 100%; }

.slider-handle {
    position: absolute;
    width: 28px; /* Proportionally larger handle */
    height: 28px; /* Proportionally larger handle */
    background-color: var(--color-silver-800); /* Darker 'black' handle */
    border-radius: 50%;
    transform: translateX(-50%);
    cursor: grab;
    border: 3px solid white; /* Solid white border */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); /* Softer, more pronounced drop shadow */
    z-index: 2; /* Ensure handle is on top of the track and dots */
}

.slider-handle:active {
    cursor: grabbing;
    transform: translateX(-50%) scale(1.1);
}

.page-computational-design .timeline-header { text-align: center; }

.page-computational-design .print-viewer-container .carousel-viewport {
    aspect-ratio: 1 / 1;
    background-color: var(--color-silver-100);
    border-radius: 8px;
}

.page-computational-design .print-status-display {
    background-color: var(--color-silver-100);
    border: 1px solid var(--color-silver-200);
    border-radius: 8px;
    padding: var(--space-md);
    /* margin-top: var(--space-sm); */ /* This was causing the unwanted gap */
}

.page-computational-design .print-title {
    font-family: var(--primary-font);
    font-weight: var(--weight-bold);
    color: var(--color-silver-700);
    font-size: var(--font-sm);
}

.page-computational-design .print-progress {
    width: 100%;
    height: 4px;
    background-color: var(--color-silver-200);
    border-radius: 2px;
    margin: var(--space-sm) 0;
    overflow: hidden;
}

.page-computational-design .print-layer-bar {
    width: 0%;
    height: 100%;
    background-color: var(--color-silver-500);
    transition: width 0.4s ease;
}

.page-computational-design .evolution-title,
.page-computational-design .timeline-title,
.page-computational-design .emotional-title {
    font-family: var(--primary-font);
    font-size: var(--font-3xl);
    font-weight: var(--weight-light);
    text-align: center;
    margin-bottom: var(--space-lg);
}

.page-computational-design .timeline-title {
    color: var(--color-silver-500); /* Lighter color as requested */
    font-weight: var(--weight-light); /* Already 200 */
}

/* Masonry-style layout for the timeline */
.page-computational-design .timeline-stages {
    margin-top: var(--space-2xl);
    padding: var(--space-lg) 0;
}

.page-computational-design .timeline-stage {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column for mobile */
    gap: var(--space-lg);
    align-items: center;
    margin-bottom: var(--space-xl); /* Reduced margin between stages */
    opacity: 0; /* Initially hidden for animation */
    transform: translateY(30px); /* Start slightly lower for animation */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* The class added by JS when the element is scrolled into view */
.page-computational-design .timeline-stage.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.page-computational-design .stage-text-content {
    text-align: left;
}

.page-computational-design .stage-title {
    font-family: var(--primary-font); /* Avril Fatface */
    font-size: var(--font-3xl);
    font-weight: var(--weight-light); /* Light weight */
    color: var(--color-silver-500); /* Light color */
    margin-bottom: var(--space-sm);
}

.page-computational-design .stage-description {
    font-size: var(--font-lg); /* Increase for readability */
    line-height: 1.7;
}

.page-computational-design .sculpture-viewer {
    max-width: 700px;
    margin: var(--space-2xl) auto; /* Center align with vertical spacing */
}

.page-computational-design .timeline-footer-text {
    text-align: center;
    max-width: 65ch;
    margin: 0 auto;
}

.page-computational-design .footer-title {
    font-family: var(--primary-font); /* Avril Fatface */
    font-size: var(--font-3xl);    
    font-weight: var(--weight-light);
    color: var(--color-silver-500);
    margin-bottom: var(--space-md);
}

.page-computational-design .timeline-footer-text p {
    font-size: var(--font-lg); /* Larger text */
    line-height: 1.8; /* Increased line padding */
}

/* Apply two-column layout on larger screens */
@media (min-width: 769px) {
    .page-computational-design .timeline-stage {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Reverse order for even-numbered stages */
    .page-computational-design .timeline-stage:nth-child(even) .stage-image {
        order: 2;
    }

    .page-computational-design .timeline-stage:nth-child(even) .stage-text-content {
        order: 1;
    }
}

/* NEW: Animation for highlighting updated content */
.is-updating {
    animation: flash-bg 0.7s ease-out;
}

@keyframes flash-bg {
    0% {
        background-color: rgba(100, 116, 139, 0);
    }
    50% {
        background-color: rgba(100, 116, 139, 0.1);
    }
    100% {
        background-color: rgba(100, 116, 139, 0);
    }
}

/*=========================================================================================
 XIV. EXCLUSIVE CREATION PAGE STYLES
=========================================================================================*/

.page-exclusive-creation .page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

.page-exclusive-creation .fabrication-intro {
    text-align: left;
    margin-bottom: var(--space-3xl);
}

.page-exclusive-creation .hero-title {
    font-family: var(--secondary-font);
    font-size: var(--font-5xl);    
    font-weight: var(--weight-light);
    color: var(--color-silver-800);
    margin-bottom: var(--space-sm);
}

.page-exclusive-creation .hero-subtitle {
    font-family: var(--primary-font); /* Sulphur Point */
    font-size: var(--font-2xl); /* Enlarged */
    font-weight: var(--weight-light);
    color: var(--color-silver-600);
    margin-bottom: var(--space-lg);
}

.page-exclusive-creation .hero-quote {
    font-family: var(--secondary-font);
    font-size: var(--font-xl); /* Enlarged */
    color: var(--color-silver-700);
    max-width: 65ch; /* Limit line length for readability */
    line-height: 1.6;
}

.page-exclusive-creation .content-area {
    max-width: 720px;
    margin: 0 auto;
}

.page-exclusive-creation .section-heading {
    font-family: var(--primary-font); /* Sulphur Point */
    font-size: var(--font-3xl); /* Enlarged */
    font-weight: var(--weight-light);
    color: var(--color-silver-800);
    margin-bottom: var(--space-lg);
    margin-top: var(--space-3xl);
    border-bottom: 1px solid var(--color-silver-200);
    padding-bottom: var(--space-sm);
}

.page-exclusive-creation .content-block h3 {
    font-family: var(--primary-font); /* Sulphur Point */
    font-size: var(--font-xl); /* Enlarged */
    font-weight: var(--weight-light);
    color: var(--color-silver-700);
    margin-bottom: var(--space-md);
}

.page-exclusive-creation .text-content {
    font-family: var(--secondary-font);
    font-size: var(--font-lg); /* Enlarged for more presence */
    line-height: 1.7;
    color: var(--color-silver-700);
    margin-bottom: var(--space-lg);
}

.page-exclusive-creation .highlight {
    background-color: rgba(100, 116, 139, 0.08);
    padding: 2px 4px;
    border-radius: 4px;
}

.page-exclusive-creation .model-viewer {
    margin: var(--space-2xl) 0;
    background-color: var(--color-silver-200);
    border-radius: 8px;
    padding: var(--space-md);
    max-width: 600px; /* Constrain width */
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 1 / 1; /* Make it a perfect square */
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-exclusive-creation .model-display img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure image fits without being cropped */
}

.page-exclusive-creation .related-section {
    margin-top: var(--space-3xl);
}

.page-exclusive-creation .specimen-section {
    border: 1px solid var(--color-silver-200);
    border-radius: 8px;
    padding: var(--space-lg);
    margin: var(--space-2xl) 0;
}

.page-exclusive-creation .specimen-title {
    font-size: var(--font-lg);
    margin-bottom: var(--space-md);
}

.page-exclusive-creation .spec-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-silver-200);
    font-size: var(--font-sm);
}

.page-exclusive-creation .spec-row:last-child {
    border-bottom: none;
}

.page-exclusive-creation .spec-label {
    color: var(--color-silver-500);
}

.page-exclusive-creation .spec-value {
    font-weight: var(--weight-bold); /* Bolder value */
    color: var(--color-silver-800);
    font-size: var(--font-base); /* Slightly larger */
}

.page-exclusive-creation .related-link {
    display: block;
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-sm);
    background-color: var(--color-silver-100);
    border: 1px solid var(--color-silver-200);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-silver-700);
    transition: all 0.2s ease;
}
.page-exclusive-creation .related-link:hover {
    background-color: var(--color-silver-200);
    border-color: var(--color-silver-400);
    transform: translateY(-2px);
}

.page-exclusive-creation .related-link-icon {
    margin-right: var(--space-xs);
    transition: transform 0.2s ease;
}

/* NEW: Refined viewer for Exclusive Creation page */
.exclusive-viewer-section {
    margin: var(--space-2xl) 0;
}

.viewer-main-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: var(--color-silver-100);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: var(--space-md);
    border: 1px solid var(--color-silver-200);
    cursor: pointer;
    transition: box-shadow 0.3s ease;
}

.viewer-main-image:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

.viewer-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.viewer-thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    max-width: 400px; /* Constrain the width of the thumbnails */
    margin: 0 auto; /* Center them */
}

.viewer-thumb {
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.viewer-thumb.active {
    border-color: var(--color-silver-800);
}

/*=========================================================================================
 * XIV. LISTING PAGE ARTICLE IMAGE STYLES
 *=========================================================================================*/

.single-listing {
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Mobile-first: single column layout */
.content-brick {
    margin-bottom: var(--space-2xl);
}

.brick-text {
    max-width: 65ch;
    margin: 0 auto;
}

.brick-image {
    margin: var(--space-lg) auto; /* Center image with vertical spacing */
    text-align: center; /* Center the image within the block */
}

.brick-image img {
    width: 100%;
    max-width: 400px; /* Max width of 400px */
    height: auto;
    border-radius: 4px;
    display: inline-block; /* Allow centering via text-align */
}

/* Desktop: two-column layout */
@media (min-width: 768px) {
    .content-brick {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
        align-items: center;
    }
    .content-brick:nth-child(even) .brick-text {
        order: 2;
    }
}

/* --- E-commerce Two-Column Layout --- */
.product-layout-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile-first: single column */
    gap: var(--space-xl);
    margin-top: var(--space-lg);
}

@media (min-width: 768px) {
    .product-layout-grid {
        grid-template-columns: 1fr 1fr; /* Two columns on desktop */
        align-items: start; /* Align items to the top */
    }
}

.product-details-column {
    position: sticky; /* Make details sticky on desktop */
    top: var(--space-xl);
}

.product-details-column .listing-title {
    margin-bottom: var(--space-md);
}

.product-details-column .listing-excerpt {
    font-size: var(--font-base);
    line-height: 1.6;
    color: var(--color-silver-700);
    margin-bottom: var(--space-lg);
}

.product-details-column .purchase-button-container {
    justify-content: flex-start; /* Left-align button in this context */
    margin: 0;
}

/* --- Product Gallery Styles --- */
.product-gallery-main-viewer img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background-color: var(--color-silver-100);
}

.product-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.thumbnail-item {
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.thumbnail-item.active {
    border-color: var(--color-silver-800);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*=========================================================================================
 * XV. TRANQUILITY / COLLECTIONS PORTAL
 *=========================================================================================*/

.page-tranquility .container {
    max-width: 1400px;
}

.collections-portal-header {
    text-align: center;
    margin: var(--space-2xl) 0;
    max-width: 1200px; /* NEW: Constrain the header width */
    margin-left: auto; /* NEW: Center the header */
    margin-right: auto; /* NEW: Center the header */
    padding: 0 var(--space-md);
}

.portal-title {
    font-family: var(--primary-font);
    font-size: var(--font-5xl);
    font-weight: var(--weight-light);
    color: var(--color-silver-800);
    margin-bottom: var(--space-sm);
}

.portal-subtitle {
    font-family: var(--secondary-font);
    font-size: var(--font-lg);
    color: var(--color-silver-600);
}

/* Collection Navigation Tabs */
.collection-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--color-silver-200);
    max-width: 1200px; /* NEW: Constrain the tabs width */
    margin-left: auto; /* NEW: Center the tabs */
    margin-right: auto; /* NEW: Center the tabs */
    padding-bottom: var(--space-lg);
}

.collection-tab-link {
    padding: var(--space-sm) var(--space-md);
    font-family: var(--secondary-font);
    font-size: var(--font-base);
    color: var(--color-silver-600);
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.collection-tab-link:hover {
    background-color: var(--color-silver-100);
}

.collection-tab-link.active {
    background-color: var(--color-silver-800);
    color: var(--color-silver-100);
}

/* Collection Content Panels */
.collection-panel {
    display: none; /* Hidden by default, JS will manage visibility */
}

.collection-panel.active {
    display: block;
}

.collection-product-grid {
    display: grid;
    /* Use auto-fit to center the items and prevent them from stretching too wide. */
    grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
    gap: var(--space-xl);
    justify-content: center; /* Center the grid items within the container */
}

.product-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card-image {
    aspect-ratio: 4 / 5;
    background-color: var(--color-silver-100);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.product-card-info {
    text-align: center;
}

.product-card-title {
    font-family: var(--secondary-font);
    font-size: var(--font-lg);
    font-weight: var(--weight-regular);
    color: var(--color-silver-800);
}

.product-card-price {
    font-family: var(--secondary-font);
    font-size: var(--font-base);
    color: var(--color-silver-600);
}

/*=========================================================================================
 * XVI. AMERICAN MADE BANNER
 *=========================================================================================*/
.american-made-banner-section {
    padding: var(--space-xl) 0;
}

.american-made-banner {
    display: block;
    color: var(--color-silver-100);
    text-decoration: none;
    padding: var(--space-2xl) var(--space-xl); /* Increase padding for more visual impact */
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 41, 59, 0.1);
    position: relative;
    overflow: hidden;
    /* Image-specific styles */
    background-size: cover;
    background-position: center center;
    background-color: var(--color-silver-800); /* Fallback color */
}

.american-made-banner:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(30, 41, 59, 0.2);
}

.american-made-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.6); /* Dark overlay for text legibility */
    z-index: 1;
}

.american-made-banner .banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    text-align: center;
    position: relative; /* Ensure content is above the overlay */
    z-index: 2;
}

.american-made-banner .banner-icon {
    font-size: var(--font-2xl);
    color: var(--color-silver-300);
}

.american-made-banner .banner-text {
    font-family: var(--secondary-font);
    font-size: var(--font-lg);
}
