:root {
    --bg-color: #F7F5F2;
    /* Off-white / Eggshell */
    --card-bg-color: #FFFFFF;

    --text-color: #1A1A1A;
    --muted-color: #7A7A7A;
    --border-color: #E6E6E6;
    --accent-color: #E06B2D;
    --accent-hover: #C85E28;

    --font-heading: 'IBM Plex Sans', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;

    --container-width: 1200px;
    --gap: 2rem;
    --card-ratio: 0.8;
    /* 4:5 */

    /* Modern additions */
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.05);
    --radius-sm: 4px;
    --radius-pill: 999px;
    --transition-base: all 0.3s ease;

    --hero-bg-tone: #ffffff;
    /* Lighter tone for separation */

    /* Header Heights */
    --topbar-height: 40px;
    /* Blurb Desktop Top Bar */
    --header-height: 120px;
    /* Blurb Desktop Main Header */

    --topbar-height-mobile: 44px;
    /* Ergonomic touch target */
    --header-height-mobile: 80px;

    /* Symmetric Spacing Variables */
    --sofe-topbar-pad-y: 5px;
    /* Computed from .topbar-inner padding */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Sticky Footer: Flex Column Wrapper */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    margin: 0;
    position: relative;
    /* Context for noise */
}

body>main {
    flex: 1 0 auto;
    min-height: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

main.container {
    flex: 1 0 auto;
}

header {
    background: var(--hero-bg-tone);
    /* Use lighter tone */
    position: relative;
    z-index: 100;
    border-bottom: none;
}

header .nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Logo Left, Settings Right */
    position: relative;
    height: var(--header-height);
    margin: 0 auto;
    width: 100%;
    /* Default Max Width handling via media queries below */
}

/* === 1. TOP BAR === */
.topbar {
    background: #191919;
    color: #FAFAFA;
    font-size: 0.85rem;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-left a {
    color: #FAFAFA;
    opacity: 0.8;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
}

.topbar-left a:hover {
    opacity: 1;
}

/* Global Header Logo Wrapper (Ensures Row Layout on Desktop) */
.header-logo-wrap {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
    height: 100%;
}

/* === 2. DESKTOP HEADER (>= 1280px) === */
@media (min-width: 1280px) {
    header .nav-wrapper {
        padding: 0 48px;
        /* Strict Reference */
        max-width: 100%;
        /* Fluid within padding */
    }

    .search-form.desktop-only {
        display: block;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 38%;
        /* Visual center of gravity - Reduced ~30% */
        max-width: 450px;
        margin-top: -3px;
        /* Visual alignment correction */
    }

    .header-logo {
        height: 52.5px !important;
        /* 42px * 1.25 */
        width: auto;
    }

    .header-icon {
        max-height: 44px;
        /* Matches text visual weight */
        height: auto;
        width: auto;
    }
}

/* === 3. LAPTOP HEADER (1024px - 1279px) === */
@media (min-width: 1024px) and (max-width: 1279px) {
    header .nav-wrapper {
        padding: 0 32px;
        /* Tighter padding */
        height: 100px;
        /* Slightly tighter height */
    }

    .search-form.desktop-only {
        display: block;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 35%;
        /* Slightly narrower - Reduced ~30% */
    }

    .header-logo {
        height: 47.5px !important;
        /* 38px * 1.25 */
    }

    .header-icon {
        max-height: 38px;
        height: auto;
        width: auto;
    }
}

/* === 4. TABLET/MOBILE HEADER (< 1024px) === */
@media (max-width: 1023px) {
    header .nav-wrapper {
        height: var(--header-height-mobile);
        padding: 0 20px;
    }

    /* Hide Desktop Search completely */
    .search-form.desktop-only {
        display: none !important;
    }

    /* Center Logo or Left Align with breathing room.
       Blurb Mobile: Logo Centered often, or Left.
       User said: "Logo only... Logo horizontally centered OR left-aligned"
       Let's go with Center for main mobile header to avoid empty space if search is gone.
    */
    /* Left Align Logo (Blurb-like) */
    .header-logo-wrap {
        display: flex;
        align-items: center;
        gap: 8px;
        /* Gap between icon and text */
        margin: 0;
        padding: 0;
    }

    .header-logo {
        height: 45px !important;
        /* 36px * 1.25 */
    }

    .header-icon {
        max-height: 34px;
        /* Constrain with max-height */
        height: auto;
        width: auto;
        display: block;
    }
}

/* === 5. SEARCH BAR STYLING (Blurb-like) === */
.search-group {
    display: flex;
    height: 48px;
    /* Blurb height match */
    border: 1px solid #EBEBEB;
    border-radius: 4px;
    /* Blurb isn't pill, it's slightly rounded or square. User asked for Blurb-like. */
    overflow: hidden;
    background: #F7F7F7;
    transition: border-color 0.2s;
}

.search-group:focus-within {
    border-color: #333;
    /* Darker on focus */
}

.search-input {
    flex: 1;
    border: none;
    padding: 0 20px;
    font-size: 15px;
    color: #333;
    height: 100%;
    outline: none;
    background: transparent;
}

/* Blurb-like Search Button Hover Behavior */
.search-btn {
    width: 60px;
    background: #F7F7F7;
    /* Reference has white bg for icon usually, or colored. Blurb preview shows white. */
    border: none;
    border-left: 1px solid #F0F0F0;
    /* Subtle separator */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.search-btn svg {
    width: 20px;
    height: 20px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

/* Trigger hover on button when hovering the GROUP or when input has FOCUS */

/* Ensure the icon fill/stroke changes if it uses currentColor (which it does via .search-btn color) */

/* === MOBILE SEARCH TRIGGER === */
.mobile-search-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #FAFAFA;
    cursor: pointer;
    padding: 5px;
}

.mobile-search-trigger svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 1023px) {
    /* Kept for safety or future mobile-specific overrides */
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay-search-form {
    width: 90%;
    max-width: 600px;
    position: relative;
    display: flex;
    gap: 10px;
}

.overlay-search-form input {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid var(--text-color);
    border-radius: 4px;
}

.overlay-search-form button {
    padding: 0 1.5rem;
    background: var(--text-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

.close-search {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
}

/* Top Bar */
.topbar {
    background: #191919;
    color: #FAFAFA;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 5px 0;
    /* Mobile default */
}

@media (min-width: 768px) {
    /* No spec offset needed, layout handled by flex */
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.topbar-left {
    flex: 0 0 auto;
}

.topbar-right {
    flex: 0 0 auto;
    margin-left: auto;
}

/* Social icons */
.topbar-left a {
    color: #FAFAFA;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.92;
    width: 28px;
    height: 28px;
}

.topbar-left a svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.topbar-left a:hover {
    opacity: 1;
}

/* === TOPBAR ACTIONS ALIGNMENT (Right Side) === */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Stable gap */
    height: 100%;
}

/* Common sizing for all action items to ensure baseline alignment */
.topbar-actions>*,
.topbar-actions .header-actions {
    display: flex;
    /* Enforce flex context for children */
    align-items: center;
    height: 100%;
    color: #FAFAFA;
    text-decoration: none;
}

/* 1. Stack Icon Trigger */
#collected-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    /* Touch target */
    height: 100%;
    position: relative;
    /* Anchor for badge */
}

.collected-badge-dot {
    position: absolute;
    top: 6px;
    right: 4px;
    /* Inside 28px container */
    width: 6px;
    height: 6px;
    background-color: #ff2c17;
    border-radius: 50%;
    display: none;
    /* Toggled by JS */
    pointer-events: none;
    box-shadow: 0 0 0 1px #191919;
    /* Contrast border */
}

#collected-indicator svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* 2. Mobile Search Trigger (Icon) */
.mobile-search-trigger {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #FAFAFA;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 100%;
}

.mobile-search-trigger svg {
    width: 18px;
    /* Fixed standard size */
    height: 18px;
    display: block;
}

/* 3. Settings Trigger (Language/Currency) */
.header-actions .settings-btn {
    padding: 0;
    /* Remove padding that causes offset */
    height: 100%;
    display: flex;
    align-items: center;
    color: #FAFAFA;
    background: transparent;
    border: none;
    font-size: 0.85rem;
}

.header-actions .settings-btn:hover {
    background: transparent;
    opacity: 0.8;
}

/* Vertical align check: Ensure images/text don't shift */
.header-actions img {
    display: block;
    margin-right: 6px;
}

/* Adjust settings button for dark bg */
.topbar .settings-btn {
    color: #FAFAFA;
}

.topbar .settings-btn:hover,
.topbar .settings-btn.active {
    background: rgba(255, 255, 255, 0.1);
}

/* Dropdown arrow refinement */
.dropdown-caret {
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 0.6rem;
    transition: transform 0.2s ease;
}

.settings-btn.is-open .dropdown-caret {
    transform: rotate(180deg);
}

/* Mobile tuning */
@media (max-width: 480px) {
    .topbar-inner {
        gap: 10px;
    }

    .topbar-left {
        gap: 10px;
    }
}

/* Logo Wrapper */
.site-logo-wrap {
    /* Changed class to match app.blade.php update where I added site-logo-wrap class directly OR existing .site-logo-wrap if used generally. In app.blade.php I used 'site-header-masthead site-logo-wrap' on the A tag. */
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
    /* Default desktop gap */
    max-height: 100%;
    /* Ensure it fits in header */
    overflow: hidden;
    /* Constrain contents */
    position: relative;
}

/* Specific class for flex alignment if site-logo-wrap is ambiguous */
.site-header-masthead {
    display: flex;
    align-items: center;
}

.header-icon {
    height: 40px;
    /* Base for desktop */
    width: auto;
    display: block;
}

.header-logo {
    /* height handled by responsive rules above */
    width: auto;
    display: block;
}

.header-logo a:hover {
    opacity: 1;
    transform: none;
    filter: none;
}

/* Font Face Local Load */
@font-face {
    font-family: 'DM Sans Local';
    src: url('../fonts/DMSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

.header-wordmark {
    /* Original: 'DM Sans Local', sans-serif (700, 0.04em) */
    font-family: 'Righteous', cursive !important;
    font-weight: 400;
    /* Righteous is single weight */
    font-size: 1.5rem;
    letter-spacing: 0.06em;
    /* Slightly increased for display font */
    color: var(--text-color);
    margin-top: 1px;
}

.header-wordmark-dim {
    color: var(--muted-color);
}

/* Theme Switching logic (defaulting to light theme behavior) */
/* If header has no specific theme class, it defaults to light background -> uses dark text logo */
.logo-dark {
    display: block;
    background-color: #FAF9F6;
}

.logo-light {
    display: none;
}

/* Explicit Theming */
.header--dark .logo-dark {
    display: none;
}

.header--dark .logo-light {
    display: block;
}

.header--light .logo-dark {
    display: block;
}

.header--light .logo-light {
    display: none;
}

@media (max-width: 768px) {
    .header-logo {
        height: 42px;
    }

    .header-logo-wrap {
        padding-left: 2px;
    }
}

/* Settings Trigger & Popover */
.header-actions {
    position: relative;
    display: flex;
    align-items: center;
}

.settings-btn {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    background: transparent;
    transition: var(--transition-base);
}

.settings-btn:hover,
.settings-btn.active {
    background: rgba(0, 0, 0, 0.05);
}

.settings-popover {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    width: 280px;
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    padding: 1.25rem;
    display: none;
    z-index: 200;
    text-align: left;
}

.settings-popover.active {
    display: block;
}

.settings-group {
    margin-bottom: 1rem;
}

.settings-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--muted-color);
    margin-bottom: 0.25rem;
}

.settings-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-save-settings {
    width: 100%;
    padding: 0.6rem;
    background: var(--text-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-weight: 500;
}

/* Grids */
.grid {
    display: grid;
    column-gap: var(--gap);
    row-gap: calc(var(--gap) * 0.75);
    /* Mobile: 2 columns fixed */
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 1024px) {
    .grid {
        /* Desktop: 6 columns fixed */
        grid-template-columns: repeat(6, 1fr);
    }
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    /* Impulse friendly size */
    margin: 3rem 0 1.5rem;
    /* Reduced from 4rem */
    font-weight: normal;
    text-align: center;
}

.chip {
    padding: 0.35rem 1rem;
    /* More compact */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    transition: var(--transition-base);
    background: #fff;
    color: var(--text-color);
}

/* Product Page Specifics — canonical definition below (L1079 area) */

.main-image-wrapper {
    position: relative;
    width: 100%;
    /* aspect-ratio: 4/5; -- Removing fixed aspect ratio here to allow max-height control if needed, but keeping it for consistency?
       Prompt says: "max-height / aspect-ratio korlĂˇtozĂˇs + normĂˇlis whitespace".
       Let's keep aspect ratio but ensure it doesn't get huge. */
    aspect-ratio: 4/5;
    background: #f9f9f9;
    overflow: hidden;
    cursor: zoom-in;
    border-radius: var(--radius-sm);
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    /* Reduced from 0.75rem (~50%) */
    transition: var(--transition-base);
    contain: content;
    justify-content: flex-start;
    height: 100%;
    position: relative;
    /* No border or bg on card itself for cleaner look */
}

/* .product-card:hover { } -- Removed lift */

.card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    background: #f4f4f4;
    overflow: hidden;
    border-radius: var(--radius-sm);
    /* Subtle border for definition on light backgrounds */
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.25s ease;
    /* Snappier zoom */
    display: block;
    will-change: transform;
}

.card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F5F5F5;
    color: #CCCCCC;
}

@media (hover: hover) {
    .product-card:hover .card-image-wrapper img {
        transform: scale(1.05);
        /* Subtle zoom desktop only */
    }
}

/* Overlay CTA Button */
/* Overlay CTA Button - Desktop Hover Only */
.card-cta-overlay {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.85);
    color: #000;
    padding: 0.2rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    line-height: 1;
}

@media (hover: hover) {
    .product-card:hover .card-cta-overlay {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }
}

/* Mobile: No overlay, tap entire card */
@media (hover: none) {
    .card-cta-overlay {
        display: none !important;
    }
}

/* Card Content Modernization */
.card-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Align top */
    flex-grow: 1;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.card-title {
    font-weight: 500;
    /* Original global fallback */
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--text-color);
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
}

.product-card .card-title {
    font-weight: 400;
}

.card-price {
    font-weight: 500;
    color: var(--text-color);
    font-size: 1.1rem;
    margin-top: 6px;
    width: 100%;
    text-align: right;
}

/* .card-category removed */

/* Badge Style - "Unavailable" */
.badge-unavailable {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: var(--shadow-subtle);
    border: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* Pill Button Styles */
.btn-discover,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: auto;

    text-align: center;
    transition: var(--transition-base);
    border: 1px solid var(--text-color);
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    text-decoration: none;
    width: 100%;
}

.btn-discover:hover,
.btn-primary:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.btn-discover:disabled,
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: transparent;
    color: var(--text-color);
    border-color: #ccc;
}

.btn-primary {
    background: var(--text-color);
    color: var(--bg-color);
    width: auto;
    /* Default auto width */
}

.btn-primary:hover {
    background: #333;
    /* Slightly lighter black */
    transform: translateY(-1px);
}

/* Product Page Specifics */
.product-detail {
    display: grid;
    /* 45% left (image), rest right (info) - classic ecomm layout */
    grid-template-columns: 45% 1fr;
    gap: 4rem;
    margin-top: 2rem;
    align-items: stretch;
}

.product-detail .image-col {
    position: sticky;
    top: 6rem;
    /* Prevent image appearing too huge on large screens */
    max-width: 500px;
    justify-self: end;
    /* Align to gutter */
    width: 100%;
}

.product-info {
    padding-top: 1rem;
    max-width: 600px;
    /* Readability constrained */
}

/* Height matching handled by JS (syncHeroHeight) in show.blade.php */

.product-info h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    font-weight: normal;
}

.editorial-block {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.editorial-label {
    /* Switch to serif for 'Why it stands out' */
    font-size: 1.1rem;
    color: var(--muted-color);
    margin-bottom: 1rem;
    display: block;
    text-transform: none;
    /* Removed uppercase */
}

.cta-large {
    background: var(--text-color);
    color: var(--bg-color);
    padding: 1rem 3rem;
    border-radius: var(--radius-pill);
    display: inline-block;
    margin-top: 2rem;
    font-weight: 500;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.cta-large:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Pagination */
.pagination {
    margin: 4rem 0;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.page-item,
.page-link {
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.page-item.active .page-link {
    font-weight: 600;
    border-bottom: 2px solid var(--text-color);
}

/* Footer */
footer {
    margin-top: auto;
    flex-shrink: 0;
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--muted-color);
    font-size: 0.9rem;
}

/* Utilities */
.intro-section {
    margin: 2rem 0 3rem;
    /* Reduced from 4rem 0 */
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.intro-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    /* Reduced from 1.75rem (-~30%) */
    margin-bottom: 1.5rem;
    color: var(--text-color);
    line-height: 1.4;
}

.category-chips,
.category-chips-track {
    display: flex;
    justify-content: center;
    /* Centered as requested */
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 13rem;
    /* Extension of hero */
}

.chip {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    transition: var(--transition-base);
    background: #fff;
    color: var(--text-color);
}

.chip:hover,
.chip.active {
    border-color: var(--text-color);
    background: var(--text-color);
    color: var(--bg-color);
}

/* Archive page: centered chip action row */
.archive-bottom-actions {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 24px;
}
.archive-bottom-actions .category-chips-track {
    margin-top: 0;
}

/* Gallery Styles (Reusing structure, refining look) */
.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    background: #f9f9f9;
    overflow: hidden;
    cursor: zoom-in;
    border-radius: var(--radius-sm);
}

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

.thumbnails-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid transparent;
    /* default */
    border-radius: 4px;
    overflow: hidden;
    opacity: 0.7;
    transition: all 0.2s;
}

.thumbnail.active,
.thumbnail:hover {
    border-color: var(--text-color);
    opacity: 1;
}

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

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    /* darker base */
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 2001;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-nav,
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: transform 0.2s;
    font-size: 1.2rem;
    z-index: 10;
}

.lightbox-nav {
    background: transparent;
    color: white;
    font-size: 3rem;
    box-shadow: none;
}

.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

/* Media Queries */

@media (max-width: 768px) {
    header .nav-wrapper {
        height: var(--header-height-mobile);
        grid-template-columns: 1fr;
        /* Logo centered or left */
        display: flex;
        /* Flex is easier for logo centering */
        justify-content: flex-start;
        /* Or center based on pref */
        padding: 0 1.5rem;
    }

    .search-form.desktop-only {
        display: none;
    }

    .mobile-search-trigger {
        display: flex;
    }

    /* Reusable Layer Component */
    .sofe-layer {
        background-color: #ffffff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
        border-radius: 2px;
        border: 1px solid rgba(0, 0, 0, 0.02);
        padding: 0.5rem 1.75rem 2rem 1.75rem;
    }

    @media (max-width: 768px) {
        .sofe-layer {
            padding: 0.5rem 1rem 1.25rem 1rem;
        }
    }

    /* Ensure topbar height logic matches ratios */
    /* .topbar-inner padding is already set in topbar section */
    .topbar-left,
    .topbar-right {
        gap: 6px !important;
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-detail .image-col {
        position: static;
    }

    /* Option C: Align layer top with image top on mobile */
    .product-info {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Product Editorial Structure */
    .product-editorial-divider {
        margin: 0.25rem 0 1rem;
        padding-bottom: 0;
        border-bottom: 1px solid var(--border-color);
        display: block;
        width: 100%;
        height: 1px;
    }

    /* Force Desktop Visibility (Scoped) */
    /* Force Desktop Visibility (Final Simple Strategy) */
    .product-editorial-divider {
        height: 1px;
        width: 100%;
        background: rgba(0, 0, 0, 0.08);
        margin: 14px 0 12px;
        display: block;
        /* Ensure visibility */
    }

    /* PROOF STYLES REMOVED */
    .product-category-row {
        margin-bottom: 1.5rem;
    }

    .static-chip {
        font-family: var(--font-body);
        font-size: 0.85rem;
        color: var(--muted-color);
        padding: 0.25rem 0.75rem;
        border: 1px solid transparent;
        background: #F5F5F5;
        border-radius: 4px;
        cursor: default;
        display: inline-block;
    }

    .section-title {
        font-size: 1.5rem;
        margin: 3rem 0 1.5rem;
    }

    .mobile-sticky-cta {
        display: block;
        /* Show on mobile */
    }

    /* body {
        padding-bottom: 5rem;
    } */
}

/* === LEGACY LOGO CLEANUP === */
.site-masthead-logo,
.sofe-logo,
.navbar-brand {
    display: none !important;
}

/* === DUPLICATE BRANDING SAFEGUARD (Nuclear Option) === */
/* 1. Global Hide for all branding assets */
img[src*="spark-icon.png"],
img[src*="sofe_logo_cropped.png"],
img[src*="sofe-logo.png"],
img[src*="full_dark.png"],
img[src*="full_light.png"],
img[src*="logo-dark-trim.png"],
img[src*="logo-light-trim.png"] {
    display: none !important;
}

/* 2. Whitelist ONLY the valid Header instance */
.header-logo-wrap img[src*="spark-icon.png"],
.header-logo-wrap img[src*="sofe_logo_cropped.png"],
.header-logo-wrap img[src*="sofe-logo.png"],
.header-logo-wrap img[src*="full_dark.png"],
.header-logo-wrap img[src*="full_light.png"],
.header-logo-wrap img[src*="logo-dark-trim.png"],
.header-logo-wrap img[src*="logo-light-trim.png"] {
    display: block !important;
}

/* ISOLATED SEARCH ICON HOVER */
.search-btn:hover {
    background-color: #FF2C17 !important;
    color: #FFFFFF !important;
    border-color: #FF2C17 !important;
}

/* Neutralize parent effects if stuck */
.search-group:focus-within .search-btn {
    background-color: #FFFFFF;
    color: #333;
    border-color: transparent;
    border-left: 1px solid #F0F0F0;
}

/* === EDITORIAL HERO === */
.editorial-hero {
    padding: 0.75rem 0 0.5rem 0;
    background-color: var(--hero-bg-tone);
    /* Breakout to full width */
    width: 100%;
    position: relative;
    /* Ensure content stays centered via internal container logic (handled by .container child) */
    display: flex;
    justify-content: center;

    /* Visual Divider / Soft Shadow */
    box-shadow: 0 6px 12px -8px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

/* Mobile Shadow Override (Subtler) */
@media (max-width: 1023px) {
    .editorial-hero {
        box-shadow: 0 6px 12px -8px rgba(0, 0, 0, 0.08);
        /* 50% fainter */
    }
}

/* Re-center inner content */
.editorial-hero>.container {
    width: 100%;
    max-width: var(--container-width);
}

/* Layout Container */
.hero-split {
    display: flex;
    flex-direction: column;
    /* Mobile first: Stacked */
    gap: 0.17rem;
    /* Reduced from 0.25rem (-30%) */
    margin-bottom: 2rem;
}

/* Typography Defaults (Updated for new markup) */
.hero-headline {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
}

.hero-kicker {
    font-family: var(--font-body);
    color: var(--muted-color);
    font-weight: 400;
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
}

/* Hero Chips: Squared to match Featured Finds */
.hero-compact__chips .chip,
.category-chips-track .chip {
    border-radius: 4px;
    background-color: #F5F5F5;
    /* Inactive default */
    /* Reduced top padding for lighter weight: 4px top, 8px bottom */
    padding: 4px 1.25rem 8px 1.25rem !important;
}

/* Active State */
.hero-compact__chips .chip.active,
.category-chips-track .chip.active {
    background-color: #FF2C17 !important;
    color: #FFFFFF !important;
    border-color: #FF2C17 !important;
}

/* Hover State (Desktop mainly) */
.hero-compact__chips .chip:hover,
.category-chips-track .chip:hover {
    background-color: #FF2C17;
    color: #FFFFFF;
    border-color: #FF2C17;
}

/* Desktop / Laptop (>=1024px) */
@media (min-width: 1024px) {
    .editorial-hero {
        text-align: left;
        padding-top: 0;
        /* Tighten visually to header */
    }

    /* New Grid Layout Wrapper */
    .hero-layout-grid {
        display: flex;
        align-items: stretch;
        /* Match height of divider to content */
        justify-content: flex-start;
        position: relative;
    }

    .hero-split {
        flex: 0 0 auto;
        /* Natural width of text */
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        /* Revert to top alignment to match original spacing flow */
        gap: 0;
        margin-bottom: 0;
        /* Remove bottom margin in this context */
        padding-right: 0;
    }

    /* Vertical Divider */
    .hero-divider {
        width: 1px;
        background-color: rgba(0, 0, 0, 0.08);
        /* Very faint */
        margin: 0 32px;
        /* Gap between text and ghost */
        min-height: 100%;
        /* Stretch to max height of container */
        align-self: stretch;
    }

    .hero-headline {
        flex: auto;
        width: 100%;
        font-size: 3.5rem;
        text-align: left;
    }

    .hero-line {
        display: block;
        width: 100%;
    }

    .hero-kicker {
        flex: auto;
        width: 100%;
        font-size: 1.15rem;
        text-align: left;
        padding-left: 0;
        border-left: none;
        margin-bottom: -0.4rem;
        /* Ensure tight spacing is preserved */
    }

    .category-chips,
    .category-chips-track {
        justify-content: center;
        /* Restore centered alignment */
        margin-top: 1.5rem;
        /* Reduced from 2rem (25%) */
        margin-left: 0;
    }

    /* Hero Chips Overhang (Desktop Only) */
    .hero-compact__chips,
    .category-chips-track {
        /* 40% ensures it crosses the 0.5rem padding + 15% visual overhang */
        transform: translateY(40%);
        position: relative;
        z-index: 5;
    }

    /* Hero Visual Anchor (Desktop > 1024px) */
    .hero-anchor {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 80px;
        height: 60px;
        background-image: radial-gradient(circle, #000 1.5px, transparent 1.5px);
        background-size: 20px 20px;
        background-repeat: repeat;
        opacity: 0.04;
        pointer-events: none;
        z-index: 0;
    }

    /* Hero Editorial Text (Desktop Ghost Text) - IMPROVED */
    .hero-editorial-text {
        position: relative;
        /* No longer absolute */
        top: auto;
        right: auto;
        transform: none;

        display: flex;
        align-items: center;
        /* Vertically center in its column */
        flex: 1;
        /* Take remaining space */

        font-family: var(--font-heading);
        font-weight: 100;
        /* Thin */
        font-size: 2.25rem;
        /* Reduced from 2.75rem to prevent height expansion */
        line-height: 1.25;
        /* Balanced spacing */
        text-align: left;
        /* Align text left within its block (next to divider) */
        color: var(--text-color);
        opacity: 0.7;
        /* Clearly readable as second message */

        pointer-events: none;
        white-space: normal;
        /* Allow wrapping */
        z-index: 0;
        user-select: none;
        max-width: 400px;
        /* Constrain width to force wrapping if needed, or let flex handle it */
    }
}

/* TABLET / LANDSCAPE (481px - 1023px) */
@media (max-width: 1023px) {

    .hero-anchor,
    .hero-editorial-text,
    .hero-divider {
        /* Hide divider on mobile */
        display: none;
    }

    .hero-layout-grid {
        display: block;
        /* Normal stacking */
    }

    .hero-headline,
    .hero-kicker {
        text-align: left;
        width: 100%;
    }

}

/* Mobile Chips + Hero Overflow Fixes */
@media (max-width: 1023px) {

    /* 2.1 HERO CLAMP: hero full width */
    .hero,
    .hero-compact,
    .hero-compact__inner,
    .hero-compact__content,
    .hero-compact__chips,
    .editorial-hero {
        /* Full Bleed by default in new structure */
        max-width: 100%;
        box-sizing: border-box;
        width: 100% !important;
        min-width: 0;
        /* Reset any margins */
        margin-left: 0 !important;
        margin-right: 0 !important;
        left: auto !important;
        right: auto !important;
    }

    /* 2.2 Chips scroller: the ONLY element allowed to scroll horizontally */
    /* NEUTRALIZED for full-bleed fix */
    /* .category-chips-scroller { */
    /* width: 100%; */
    /* max-width: 100%; */
    /* overflow-x: auto; */
    /* overflow-y: hidden; */
    /* -webkit-overflow-scrolling: touch; */
    /* box-sizing: border-box; */

    /* match content padding of the page so it doesn’t feel glued to edge */
    /* padding-left: 16px; */
    /* padding-right: 16px; */
}

/* 2.3 Track: becomes as wide as content, but never forces page width */
.category-chips-track {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 12px;
    white-space: nowrap;
    width: max-content;
    max-width: none;
    /* Maintain vertical breathing room */
    margin-top: 1.25rem;
}

/* 2.4 Chips: never wrap, never stretch */
.category-chips-track>* {
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: 0;
}

/* Chip Styling Map for Mobile (ensure they look correct in track) */
.category-chips-track .chip {
    display: inline-flex !important;
    padding: 0.35rem 0.75rem !important;
    font-size: 0.85rem !important;
    margin: 0 !important;
    height: auto;
}

/* Cleanup/Safety */
.category-chips-wrapper,
.category-chips-scroll {
    display: none;
}

/* Fix Hero Overflow (Remove risky nowraps on small screens) */
@media (max-width: 600px) {
    .hero-kicker {
        white-space: normal !important;
        /* Allow wrapping to prevent overflow */
        overflow: hidden !important;
        text-overflow: ellipsis;
    }
}

/* STRICT MOBILE PORTRAIT OVERRIDE (max-width: 600px - covers all phones) */
@media (max-width: 600px) {
    .editorial-hero {
        text-align: left !important;
        padding-top: 1rem !important;
        padding-bottom: 0.75rem !important;
    }

    .hero-split {
        /* Single column layout */
        display: block !important;
        gap: 0 !important;
        margin-bottom: 0.25rem !important;
    }

    /* Force Left Alignment & Disable Justify */
    .hero-headline,
    .hero-kicker {
        text-align: left !important;
        text-justify: auto !important;
        word-spacing: normal !important;
        letter-spacing: normal !important;
        width: 100% !important;
        margin-left: 0 !important;
        max-width: 100% !important;
    }

    /* 1) Kicker: "Curated..." -> LOCKED TO ONE LINE, NO CLIPPING */
    .hero-kicker {
        white-space: nowrap !important;
        /* Fluid Font Size: Reduced slightly to ensure it fits 320px width entirely */
        font-size: clamp(12px, 3.5vw, 15px) !important;
        overflow: visible !important;
        text-overflow: clip !important;
        margin-bottom: 0 !important;
        /* Reduced from 0.15rem */
        display: block !important;
    }

    /* Extra safety for very narrow devices (iPhone SE 1st gen etc) */
    @media (max-width: 360px) {
        .hero-kicker {
            font-size: 13px !important;
            /* Hard floor */
            letter-spacing: -0.02em !important;
            /* Slight crunch if needed */
        }
    }

    /* 2) Headline: "Strange..." -> LOCKED TO TWO LINES */
    .hero-headline {
        /* Reverted to 1.7rem as per request */
        font-size: 1.4rem !important;
        line-height: 1.15 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    /* Force spans to block to split lines */
    .hero-line {
        display: block !important;
        width: 100%;
    }

    .hero-line-2 {
        margin-top: 0 !important;
    }

    /* Chips */
    .category-chips {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        justify-content: center !important;
        margin-top: 0.5rem !important;
        gap: 8px !important;
        padding-bottom: 4px;
        /* Mobile grid layout override */
    }

    /* Hero Chips specific reduction (~20%) */
    .hero-compact__chips .chip {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.85rem !important;
    }

    /* Fix Double Padding: Remove inner container padding so it aligns with Featured section */
    .hero-compact__inner.container {
        padding-inline: 1.5rem !important;
        width: auto !important;
        /* Ensure it doesn't try to be container width */
    }
}

/* === EDITORIAL SECTION HEADER === */
.editorial-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    gap: 0.75rem 1rem;
    /* Gap for wrap scenarios */
    margin: 3rem 0 1.5rem;
    /* Same vertical rhythm as section-title was */
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    /* Subtle separation */
}

.editorial-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    /* Match previous section-title size roughly */
    font-weight: normal;
    color: var(--text-color);
    margin: 0;
}

.editorial-header.has-filter {
    align-items: center;
}

.editorial-chips {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
    /* Push to right even if wrapped */
}

.editorial-chip {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--muted-color);
    padding: 0.25rem 0.75rem;
    border: 1px solid transparent;
    /* No visible border properly */
    background: #F5F5F5;
    /* Very subtle background */
    border-radius: 4px;
    /* Tag-like */
    cursor: default;
    /* Soft guidance, not hard CTA */
    transition: var(--transition-base);
}

.editorial-chip:hover {

    color: var(--text-color);
    background: #EBEBEB;
}

/* Flag Icons: Rectangular, small radius */
.flag-icon {
    width: 20px;
    height: 15px;
    /* 4:3 aspect ratio approximation */
    object-fit: cover;
    border-radius: 2px;
    /* Small radius as requested */
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
}

/* Custom Dropdown List (Replaces native select) */
.custom-select-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.custom-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid transparent;
    background: transparent;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: var(--transition-base);
}

.custom-option:hover {
    background: #EBEBEB;
}

.custom-option.selected {
    font-weight: 600;
    background: #F0F0F0;
}

.custom-option span {
    margin-left: 0;
}

/* Custom Select within Settings Popover */
.custom-select-container {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-select-container.active {
    border-color: var(--text-color);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-color);
}

.custom-select-trigger .current-selection {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-select-trigger .chevron {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #999;
    transition: transform 0.2s;
}

.custom-select-container.active .chevron {
    transform: rotate(180deg);
}

.custom-select-options {
    display: none;
    border-top: 1px solid var(--border-color);
    background: #fff;
    max-height: 200px;
    overflow-y: auto;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.custom-select-container.active .custom-select-options {
    display: block;
}

/* === EDITORIAL MICRO BLOCK (Homepage) === */
.editorial-micro-block {
    margin: 4rem auto 3rem;
    font-family: var(--font-heading);
    font-weight: 300;
    /* Lighter editorial feel */
    font-size: 1.35rem;
    color: var(--muted-color);
    line-height: 1.5;
    max-width: 600px;
    /* Limit width for readability */
}

@media (min-width: 768px) {
    .editorial-micro-block {
        margin: 1.75rem 0 1.75rem;
        /* More breather on desktop */
        text-align: left;
        max-width: 500px;
        /* Editorial constraint */
        padding: 0;
    }
}

@media (max-width: 767px) {
    .editorial-micro-block {
        text-align: center;
        font-size: 1.25rem;
        margin: 3rem auto;
        padding: 0 1.5rem;
    }
}

/* Mobile Editorial Header */
@media (max-width: 768px) {

    /* Mobile Settings Dropdown: 25% narrower */
    .settings-popover {
        /* Assuming base is wider, or just constraining it */
        width: 180px !important;
        /* Narrower for mobile density */
        min-width: 0 !important;
    }

    .editorial-header {
        flex-direction: column;
        /* Stack chips below title on mobile */
        align-items: flex-start;
        /* Left align everything */
        gap: 0.75rem;
        /* margin/padding already handled */
        margin: 2rem 0 1rem;
        padding-bottom: 1rem;
    }

    .editorial-header.has-filter {
        align-items: flex-start;
    }

    .editorial-header.has-filter select,
    .editorial-header.has-filter .marketplace-filter-form {
        display: block;
        margin: 0 auto;
    }

    .editorial-chips {
        margin-left: 0;
        /* Removing auto-push to right */
        justify-content: flex-start;
        flex-wrap: wrap;
        width: 100%;
    }

    .editorial-title {
        font-size: 1.5rem;
    }

    .editorial-chip {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
        background: #F7F7F7;
    }
}

/* Section Lift (YesStyle-like) */
.section-raised {
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    border-radius: 2px;
    padding: 0.75rem 1.75rem 2rem 1.75rem;
    margin-bottom: 2.5rem;
    margin-top: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

/* Compact internal spacing for raised sections */
.section-raised .editorial-header {
    margin-bottom: 2rem;
    margin-top: 1rem;
    padding-bottom: 0.5rem;
    /* Tighter divider */
}

.section-raised .editorial-title {
    margin-bottom: 0.25rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .section-raised {
        padding: 0.5rem 1rem 1.25rem 1rem;
        margin-top: 2rem;
        margin-bottom: 2rem;
        /* Widen layer by eating into container padding (1.5rem / 2) */
        margin-left: -0.75rem;
        margin-right: -0.75rem;
    }

    .section-raised .editorial-header {
        margin-bottom: 1.5rem;
        margin-top: 0.75rem;
    }
}

/* === MASTHEAD REFACTOR === */

/* Container Layout - Center EVERYTHING */
.site-header-masthead {
    display: none !important;
    /* Legacy/Duplicate identifier - Kill it */
}

/* Logo Image Styling */
.header-logo {
    display: block;
    width: auto;
    /* Responsive Height using Clamp */
    height: clamp(34px, 5vw, 48px);
    /* slightly larger max height for masthead feel */
}

/* New HTML Wordmark */
.header-wordmark {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-color);
    font-size: 24px;
    /* Desktop size */
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -0.02em;
    margin-left: 2px;
    /* Tight coupling with icon */
    display: flex;
    align-items: center;
}

.header-wordmark-dim {
    color: inherit;
    opacity: 0.6;
    /* Dimmer shade */
    margin: 0 1px;
    /* Micro spacing if needed, but keeping tight as requested */
}

/* Mobile Wordmark tweaks */
@media (max-width: 768px) {
    .header-wordmark {
        font-size: 19px;
        /* Smaller on mobile to prevent wrap */
    }
}

/* Ensure the wrap doesn't conflict */
.site-logo-wrap {
    display: block;
    line-height: 0;
}

/* === EDITORIAL CARD STYLES === */
.editorial-card {
    cursor: pointer;
    /* Entire card clickable */
    position: relative;
}

/* 1. Reset/Override standard card behaviors */
.editorial-card .card-image-wrapper {
    border: none;
    /* Clean look */
}

.editorial-card .card-image-wrapper img {
    transition: none !important;
    /* No zoom */
    transform: none !important;
}

@media (hover: hover) {
    .editorial-card:hover .card-image-wrapper img {
        transform: none !important;
    }
}

/* Hide standard overlay if it existed */
.editorial-card .card-cta-overlay {
    display: none !important;
}

/* 2. Context Sentence */
.editorial-context {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-color);
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
    font-family: inherit;
}

/* 3. Secondary Price */
.editorial-price {
    font-size: 0.85rem;
    color: #888;
    /* Lighter/Secondary */
    font-weight: 400;
    text-align: right;
    width: 100%;
    margin-top: 6px;
}

/* 4. Collect Button (Guest) */
.card-collect-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    transition: all 0.2s ease;
    z-index: 20;
    opacity: 0;
    transform: translateY(4px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.card-collect-btn:hover {
    background: #fff;
    color: #000;
    border-color: rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

/* Desktop Hover Visibility */
@media (hover: hover) {
    .editorial-card:hover .card-collect-btn {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile: Always visible (Touch devices) */
@media (max-width: 1023px) {
    .card-collect-btn {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Collected State (Always visible) */
.card-collect-btn.collected,
.card-collect-btn.is-collected {
    opacity: 1 !important;
    transform: translateY(0) !important;
    background: var(--text-color);
    color: #fff;
    border-color: var(--text-color);
}

/* === PRODUCT PAGE EXCLUSIVE === */

.main-image-wrapper {
    position: relative;
    /* Ensure the button absolute positions inside the image */
}

.pdp-collect-btn {
    opacity: 0;
    transform: translateY(4px);
    transition: var(--transition-base);
}

@media (hover: hover) {
    .main-image-wrapper:hover .pdp-collect-btn {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1023px) {
    .pdp-collect-btn {
        opacity: 1;
        transform: translateY(0);
        /* 12px mobile padding on right */
        right: 12px;
        top: 12px;
    }
}

/* === TOP BAR BRANDING (System Identity) === */
.system-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    text-decoration: none;
    color: #fff;
    /* Inverted for black bar */
}

/* Icon Height Matching */
.system-icon {
    height: 18px;
    /* Discreet system size */
    width: auto;
    /* filter: brightness(0) invert(1); removed to check if this fixes global white square issues,
       but user specific desktop only. I will leave global alone and override in desktop as requested. */
    filter: brightness(0) invert(1);
    /* Make sure icon is white */
}

/* Wordmark Styles */
.system-wordmark {
    font-size: 0.85rem;
    /* Match small system text */
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #fff;
    /* White */
    line-height: 1;
    margin-top: 2px;
    /* Optical alignment with icon */
    font-family: var(--font-heading);
}

.system-wordmark .header-wordmark-dim {
    color: rgba(255, 255, 255, 0.6);
    /* Dimmed white for "OF" */
}

/* Hide the old nav-wrapper container effectively since it's now empty besides script */
header .nav-wrapper {
    height: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    margin: 0 !important;
}

/* Topbar Mobile Adjustments */
@media (max-width: 480px) {
    .system-wordmark {
        font-size: 0.75rem;
        /* Slightly smaller to prevent overflow */
    }

    .system-icon {
        height: 16px;
    }
}

/* === DESKTOP FIXES (Brand, Icon, Spacing) === */
@media (min-width: 1024px) {

    /* FIX 1: Brand Prominence (Refined) */
    .topbar .system-brand .header-icon {
        height: 28px;
        /* Reduced from 34px (15-20% smaller) */
        width: auto;
    }

    .topbar .system-brand .header-wordmark {
        font-size: 1.3rem;
        /* Reduced from 1.6rem (subtle but prominent) */
        color: #ffffff;
        line-height: 1;
        letter-spacing: 0.02em;
    }

    .topbar .system-brand .header-wordmark-dim {
        color: #d0d0d0;
    }

    /* FIX 2: Icon Rendering (Inverted for Black Bar) */
    /* Use invert(1) to turn black icon to white. Avoid brightness(0) which flattens it to square if transparency is lost. */
    .system-icon {
        filter: invert(1) !important;
    }

    /* FIX 3: Hero Spacing (Continuous White Background) */
    /* Remove generic spacing on Main */
    main.container {
        margin-top: 0;
        padding-top: 0;
    }

    /* Apply spacing to the Hero section directly and force its background to white for continuity */
    .editorial-hero {
        padding-top: 2rem;
        background-color: #FFFFFF;
    }

    /* === DESKTOP LAYOUT RECONSTRUCTION (Moved from Inline) === */
    /* Restore the 3-column grid layout for desktop to keep center alignment perfect */
    .topbar-inner {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

    .topbar-left {
        display: flex;
        /* Show socials */
    }

    .topbar-center {
        justify-content: center;
        /* Center brand */
    }

    /* FIX 4: Right Tool Cluster (Desktop) */
    .topbar-right {
        gap: 6px;
        /* Relaxed from 2px to avoid cramping, but still clustered */
    }

    /* Height Alignment: Match search icon to text/flag height (~16px) */
    .mobile-search-trigger svg {
        width: 16px;
        height: 16px;
    }

    /* Remove excess padding to ensure tight clustering */
    .mobile-search-trigger {
        padding-right: 4px;
        /* Relaxed slightly */
    }

    .settings-btn {
        padding-left: 4px;
        /* Relaxed slightly */
    }
}

/* === MOBILE HEADER CLEANUP (Scoped to Mobile) === */
@media (max-width: 1023px) {
    .topbar-inner {
        /* Flexbox handles the "Brand Left, Tools Right" spread when Socials are hidden */
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .topbar-left {
        /* Hide socials on mobile */
        display: none;
    }

    .topbar-center {
        /* Default Flex is Left Aligned. No justification needed. */
        display: flex;
        align-items: center;
    }

    .topbar-center .system-brand {
        padding-left: 0.5rem;
        /* Fix: Comfortable inset from left edge */
    }

    /* Boost Mobile Brand Readability */
    .system-wordmark {
        font-size: 1.15rem;
        /* Larger than previous 0.85rem */
    }

    /* Fix: Reduce search icon visual prominence */
    .mobile-search-trigger svg {
        width: 16px;
        /* Reduced from 18px (or larger default) to match language/currency selector */
        height: 16px;
    }

    /* Fix: Group search and tools closely on mobile */
    .topbar-right {
        gap: 2px;
        /* Super tight cluster */
    }

    /* Tune padding for tight visual grouping */
    .mobile-search-trigger {
        padding-right: 2px;
        /* Pull closer to language selector */
    }

    .settings-btn {
        padding-left: 4px;
        /* Pull closer to search icon */
    }
}

/* ===== TOPBAR RIGHT FINAL LOCK (UA reset + alignment) ===== */

.topbar-actions {
    align-items: center !important;
}

/* UA reset kizárólag a topbar right elemeire */
.topbar-actions button,
.topbar-actions a {
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    line-height: 1 !important;
    font: inherit !important;
    color: inherit !important;
}

/* minden közvetlen elem azonos tengelyen */
.topbar-actions>a,
.topbar-actions>button,
.topbar-actions>.header-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    min-height: 40px !important;
    align-self: center !important;
}

/* stack + search fix slot */
#collected-indicator,
.mobile-search-trigger {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    position: relative !important;
    /* badge anchor */
}

/* svg optikai stabil - Stack (Heavy) */
#collected-indicator svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
}

/* svg optikai stabil - Search (Light/Open) -> 16px (20% smaller) */
.mobile-search-trigger svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
}

/* settings belső baseline-kill */
.header-actions {
    display: inline-flex !important;
    align-items: center !important;
    height: 40px !important;
}

.settings-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 40px !important;
    line-height: 1 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.settings-inline {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0px !important;
    /* Removed gap entirely */
    line-height: 1 !important;
}

/* Force text size on nested spans to avoid inheritance issues */
.settings-btn span {
    font-size: 14px !important;
}

/* Specific gap for Flag+Text wrapper */
.settings-inline>span {
    gap: 2px !important;
    /* Reduced from 6px inline to 2px */
    display: inline-flex !important;
    /* Ensure flex behavior for gap to work */
    align-items: center !important;
}

.topbar-flag {
    display: inline-block !important;
    width: 15px !important;
    /* Scaled down from 20px */
    height: 11px !important;
    /* Scaled down from 15px */
    object-fit: cover !important;
    border-radius: 2px !important;
    vertical-align: middle !important;
    position: relative !important;
    top: 1px !important;
}

/* divider spacing reduction */
.topbar-divider {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
    margin: 0 1px !important;
    /* Minimal margin */
}

/* Higher specificity to beat .settings-btn span */
.settings-btn .dropdown-caret {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
    font-size: 10px !important;
    margin-left: 0px !important;
}

/* Eliminate hover states on the language/currency controls */
.settings-btn:hover,
.settings-btn:hover span,
.settings-btn:hover .dropdown-caret,
.settings-btn:hover .topbar-flag {
    color: inherit !important;
    opacity: 1 !important;
    filter: none !important;
    background: transparent !important;
}

/* BADGE: fixen a stack ikon jobb felső sarkába */
#collected-badge {
    position: absolute !important;
    top: 11px !important;
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
}

/* ===== END TOPBAR RIGHT FINAL LOCK ===== */

/* ===== TOPBAR PARENT VERTICAL CENTER LOCK ===== */
.topbar {
    display: flex !important;
    align-items: center !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
}

.topbar-inner {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* ===== END TOPBAR PARENT VERTICAL CENTER LOCK ===== */

/* Fix text visibility in Settings Popover (override topbar white text) */
#settings-popover {
    color: #333333 !important;
}

#settings-popover button,
#settings-popover .custom-option,
#settings-popover .btn-save-settings {
    color: #333333 !important;
}

#settings-popover label {
    color: var(--muted-color) !important;
}

/* Save Button - Hero Chip Style (Corrected) */
#settings-popover .btn-save-settings {
    background: #F5F5F5 !important;
    color: #333333 !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    /* Rectangular with small radius */
    padding: 0.5rem 1.25rem !important;
    /* Match chip padding */
    font-size: 0.85rem !important;
    width: 100% !important;
    font-weight: normal !important;
    transition: all 0.2s ease !important;
}

#settings-popover .btn-save-settings:hover {
    background: #FF2C17 !important;
    color: #ffffff !important;
    border-color: #FF2C17 !important;
}

/* Desktop-only: Reduce Popover Width by 35% (280px -> 182px) */
@media (min-width: 1024px) {
    .settings-popover {
        width: 182px !important;
        padding: 1rem !important;
        /* Slightly reduced padding */
    }

    /* Adjust internal elements to fit tighter width */
    #settings-popover .custom-select-trigger {
        padding: 0.5rem 0.6rem !important;
        font-size: 0.85rem !important;
    }

    #settings-popover .btn-save-settings {
        padding: 0.35rem 0.5rem !important;
        font-size: 0.8rem !important;
    }

    .settings-group label {
        font-size: 0.75rem !important;
    }
}

/* Ensure specific padding for options and trigger so they don't touch border - GLOBAL */
#settings-popover .custom-option,
#settings-popover .custom-select-trigger {
    padding: 0.5rem 0.75rem !important;
}

#settings-popover .custom-option {
    justify-content: flex-start !important;
}

#settings-popover .custom-select-trigger {
    justify-content: space-between !important;
}

/* Desktop-only: Reduce Popover Width by 35% (280px -> 182px) - Width Override Only */
@media (min-width: 1024px) {
    .settings-popover {
        width: 182px !important;
        padding: 1rem !important;
    }
}

/* === COLLECTED PAGE GRID === */

/* Collected page container — no inner container class, lives inside main.container */
#collected-page {
    width: 100%;
    padding: 0;
    overflow-x: hidden;
}

/* section-raised inside collected uses native margin to sync with Marketplace */

/* Collected grid */
#collected-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

/* Tablet */
@media (max-width: 1023px) {
    #collected-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 640px) {
    #collected-page {
        padding: 0 16px 16px;
    }

    #collected-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

/* Safety */
#collected-grid * {
    max-width: 100%;
}

/* Collected Clear Button - Matching Hero Chips (1:1) */
.collected-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    /* Hero Chip Base Styles */
    background-color: #F5F5F5;
    padding: 4px 1.25rem 8px 1.25rem;
    border-radius: 4px;

    /* Base Chip Styles */
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-color);
    transition: var(--transition-base);

    /* Button Reset & Layout */
    cursor: pointer;
    margin-left: 1rem;
    font-family: inherit;
    line-height: normal;
}

.collected-clear-btn:hover {
    /* Hero Chip Hover Styles */
    background-color: #FF2C17;
    color: #FFFFFF;
    border-color: #FF2C17;
}

/* Featured hover zoom - NO SNAP GUARANTEE */
.featured-finds-section .product-card {
    overflow: hidden;
}

.featured-finds-section .card-image-wrapper {
    transform: none !important;
    transition: none !important;
}

.featured-finds-section .card-image-wrapper img {
    transform-origin: center center;
    transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
    will-change: transform;
}

.featured-finds-section .product-card:hover .card-image-wrapper img {
    transform: scale(1.05) !important;
}

/* Featured & Recently title typography - NO BOLD */

/* Mobile Hero Chips: FORCE hard breakout full-bleed (DEBUG MODE) */
@media (max-width: 768px) {
    .category-chips-scroller {
        /* FORCE full-bleed container */
        display: block !important;
        width: 100vw !important;
        max-width: 100vw !important;

        /* symmetric breakout from centered container */
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;

        /* ensure no old positioning interferes */
        left: auto !important;
        right: auto !important;
        transform: none !important;

        /* keep scroll */
        overflow-x: auto !important;
        overflow-y: hidden !important;

        /* IMPORTANT: no padding here during test */
        padding-left: 0 !important;
        padding-right: 0 !important;

        -ms-overflow-style: none;
        scrollbar-width: none;

    }

    .category-chips-scroller::-webkit-scrollbar {
        display: none;
    }

    .category-chips-track {
        display: inline-flex !important;
        width: max-content !important;
        min-width: 100% !important;
        flex-wrap: nowrap !important;

    }

    /* gutter as spacers (container align without padding on scroller) */
    .category-chips-track::before,
    .category-chips-track::after {
        content: "";
        flex: 0 0 1.5rem;
    }

    .category-chips-track::after {
        flex-basis: calc(1.5rem + env(safe-area-inset-right, 0px));
    }

}

/* === FOOTER REDESIGN === */
/* Sticky Footer Wrapper moved to top (Texture Overlay section) */

main.container {
    flex: 1;
    /* Pushes footer down */
    width: 100%;
    /* Ensure full width constrain */
}

/* Footer Container */
.app-footer {
    background-color: #191919;
    color: #FAFAFA;
    margin-top: auto;
    /* Sticky footer behavior safety */
    padding-bottom: 2rem;
    /* Bottom spacing */
    padding-top: 0;
    /* Let internal padding drive the top spacing */
    margin-bottom: 0;
}

/* === SPACING FORCE FIX === */
:root {
    margin-top: 0 !important;
}

.sofe-footer .footer-links-row {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.sofe-footer .footer-divider {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 2. Apply Single Source of Truth */
/* Apply ONLY to the links row top padding */
.sofe-footer .footer-links-row {
    padding-top: var(--sofe-topbar-pad) !important;
}

/* Symmetric Divider Spacing */
.sofe-footer .footer-divider {
    margin-top: var(--sofe-topbar-pad) !important;
    margin-bottom: 2rem !important;
    /* Restore bottom spacing */
}

/* Legacy support (clean up if possible, but keeping for safety if used elsewhere) */
/* .footer-top controlled by .footer-links-row now */

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #FAFAFA;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: opacity 0.2s;
    line-height: 1.5;
    /* Normalize */
}

.footer-nav a:hover {
    opacity: 0.8;
}

/* 2) Divider Positioning (Symmetric) */
/* Handled by .sofe-footer .footer-divider above */
.footer-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    width: 100%;
}

/* 3) Logo Row (Left Aligned) */
.footer-logo-row {
    display: flex;
    justify-content: flex-start;
    /* Left aligned */
    margin-bottom: 1.5rem;
}

/* 4) Copyright Row (Three Rows total: Links, Logo, Copyright) */
.footer-bottom {
    display: flex;
    /* Changed from grid to flex for simpler centering */
    justify-content: center;
    /* CENTER ALIGNED */
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-copyright {
    text-align: center;
}

/* Mobile Tweaks */
@media (max-width: 768px) {
    .footer-nav {
        gap: 0.5rem;
    }

    .footer-nav a {
        padding: 0.5rem;
    }
}

.page-collected {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Reusable Layer Component */
.sofe-layer {
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    padding: 0.75rem 1.75rem 2rem 1.75rem;
}

@media (max-width: 768px) {
    .sofe-layer {
        padding: 0.5rem 1rem 1.25rem 1rem;
    }
}

/* Product Editorial Divider */
.product-editorial-divider {
    height: 1px;
    background: var(--border-color);
    /* Matches existing dividers (var(--border-color)) */
    width: 100%;
    margin: 16px 0 14px;
    /* Tight spacing as requested */
}

/* Product Layer Title (Mirrors .editorial-title) */
.product-layer-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: normal;
    color: var(--text-color);
    margin: 0;
}

/* Product Breadcrumb (Desktop Only) */
.product-breadcrumb {
    display: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--muted-color);
    margin-bottom: 1rem;
}

.product-breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-breadcrumb a:hover {
    color: var(--text-color);
}

/* Current (active) breadcrumb item — visually stronger than muted links */
.product-breadcrumb span:not([aria-hidden]) {
    color: var(--text-color);
    font-weight: 500;
}

@media (min-width: 768px) {
    .product-breadcrumb {
        display: block;
    }

    /* Restore Vertical Composition */
    .product-page .image-col {
        margin-top: -1.5rem;
        /* Counteract breadcrumb */
        background-color: #F7F5F2 !important;
    }

    .product-page .gallery-container {
        background-color: #F7F5F2 !important;
    }

    .product-page .main-image-wrapper {
        background-color: #F7F5F2 !important;
        max-height: 75vh;
        /* Match img max-height; prevents aspect-ratio from inflating grid row beyond visible image */
    }

    /*
     * Hero alignment fix:
     *
     * .product-detail is a CSS Grid with align-items: stretch.
     * This means both grid cells (image-col and product-info) are automatically
     * stretched to the height of the taller sibling — no explicit height needed.
     *
     * To make the white sofe-layer panel reach the bottom of that stretched cell:
     *   1. Turn .product-info into a flex column (it is already the full cell height
     *      via grid stretch — do NOT set height:100% which resolves against the
     *      grid container's own height, not the cell height, and can break things).
     *   2. Give .sofe-layer flex:1 so it expands to fill all remaining space inside
     *      the flex column.
     *   3. Move the visual top-spacing inside .sofe-layer (as padding-top) so the
     *      layer itself starts at the very top of the cell and flex:1 can reach
     *      all the way to the bottom edge.
     *
     * If the description is long enough to make .sofe-layer taller than the image,
     * the grid row simply grows to fit — no constraint prevents that.
     */
    .product-page .product-info {
        padding-top: 0;          /* spacing lives inside .sofe-layer now */
        display: flex;
        flex-direction: column;
        /* No height:100% — grid stretch already sizes this cell correctly.
           height:100% would resolve against the grid container height (auto),
           not the stretched cell height, and can cause the panel to collapse. */
    }

    /* sofe-layer does NOT stretch to fill the full grid cell.
       flex: 0 0 auto means it takes its natural content height,
       subject to the min-height that syncPanelHeight() writes via JS
       (= rendered #main-product-image height).
       When content is short → layer bottom = image bottom (via min-height).
       When content is tall  → layer grows downward naturally beyond image. */
    .product-page .product-info .sofe-layer {
        flex: 0 0 auto;          /* do NOT stretch to fill parent cell */
        display: flex;
        flex-direction: column;
        padding-top: 2rem;       /* visual top spacing (was on .product-info before) */
    }

    /* Increase Top Spacing */
    .product-page {
        padding-top: 2rem;
    }

    /* Editorial Image Window */
    .product-page .main-image-wrapper img {
        max-height: 75vh;
        /* Fits in viewport */
        width: 100%;
        object-fit: cover;
        object-position: center;
    }

    /* Center Price & CTA */
    .product-page .product-action-block {
        text-align: center;
        margin-top: 3rem;
        /* Visual separation */
    }

    .product-page .product-action-block .product-price {
        display: block;
        margin-bottom: 1rem;
        font-size: 1rem;
        color: var(--muted-color);
        font-weight: 400;
    }

    /* You May Also Like - 6 Columns & Spacing */
    .product-page .related-products-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        column-gap: var(--gap);
        row-gap: calc(var(--gap) * 0.75);
    }

    .product-page .related-section {
        margin-top: 6rem;
        /* 3× previous gap (was 2rem); desktop only, mobile unchanged */
        margin-bottom: 5rem;
        /* Breathing room before footer */
        overflow: visible;
        width: 100%;
        max-width: 100%;
    }
}

/* Product Page: tighten gap between description and You May Also Like */
.product-page .product-detail {
    margin-bottom: 1.25rem !important;
}

@media (max-width: 768px) {
    .product-page .product-detail {
        margin-bottom: 1rem !important;
    }
}

/* OVERRIDE: Ensure Product Page H1 matches Editorial Typography EXACTLY */
/* Specificity: .product-page .product-info h1 vs .product-info h1 */
.product-page .product-info h1,
.product-page h1.product-layer-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    line-height: 1.4;
    font-weight: normal;
    color: var(--text-color);
    letter-spacing: normal;

    /* Reset if needed */
}

/* === COOKIE CONSENT BANNER === */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    /* More subtle shadow */
    z-index: 9999;
    padding: 1.5rem 0;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.cookie-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.cookie-text {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
}

.cookie-text p {
    margin: 0;
}

.cookie-text a {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-cookie {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.btn-cookie-accept {
    background-color: #000;
    color: #fff;
    border: 1px solid #000;
}

.btn-cookie-accept:hover {
    background-color: #333;
    border-color: #333;
}

.btn-cookie-reject {
    background-color: transparent;
    color: #000;
    border: 1px solid #ccc;
}

.btn-cookie-reject:hover {
    border-color: #999;
    color: #000;
    background-color: #f9f9f9;
}

@media (max-width: 768px) {
    .cookie-content-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .cookie-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .btn-cookie {
        width: 100%;
        text-align: center;
        padding: 0.75rem;
    }
}

/* Marketplace Filter */
.marketplace-filter-select {
    border: 1px solid #e5e5e5;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    background: transparent;
    color: var(--text-color);
}

/* Marketplace Meta (Editorial) */
.card-marketplace-meta,
.product-marketplace-meta {
    font-size: 0.85rem;
    margin-top: 4px;
    line-height: 1.3;
    color: #8a8a8a;
    font-weight: 400;
    width: 100%;
}

/* Cards: right-aligned meta */
.card-marketplace-meta {
    text-align: right;
}

/* Product page: left-aligned meta (below divider) */
.product-marketplace-meta {
    text-align: left;
    margin-bottom: 12px;
}

.meta-marketplace {
    color: inherit;
}

.meta-separator {
    color: inherit;
}

.meta-country {
    color: inherit;
    font-weight: inherit;
}

/* Product description plain text */
.product-description {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 1.25rem;
}

/* Global hover for marketplace/country links — desktop only, subtle tone shift */
@media (hover: hover) {
    a.meta-marketplace:hover,
    a.meta-country:hover {
        color: var(--text-color);
        text-decoration: none;
    }
}

/* =========================================================================
   COLLECTED PAGE SPECIFIC STYLES
   ========================================================================= */

/* Flex chain: make main a column container on collected page only,
   so .page-collected { flex: 1 } can stretch the white layer to fill main height */
body:has(.page-collected) main.container {
    display: flex;
    flex-direction: column;
}

.page-collected #collected-page {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.collected-section-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    /* Stretch to fill available main height, eliminating grey gap before footer */
}

.collected-section-shell .editorial-header {
    border-bottom: none !important;
    margin-top: 0.5rem !important;
    /* Reduced from 1rem to match Marketplace header top position */
    margin-bottom: 0 !important;
    /* Divider carries the spacing — keeps total gap matching Marketplace header */
    align-items: flex-end !important;
    /* Anchor right-side actions to bottom of header row, near the divider */
}

/* Match Marketplace breadcrumb→title gap (0.5rem) scoped to Collected only */
.collected-section-shell .product-breadcrumb {
    margin-bottom: 0.5rem !important;
}

.collected-section-divider {
    height: 1px;
    background-color: var(--border-color);
    width: 100%;
    margin-bottom: 2rem;
}

.collected-section-body {
    display: flex;
    flex-direction: column;
}

.collected-header-actions {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.collected-subtitle {
    color: var(--muted-color);
    font-size: 0.95rem;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.btn-text-muted {
    background: transparent;
    border: none;
    color: var(--muted-color);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    font-weight: normal;
    display: inline-flex;
    align-items: center;
}

.btn-text-muted:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.btn-text-muted::before {
    content: "·";
    margin: 0 0.5rem;
    text-decoration: none;
    display: inline-block;
    color: var(--muted-color);
}

.collected-empty-state {
    text-align: center;
    padding: 0 1rem;
    width: 100%;
    margin: 6rem 0 auto 0;
    /* Positions it optically above center without pushing list-view down */
}

@media (max-width: 768px) {
    .collected-empty-state {
        margin-top: 3.5rem;
    }
}

.collected-empty-state h3 {
    font-weight: normal;
    margin-bottom: 1rem;
}

.collected-empty-state p {
    color: var(--muted-color);
    margin-bottom: 2rem;
}

.btn-pill {
    padding: 0.75rem 2rem;
    border-radius: 999px;
}

.collected-debug-log {
    max-width: 1200px;
    overflow: auto;
    background: #111;
    color: #fafafa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 0.8rem;
}

/* === HOME PAGE SPACING SYSTEM === */
.home-gap-lg {
    margin-top: 0 !important;
    margin-bottom: 4rem !important;
}

.home-gap-md {
    margin-top: 0 !important;
    margin-bottom: 2.5rem !important;
}

.home-gap-sm {
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
}

@media (max-width: 768px) {
    .home-gap-lg {
        margin-bottom: 3rem !important;
    }

    .home-gap-md {
        margin-bottom: 2rem !important;
    }

    .home-gap-sm {
        margin-bottom: 1.25rem !important;
    }
}

/* === PAGE SPACING SYSTEM (Global) === */
.page-gap-lg {
    margin-bottom: 4rem !important;
}

.page-gap-md {
    margin-bottom: 2.5rem !important;
}

.page-gap-sm {
    margin-bottom: 1.5rem !important;
}

@media (max-width: 768px) {
    .page-gap-lg {
        margin-bottom: 3rem !important;
    }

    .page-gap-md {
        margin-bottom: 2rem !important;
    }

    .page-gap-sm {
        margin-bottom: 1.25rem !important;
    }
}

/* Footer Social Icons */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    width: 32px;
    height: 32px;
    transition: color 0.2s ease;
}

.footer-social-link svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer-social-link:hover,
.footer-social-link:active {
    color: #FAFAFA;
}

@media (max-width: 768px) {
    .footer-social {
        margin-bottom: 14px;
    }
}

/* Collected FAB hint (mobile only) */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
}

.collected-tip {
    font-size: 15px;
    color: #8a8a8a;
    margin-top: 3rem;
    text-align: center;
}

@media (max-width: 768px) {
    .hero-line-1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .hero-line-2 {
        font-size: 1.75rem;
        line-height: 1.15;
    }
}

@media (max-width: 768px) {
    .product-info {
        padding-left: 0rem;
        padding-right: 0rem;
    }
}

@media (max-width: 768px) {
    .product-page .product-detail {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
    }
}

@media (max-width: 768px) {
    body:has(.page-collected) main.container {
        padding-inline: 16px !important;
    }
}

@media (max-width: 640px) {
    .page-collected .editorial-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 0;
        margin: 0;
    }

    .page-collected .editorial-header > div:first-child {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .page-collected .product-breadcrumb,
    .page-collected .editorial-title,
    .page-collected .collected-subtitle {
        display: block;
        width: 100%;
        margin-left: 0;
        padding-left: 0;
    }

    .page-collected .collected-header-actions {
        display: flex;
        justify-content: flex-end;
        width: 100%;
        margin-top: 6px;
        margin-bottom: 4px;
        padding: 0;
    }
}

/* === RESTORED SAFE OVERRIDES AFTER CLEANUP PASS === */

/* Restore Collected CTA/button visual styles used by both
   the empty-state Browse finds link and the header Clear action. */
.collected-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #F5F5F5;
    padding: 4px 1.25rem 8px 1.25rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-color);
    transition: var(--transition-base);
    cursor: pointer;
    font-family: inherit;
    line-height: normal;
}

.collected-header-actions .collected-action-btn {
    margin-left: 0.5rem;
}

.collected-action-btn:hover {
    background-color: #FF2C17;
    color: #FFFFFF;
    border-color: #FF2C17;
}

/* Restore desktop hero-chip optical position adjustment */
@media (min-width: 1024px) {
    .hero-chips-bleed-wrap .category-chips-scroller {
        margin-left: -24px;
    }

    .hero-chips-bleed-wrap .category-chips-track {
        justify-content: flex-start;
    }
}

/* === PRODUCT CTA / LEGACY DISCOVERY CHIP RESTORE === */
/* The product page CTA still uses class="discovery-chip" in show.blade.php.
   Browse-by-mood markup was removed, but this visual chip style must remain
   for the marketplace CTA and any disabled CTA variants on product pages. */
.discovery-chip {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-color);
    background: #F5F5F5;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 1.25rem 8px 1.25rem;
    cursor: pointer;
    transition: var(--transition-base);
    user-select: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.discovery-chip:hover {
    background-color: #FF2C17;
    color: #FFFFFF;
    border-color: #FF2C17;
}

/* === FIX v9: keep collect icon circular, fix clear button only === */

/* collect buttons stay circular */
.card-collect-btn,
.pdp-collect-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

.card-collect-btn svg,
.pdp-collect-btn svg {
    width: 16px;
    height: 16px;
}

/* ONLY clear button gets rectangular style */
.collected-clear-btn,
.btn.btn-ghost.collected-clear-btn {
    border-radius: 6px;
    padding: 8px 14px;
}

/* === MOBILE PRODUCT CTA ALIGN FIX === */
@media (max-width: 640px) {
    .product-page .product-action-block {
        text-align: right;
        padding-right: 26px;
    }

    .product-page .product-action-block .discovery-chip {
        display: inline-flex;
        width: auto;
        margin-left: auto;
    }
}
