/*
 * 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 */

    /* Deckle texture source - acts as both fill and fiber signal for the emboss effect */
    --paper-texture: none; /* Fallback - Injected by PHP on home page */
}

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);
    -webkit-font-smoothing: antialiased;
    line-height: 1.65; /* improved measure for paragraphs */
    -moz-osx-font-smoothing: grayscale;
    min-width: 500px; /* Enforce a minimum width for the entire site */
    background-color: var(--background-color); /* Default fallback background */
}

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

/* 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: 600; /* A thicker font is needed to carry an emboss effect */
}

.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 */
}

/*=========================================================================================
 * DECKLE EMBOSS EFFECT STYLES
=========================================================================================*/

/* =========================================================================================
 * EMBOSSED PAPER EFFECT - OPTIMIZED SETTINGS
 * Light Angle: 245° | Elevation: 25° | Material-correct substrate rendering
 ========================================================================================= */

/* Base embossed title class */
h2.title-embossed {
    /* Typography - make it thick and bold */
    font-family: 'Arial Black', 'Arial Bold', sans-serif;
    font-size: 3rem; /* Reduced by half from 6rem */
    font-weight: 900;
    text-align: center;
    letter-spacing: 0.05em;
    margin: 0;
    padding: 0.2em 0;
    position: relative;
    
    /* CRITICAL: color: transparent with background-clip: text */
    color: transparent;
    background-image: var(--paper-texture);
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect for texture */
    -webkit-background-clip: text;
    background-clip: text;
    
    /* CRITICAL: 12-layer text-shadow for smoother gradients */
    text-shadow: 
        /* Shadows: Optimized to 3 layers for performance. Tighter and lighter. */
        0.5px 1px 1px rgba(0, 0, 0, 0.20),  /* Sharp inner shadow for definition */
        2.5px 5px 5px rgba(0, 0, 0, 0.10),  /* Mid-tone shadow for body */
        6px 12px 12px rgba(0, 0, 0, 0.05), /* Soft outer shadow for gradient */
        
        /* Highlights: Optimized to 3 layers. Brighter for a lighter feel. */
        -0.5px -1px 1px rgba(255, 255, 255, 0.95), /* Sharp inner highlight */
        -2.5px -5px 5px rgba(255, 255, 255, 0.4),  /* Mid-tone highlight */
        -6px -12px 12px rgba(255, 255, 255, 0.15); /* Soft outer highlight */

    /* SVG filter for rounded bevel surface lighting */
    filter: url(#emboss-optimized);
}

/* Stronger version for better visibility if needed */
.title-embossed-strong {
    font-family: 'Arial Black', 'Arial Bold', sans-serif;
    font-size: 6rem;
    font-weight: 900;
    text-align: center;
    letter-spacing: 0.05em;
    margin: 0;
    padding: 0.2em 0;
    position: relative;
    
    color: transparent;
    background-image: var(--paper-texture);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 
        1px 2px 0 rgba(0, 0, 0, 0.18),
        3px 6px 2px rgba(0, 0, 0, 0.14),
        4px 8px 4px rgba(0, 0, 0, 0.11),
        5px 10px 6px rgba(0, 0, 0, 0.08),
        -1px -1px 0 rgba(255, 255, 255, 0.95),
        -3px -3px 2px rgba(255, 255, 255, 0.75),
        -4px -4px 4px rgba(255, 255, 255, 0.60),
        -5px -5px 8px rgba(255, 255, 255, 0.40);
    filter: url(#emboss-optimized) contrast(1.2) brightness(0.98);
}

/* Subtitle variant (proportionally scaled from the example) */
.subtitle-embossed {
    font-family: 'Source Serif Pro', serif; /* Using Source Serif Pro as a suitable serif font */
    font-size: 15px; /* Reduced by half from 30px (var(--font-3xl)) */
    font-weight: var(--weight-regular); /* Adjusted for better visibility */
    text-align: center;
    letter-spacing: 0.2em;
    margin: var(--space-md) 0 0 0; /* Using variables for spacing */
    padding: 0.1em 0;
    text-transform: uppercase;
    position: relative;
    
    color: transparent;
    background-image: var(--paper-texture);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    -webkit-background-clip: text;
    background-clip: text;
    
    /* Proportionally scaled text-shadow from the example */
    /* Using the same logic as the main title, but with smaller distances */
    text-shadow: 
        /* Shadows */
        calc(0.42 * 0.5px) calc(0.91 * 0.5px) 0 rgba(0, 0, 0, 0.06),
        calc(0.42 * 2px) calc(0.91 * 2px) 3px rgba(0, 0, 0, 0.10),
        /* Highlights */
        calc(-0.42 * 0.5px) calc(-0.91 * 0.5px) 0 rgba(255, 255, 255, 0.75),
        calc(-0.42 * 2.5px) calc(-0.91 * 2.5px) 4px rgba(255, 255, 255, 0.30);
    
    filter: url(#emboss-optimized-subtle); /* Assuming you have this SVG filter defined */
}

/* Mobile fix for background-attachment: fixed */
@media (max-width: 768px) {
    .title-embossed, .title-embossed-strong {
        background-attachment: scroll;
    }
}

/* Target the specific H2 elements on the home page */
.travail-section > h2,
.tranquility-section > h2,
.process-carousel-wrapper > h2 {
    padding: .3em .6em;    /* gives “material” to interact with */
}

/* 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;
}

/* Standard Sub-Page Header */
.site-header-standard {
    display: flex;
    justify-content: center; /* Center the logo by default */
    align-items: center;
    padding: var(--space-lg) 0; /* Use variable for consistent spacing */
    margin-bottom: 3rem;
    position: relative; /* Needed for the absolute-positioned back chevron */
    background: transparent; /* Ensure it has no background unless specified */
    border-bottom: none; /* Remove default border */
}

/* NEW: Layout for standard header with contact form */
.site-header-standard.has-contact-system {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
}
.header-standard-left { justify-self: start; }
.header-standard-center { justify-self: center; }
.header-standard-right { justify-self: end; }

@media (max-width: 767px) {
    .header-standard-right {
        display: none; /* The mobile trigger is fixed, so we hide the desktop form container */
    }
}
/* Hide logo by default and show on header hover */
.site-header-standard .site-logo-link {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.site-header-standard:hover .site-logo-link {
    opacity: 1;
}




/* 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 */
}

/* NEW: Global accessible focus styles for buttons */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-silver-400);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.2); /* A subtle glow */
}
button {
    border: none; /* Remove default button borders */
}

.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 (`template-collections.php`)
=========================================================================================*/
.collection-detail {
    display: grid;
    /* Create a responsive grid: 3 columns on large screens, 2 on medium, 1 on small */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-xl);
    display: none; /* Hidden by default, JS will show the active one */
}

.product-carousel-container {
    /* REMOVED: max-width and margin: auto to allow it to be a grid item */
    width: 100%; /* Take up the full space of its grid cell */
}

.product-main-display {
    position: relative;
    /* NEW: Use flexbox to center the image within the container */
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 5; /* Maintain the container's aspect ratio */
    background-color: var(--color-silver-100); /* Add a subtle background for letterboxing */
    border-radius: 4px;
}

.product-main-image {
    /* NEW: Constrain the image and maintain its aspect ratio */
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* This is the key to fitting the image without distortion */
}

.product-price {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border-radius: 4px;
    padding: 0.5rem 1rem;
}

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

.product-thumb {
    width: 100%; /* Allow thumbnail to fill its grid cell */
    aspect-ratio: 1 / 1; /* Make thumbnails square */
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
    border: 2px solid transparent;
    border-radius: 4px;
}

.product-thumb.active {
    opacity: 1;
    border-color: var(--color-silver-800);
}

/* 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);
    justify-content: space-between; /* Adjust for contact form */
    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;
}

/* 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 */
}

/* NEW: Link wrapper for the Tranquility section */
.tranquility-section-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}


.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);
    background-color: transparent; /* Allow global paper to show through */
}

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

.materiality-feature-section {
    padding: var(--space-3xl) var(--space-md); /* Added generous vertical padding */
    text-align: center; /* Center the content within the section */
}
.materiality-feature-section .feature-content {
    max-width: var(--content-max-width); /* Constrain content width for readability */
    margin: 0 auto;
}
.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;
    -webkit-backdrop-filter: blur(5px);
    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);
}

/* 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);
}

/* 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);
}
/*=========================================================================================
 VIII. SINGLE LISTING PAGE (`template-listing.php`)
=========================================================================================*/
.single-listing .container {
    max-width: 1800px;
    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;
}

.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;
    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;
    background-color: rgba(255, 255, 255, 0.2);
        max-height: 60vh; /* allow images to grow but cap at viewport fraction */
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.thumbnail-chevron {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.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 */
    }

    .single-listing .product-layout-grid {
        grid-template-columns: 2fr 1fr; /* Give more space to the gallery */
        gap: var(--space-3xl); /* Increase gap */
    }

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

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

    .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) {
    .single-listing .container {
        max-width: 1600px; /* Wider container for better desktop utilization */
        padding: 4rem 3rem; /* Even more padding */
    }

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

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

/* Ultra-wide screens */
@media (min-width: 1920px) {
    .single-listing .container {
        max-width: 1800px; /* Cap the width on very large screens */
    }
}

/* Fix for listing page containers on larger screens */
@media (min-width: 1024px) {
}

@media (min-width: 1200px) {
}

/* 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);
    }
}

/* NEW: Increase contrast for images in the masonry carousel on the home page */
.masonry-carousel-section .masonry-carousel__image-link img {
    filter: contrast(1.15); /* Increase contrast by 15% */
    transition: filter 0.3s ease;
}

/*=========================================================================================
 * NEW: HOME PAGE INTERMEDIATE IMAGE
=========================================================================================*/
.intermediate-image-container {
    /* overflow: hidden; is removed to allow the image to break the container bounds */
    display: flex;
    align-items: center;
    justify-content: center;
}

.intermediate-image-container img {
    width: 100%; /* Image will scale with the container's width */
    height: auto; /* Maintain natural aspect ratio */
    object-fit: contain; /* Ensure the entire image is visible without cropping */
}
/*=========================================================================================
 * NEW: LISTING PAGE ACCORDION STYLES
=========================================================================================*/
.details-accordions {
    margin-top: var(--space-2xl);
    border-top: 1px solid var(--color-silver-200);
}

.accordion-item {
    border-bottom: 1px solid var(--color-silver-200);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: var(--space-md) 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--secondary-font);
    font-size: var(--font-lg);
    color: var(--color-silver-800);
    font-weight: var(--weight-regular);
}

.accordion-header:hover {
    color: var(--color-silver-900);
}

.accordion-icon {
    width: 20px;
    height: 20px;
    color: var(--color-silver-500);
    transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
    font-size: var(--font-base);
    color: var(--color-silver-700);
}

.accordion-content > *:first-child {
    padding-bottom: var(--space-lg);
}

.accordion-content .quicklink {
    display: inline-block;
    margin-top: var(--space-sm);
}
/*=========================================================================================
 XI. NAVIGATION SCROLLBAR (HOME PAGE)
=========================================================================================*/
.nav-scrollbar {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 100;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    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;
}

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

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

/* Ensure all carousel tracks display slides horizontally */
.listing-carousel-track,
.carousel__track {
    display: flex;
    transition: transform 0.5s ease;
}

/* Ensure all carousel slides are sized correctly within the track */
.listing-carousel-slide,
.carousel__slide {
    display: flex; /* Use flex to center the image within the slide */
    align-items: center;
    justify-content: center;
    background-color: var(--color-silver-100); /* Clean background for letterboxing */
    min-width: 100%;
    flex-shrink: 0;
}

.listing-carousel-slide img {
    width: 100%;
    height: auto; /* Allow natural aspect ratio */
    max-height: 85vh; /* Prevent excessively tall images from dominating the viewport */
    object-fit: contain; /* IMPORTANT: Show the whole artwork without cropping */
    display: block;
    border-radius: 8px; /* Add minimal rounded corners */
    min-height: 400px; /* Ensure a comfortable minimum viewing height */
}

.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 */
}

/* 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);
    }
}





/* --- 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;
}

/* NEW: Styles for the video scrubber progress bar */
.page-advanced-manufacturing .scrub-progress {
    position: absolute; /* Position it at the bottom of the container */
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px; /* Give it a visible height */
    background: rgba(255, 255, 255, 0.2); /* A background for the track */
    border-radius: 5px;
    cursor: pointer;
    z-index: 3; /* Ensure it's above the video and overlay */
    margin-top: var(--space-md); /* Add some space below the video */
}

.page-advanced-manufacturing .scrub-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%; /* Initial width, will be set by JS */
    background-color: var(--color-silver-500); /* Color for the progress indicator */
    border-radius: 5px;
}

/*=========================================================================================
 XIII. COMPUTATIONAL DESIGN PAGE STYLES
=========================================================================================*/
.page-computational-design .hero-section {
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-computational-design .hero-section-grid {
    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 {
        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 .print-viewer-container {
    max-width: 800px; /* Set a max-width to prevent stretching */
    margin-left: auto;
    margin-right: auto;
}

/* 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);
    }
}

/* NEW: Styles for the "Interpretive Process" page */
.page-computational-design .interpretive-lenses-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-4xl); /* Increased gap for more breathing room */
    max-width: 1000px;
    margin: 0 auto;
}

.page-computational-design .lens-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

@media (min-width: 768px) {
    .page-computational-design .lens-item {
        grid-template-columns: 1fr 1fr;
    }

    .page-computational-design .lens-item.reverse .lens-text-content {
        order: 2;
    }

    .page-computational-design .lens-item.reverse .lens-image-content {
        order: 1;
    }
}

.page-computational-design .lens-text-content {
    padding: 0 var(--space-md);
}

.page-computational-design .lens-title {
    font-family: var(--primary-font);
    font-size: var(--font-2xl); /* Slightly smaller for better balance with body text */
    font-weight: var(--weight-light);
    color: var(--color-silver-700);
    margin-bottom: var(--space-md);
    line-height: 1.2; /* Tighter line height for headlines */
}

.page-computational-design .lens-description {
    font-family: var(--secondary-font);
    font-size: var(--font-lg);
    line-height: 1.8; /* More generous line height for readability */
    color: var(--color-silver-700); /* Darker for better contrast */
    max-width: 55ch;
}

.page-computational-design .lens-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* Softer shadow */
    background-color: var(--color-silver-100);
}

/* NEW: Add a main page wrapper for consistent containment on large screens */
.page-computational-design .page-wrapper {
    max-width: 1400px; /* Set a max-width for the entire page content */
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* NEW: Styles for the three-image row */
.page-computational-design .three-image-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin: var(--space-3xl) 0;
    max-width: 1200px; /* Constrain the row itself */
    margin-left: auto;
    margin-right: auto;
}
.page-computational-design .three-image-row .image-item {
    /* NEW: Enforce a consistent aspect ratio for perfect alignment */
    aspect-ratio: 4 / 5;
    border-radius: 8px;
    overflow: hidden;
}
.page-computational-design .three-image-row .image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* NEW: Styles for the "On Form and Time" page */
.page-computational-design .content-area {
    max-width: 800px;
    margin: 0 auto;
}

.page-computational-design .form-time-hero {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.page-computational-design .form-time-title {
    font-family: var(--primary-font);
    font-size: var(--font-5xl);
    font-weight: var(--weight-light);
    color: var(--color-silver-900);
    margin-bottom: var(--space-md);
}
.page-computational-design .form-time-subtitle {
    font-family: var(--secondary-font);
    font-size: var(--font-lg);
    line-height: 1.5;
    color: var(--color-silver-700);
    max-width: 65ch;
    margin: 0 auto var(--space-2xl) auto;
}

.page-computational-design .form-time-hero-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-width: 70%; /* NEW: Constrain hero image width */
    margin: 0 auto; /* NEW: Center the constrained image */
    border-radius: 8px;
    overflow: visible;
}

.page-computational-design .form-time-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This causes the crop */
    /* NEW: This controls the focal point of the crop. 'center top' prioritizes the top of the image. */
    object-position: center middle; 
}

.page-computational-design .form-time-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.page-computational-design .text-block p {
    font-family: var(--secondary-font);
    font-size: var(--font-xl);
    line-height: 1.7;
    color: var(--color-silver-800);
}

.page-computational-design .inline-image-block img {
    width: 100%;
    border-radius: 8px;
}

/*=========================================================================================
 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;
    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 */
    }

    /* This is the key for the improved layout */
    .product-details-column {
        position: sticky;
        top: var(--space-xl); /* Stick 40px from 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; /* Keep as flexbox */
    justify-content: flex-start; /* Align tabs to the start for scrolling */
    flex-wrap: nowrap; /* CRITICAL: Prevent tabs from wrapping to the next line */
    overflow-x: auto; /* CRITICAL: Enable horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--color-silver-200);
    max-width: 1200px;
    margin-left: auto; /* Keep centered on the page */
    margin-right: auto; /* Keep centered on the page */
    padding-bottom: 0; /* Remove padding to align tabs with the border */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

/* Hide scrollbar for Chrome, Safari, and Opera */
.collection-tabs::-webkit-scrollbar {
    display: none;
}

.collection-tab-link {
    white-space: nowrap; /* Ensure tab text does not wrap */
    flex-shrink: 0; /* Prevent tabs from shrinking to fit */
    padding: var(--space-sm) var(--space-md);
    font-family: var(--secondary-font);
    font-size: var(--font-md); /* Slightly larger font */
    color: var(--color-silver-500); /* Muted color for inactive tabs */
    text-decoration: none;
    /* NEW: Folder tab styling */
    border: 1px solid transparent; /* Placeholder for border alignment */
    border-bottom: none; /* No bottom border on the tab itself */
    border-radius: 8px 8px 0 0; /* Rounded top corners */
    margin-bottom: -1px; /* Pull tab down to overlap the container's bottom border */
    background-color: transparent; /* No fill color */
    transition: all 0.2s ease;
}

/* On smaller screens, reduce padding and font size to make tabs more compact */
@media (max-width: 768px) {
    .collection-tab-link {
        padding: var(--space-xs) var(--space-sm);
        font-size: var(--font-sm);
    }
}

.collection-tab-link:hover {
    background-color: var(--color-silver-100); /* Subtle background on hover */
    color: var(--color-silver-700);
}

.collection-tab-link.active {
    /* NEW: Active folder tab styling */
    background-color: var(--background-color); /* Match page background to "cut out" the border */
    color: #00bfff; /* Electric blue for the text */
    font-weight: var(--weight-bold);
    border-color: var(--color-silver-200); /* Match the container's border */
    border-bottom: 1px solid var(--background-color); /* Hide bottom border by matching background */
    transform: translateY(0); /* Ensure it's not lifted */
    box-shadow: none; /* Remove any previous shadow */
}

/* Collection Content Panels */
.collection-tab-link.active {
    /* NEW: Active folder tab styling */
    background-color: var(--background-color); /* Match page background to "cut out" the border */
    color: var(--color-silver-800);
    font-weight: var(--weight-bold);
    border-color: var(--color-silver-200); /* Match the container's border */
    border-bottom: 1px solid var(--background-color); /* Hide bottom border by matching background */
    transform: translateY(0); /* Ensure it's not lifted */
    box-shadow: none; /* Remove any previous shadow */
}

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

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

/* NEW: Style for the dynamic collection title */
.current-collection-title {
    font-family: var(--secondary-font);
    font-size: var(--font-2xl);
    font-weight: var(--weight-regular);
    color: var(--color-silver-700);
    text-align: center;
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-silver-200);
    padding-bottom: var(--space-md);
}

.collection-product-grid {
    display: grid;
    /* NEW: Create a responsive grid with a minimum of 3 columns on larger screens.
       Each column will be between 280px and 300px wide. */
    grid-template-columns: repeat(auto-fit, minmax(280px, 300px));
    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: 4px; /* Subtler rounding */
    overflow: hidden;
    margin-bottom: var(--space-sm); /* Tighter spacing */
    transition: box-shadow 0.3s ease;
}

.product-card:hover .product-card-image {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.product-card-info {
    /* NEW: Use flexbox to align title and price on one row */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
}

.product-card-title {
    font-family: var(--secondary-font);
    font-size: var(--font-base); /* Adjusted font size */
    font-weight: var(--weight-regular);
    color: var(--color-silver-800);
    text-align: left; /* Align title to the left */
    /* Prevent text from wrapping and overflowing */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card-price {
    font-family: var(--secondary-font);
    font-size: var(--font-sm); /* Adjusted font size */
    color: var(--color-silver-600);
    font-weight: var(--weight-medium);
    flex-shrink: 0; /* Prevent price from shrinking */
}

/* On smaller screens, stack title and price for readability */
@media (max-width: 767px) {
    .product-card-title {
        font-size: var(--font-sm); /* Shrink font on mobile */
    }
}

/*=========================================================================================
 * 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);
}
