/* ==========================================================================
   Tribes Market - Shared Global Styles & Design System Tokens
   ========================================================================== */
/* Typography is preconnected and loaded asynchronously in HTML head */
:root {
    color-scheme: light;
    --bg-page: #f8f9fa;
    --bg-white: #ffffff;
    --bg-surface-subtle: #f1f5f9;
    --bg-surface-elevated: #f8fafc;
    --bg-input: #ffffff;
    --text-main: #1e1e24;
    --text-secondary: #475569;
    --text-muted: #6b7280;
    --text-subtle: #94a3b8;
    --border-light: #e5e7eb;
    --border-strong: #cbd5e1;
    --brand-brown: #78350f;
    --brand-ochre: #b45309;
    --brand-ochre-hover: #92400e;
    --brand-gold: #f59e0b;
    --brand-tint-bg: #fef3c7;
    --brand-tint-border: #fde68a;
    --brand-tint-text: #92400e;
    --accent-red: #ef4444;
    --accent-green: #22c55e;
    --success-bg: #dcfce7;
    --success-border: #bbf7d0;
    --success-text: #15803d;
    --danger-bg: #fee2e2;
    --danger-border: #fecaca;
    --danger-text: #b91c1c;
    --info-bg: #e0f2fe;
    --info-border: #bae6fd;
    --info-text: #0369a1;
    --purple-bg: #f3e8ff;
    --purple-border: #d8b4fe;
    --purple-text: #7e22ce;
    --radius-card: 14px;
    --radius-btn: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 15px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb: #cbd5e1;
    --bg-overlay-btn: rgba(255, 255, 255, 0.92);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-brand: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
    --brand-logo-primary: #15223f;
    --brand-logo-accent: #e8920b;
    --brand-logo-mark-gold: #fca413;
    accent-color: var(--brand-ochre);
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);

    /* --- 4-Tier Layout & Container Tokens --- */
    --page-max-width: 1280px;
    --container-max-width: 1280px;
    --gutter-fluid: clamp(12px, 3vw, 28px);

    /* --- Fluid Typography Tokens (WCAG zoom-friendly rem + vw) --- */
    --font-heading-hero: clamp(1.375rem, 1.05rem + 1.4vw, 2.125rem);
    --font-heading-section: clamp(1.1rem, 0.96rem + 0.65vw, 1.4rem);
    --font-heading-card: clamp(0.94rem, 0.88rem + 0.3vw, 1.1rem);
    --font-body: clamp(0.875rem, 0.84rem + 0.16vw, 0.95rem);
    --font-small: clamp(0.78rem, 0.75rem + 0.12vw, 0.84rem);
    --font-xs: clamp(0.7rem, 0.68rem + 0.08vw, 0.75rem);

    /* --- Fluid Spacing Tokens --- */
    --space-xs: clamp(4px, 0.8vw, 8px);
    --space-sm: clamp(8px, 1.5vw, 14px);
    --space-md: clamp(14px, 2.5vw, 22px);
    --space-lg: clamp(20px, 3.5vw, 32px);
    --space-xl: clamp(28px, 4.5vw, 48px);
    --space-2xl: clamp(40px, 6vw, 64px);
    --gap-grid: clamp(12px, 2.5vw, 24px);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg-page: #121417;
    --bg-white: #1b1e24;
    --bg-surface-subtle: #1e222a;
    --bg-surface-elevated: #242933;
    --bg-input: #16191f;
    --text-main: #f3f4f6;
    --text-secondary: #cbd5e1;
    --text-muted: #9ca3af;
    --text-subtle: #6b7280;
    --border-light: #2e3440;
    --border-strong: #3b4252;
    --brand-brown: #fbbf24;
    --brand-ochre: #f59e0b;
    --brand-ochre-hover: #d97706;
    --brand-gold: #fbbf24;
    --brand-tint-bg: rgba(245, 158, 11, 0.16);
    --brand-tint-border: rgba(245, 158, 11, 0.35);
    --brand-tint-text: #fcd34d;
    --success-bg: rgba(34, 197, 94, 0.16);
    --success-border: rgba(34, 197, 94, 0.35);
    --success-text: #4ade80;
    --danger-bg: rgba(239, 68, 68, 0.16);
    --danger-border: rgba(239, 68, 68, 0.35);
    --danger-text: #f87171;
    --info-bg: rgba(56, 189, 248, 0.16);
    --info-border: rgba(56, 189, 248, 0.35);
    --info-text: #38bdf8;
    --purple-bg: rgba(168, 85, 247, 0.16);
    --purple-border: rgba(168, 85, 247, 0.35);
    --purple-text: #c084fc;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
    --shadow-card: 0 4px 18px -2px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 12px 28px -5px rgba(0, 0, 0, 0.6);
    --scrollbar-track: #16191f;
    --scrollbar-thumb: #3b4252;
    --bg-overlay-btn: rgba(27, 30, 36, 0.88);
    --brand-logo-primary: #f3f4f6;
    --brand-logo-accent: #fca413;
    --brand-logo-mark-gold: #fca413;
}

html {
    scrollbar-gutter: stable;
    width: 100%;
    min-height: 100vh;
    overflow-x: clip;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   4-Tier Framer Hierarchy Layout Standards
   Tier 1: Canvas (html, body) - 100% width, min-height: 100vh, overflow-x: clip
   Tier 2: Global Main Container / Section Wrapper
   Tier 3: Content Container
   Tier 4: Component / Grid Elements
   ========================================================================== */
.root-canvas {
    min-height: 100vh;
    width: 100%;
    overflow-x: clip;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.main-container,
.page-container,
.content-container,
.container {
    width: 100%;
    max-width: var(--container-max-width, 1280px);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--gutter-fluid, clamp(12px, 3vw, 28px));
    padding-right: var(--gutter-fluid, clamp(12px, 3vw, 28px));
    box-sizing: border-box;
}

/* Header & Navigation */
header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 64px;
    height: auto;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.header-inner {
    max-width: var(--container-max-width, 1280px);
    width: 100%;
    min-height: 64px;
    height: auto;
    margin: 0 auto;
    padding-left: var(--gutter-fluid, clamp(12px, 3vw, 28px));
    padding-right: var(--gutter-fluid, clamp(12px, 3vw, 28px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    box-sizing: border-box;
}

.brand-logo,
.logo {
    font-family: var(--font-brand);
    font-size: clamp(1.02rem, 0.92rem + 0.48vw, 1.26rem);
    font-weight: 700;
    color: var(--brand-logo-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: clamp(7px, 0.9vw, 9px);
    line-height: 1.1;
    margin: 0;
    letter-spacing: 0.015em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.brand-logo-mark {
    width: clamp(24px, 1.32rem + 0.42vw, 30px);
    height: clamp(24px, 1.32rem + 0.42vw, 30px);
    flex-shrink: 0;
    display: block;
}

.brand-logo-mark .tm-mark-top {
    fill: var(--brand-logo-primary);
    transition: fill 0.15s ease;
}

.brand-logo-mark .tm-mark-gold {
    fill: var(--brand-logo-mark-gold);
}

.brand-logo-wordmark {
    font-weight: 700;
    color: var(--brand-logo-primary);
    transition: color 0.15s ease;
}

.brand-logo span,
.logo span {
    color: var(--brand-logo-accent);
    font-weight: 700;
}

/* Theme Toggle Button (Sun / Moon) */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 9999px;
    border: 1px solid var(--border-light);
    background: var(--bg-surface-subtle);
    color: var(--text-main);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--brand-ochre);
    color: var(--brand-ochre);
}

.theme-toggle-btn .theme-icon-sun {
    display: none;
}

.theme-toggle-btn .theme-icon-moon {
    display: block;
}

:root[data-theme="dark"] .theme-toggle-btn .theme-icon-sun {
    display: block;
}

:root[data-theme="dark"] .theme-toggle-btn .theme-icon-moon {
    display: none;
}

/* Universal Search Bar Header Element */
.search-wrapper {
    flex: 0 1 580px;
    position: relative;
    display: flex;
    align-items: stretch;
    background-color: var(--bg-surface-subtle);
    border-radius: 9999px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
    overflow: hidden;
    margin: 0;
}

.search-wrapper:focus-within {
    background-color: var(--bg-white);
    border-color: var(--border-strong);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.search-input {
    flex: 1;
    min-width: 0;
    background-color: transparent;
    border: none;
    padding: 10px 16px;
    font-size: var(--font-body);
    font-family: inherit;
    color: var(--text-main);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-subtle);
    font-size: var(--font-small);
}

.search-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    background: var(--brand-ochre);
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    padding: 0;
    flex-shrink: 0;
}

.search-submit-btn:hover {
    background: var(--brand-ochre-hover);
}

.search-submit-btn:active {
    background: var(--brand-brown);
}

.search-submit-btn svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
}

.mobile-search-toggle-btn,
.mobile-search-close-btn,
.mobile-bottom-nav {
    display: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    white-space: nowrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-small);
    font-weight: 600;
    transition: color 0.15s;
}

.nav-link:hover {
    color: var(--brand-ochre);
}

.btn-seller-badge {
    background-color: var(--brand-tint-bg);
    color: var(--brand-tint-text);
    border: 1px solid var(--brand-tint-border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: var(--font-small);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 860px) {
    header {
        min-height: 56px;
        padding: 6px 0;
    }
    .header-inner {
        min-height: 44px;
        flex-wrap: nowrap;
        padding-left: var(--gutter-fluid, clamp(12px, 3vw, 28px));
        padding-right: var(--gutter-fluid, clamp(12px, 3vw, 28px));
        gap: 10px;
    }
    .header-main {
        min-height: 44px;
    }
    .search-wrapper {
        order: initial;
        flex: 1 1 0%;
        min-width: 0;
        max-width: none;
        margin-top: 0;
    }
}

.header-main {
    max-width: var(--container-max-width, 1280px);
    width: 100%;
    min-height: 64px;
    height: auto;
    margin: 0 auto;
    padding-left: var(--gutter-fluid, clamp(12px, 3vw, 28px));
    padding-right: var(--gutter-fluid, clamp(12px, 3vw, 28px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-sizing: border-box;
}

/* Standard Buttons */
.btn-primary {
    background-color: var(--brand-ochre);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    font-size: var(--font-small);
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary:hover {
    background-color: var(--brand-ochre-hover);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--brand-ochre);
    border: 1px solid var(--brand-ochre);
    padding: 8px 16px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    font-size: var(--font-small);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    background-color: var(--brand-tint-bg);
}

.btn-signout {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
    padding: 6px 12px;
    border-radius: var(--radius-btn);
    font-size: var(--font-small);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-signout:hover {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-color: var(--danger-border);
}

/* Form Controls */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: var(--font-small);
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-btn);
    font-size: var(--font-body);
    font-family: inherit;
    background: var(--bg-input);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--brand-ochre);
    background: var(--bg-white);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 20px;
}

.modal-window {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
    box-sizing: border-box;
}

.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: var(--font-heading-section);
    cursor: pointer;
    color: var(--text-muted);
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.modal-close-btn:hover {
    background: var(--bg-surface-subtle);
    color: var(--text-main);
}

.modal-title {
    margin: 0 0 6px 0;
    font-size: var(--font-heading-card);
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-subtitle {
    font-size: var(--font-small);
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.modal-alert {
    display: none;
    padding: 12px;
    border-radius: 6px;
    font-size: var(--font-small);
    margin-bottom: 14px;
    line-height: 1.4;
}

.modal-btn-secondary {
    padding: 10px 16px;
    border: 1px solid var(--border-strong);
    background: var(--bg-white);
    color: var(--text-main);
    border-radius: var(--radius-btn);
    font-size: var(--font-small);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.modal-btn-secondary:hover {
    background: var(--bg-surface-elevated);
}

.modal-product-title {
    font-weight: 700;
    font-size: var(--font-body);
    color: var(--text-main);
}

.modal-store-meta {
    font-size: var(--font-xs);
    color: var(--text-muted);
}

/* Shared Typography Scale Utilities */
.text-hero { font-size: var(--font-heading-hero); }
.text-section { font-size: var(--font-heading-section); }
.text-card { font-size: var(--font-heading-card); }
.text-body { font-size: var(--font-body); }
.text-small { font-size: var(--font-small); }
.text-xs { font-size: var(--font-xs); }

@media (max-width: 480px) {
    .modal-backdrop { padding: 12px; }
    .modal-window { padding: 20px 16px; max-height: calc(100dvh - 24px); border-radius: 14px; }
}

/* Empty & Error Messages */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: var(--font-body);
}

.error-message {
    color: var(--danger-text);
    background-color: var(--danger-bg);
    padding: 12px;
    border-radius: 8px;
    font-size: var(--font-small);
    margin-bottom: 16px;
    display: none;
    border: 1px solid var(--danger-border);
}

.success-message {
    color: var(--success-text);
    background-color: var(--success-bg);
    padding: 12px;
    border-radius: 8px;
    font-size: var(--font-small);
    margin-bottom: 16px;
    display: none;
    border: 1px solid var(--success-border);
}

/* ==========================================================================
   Navigation Icon Buttons & Profile Dropdown
   ========================================================================== */
.nav-icon-btn {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
    padding: 0;
}

.nav-icon-btn:hover {
    background-color: var(--bg-surface-elevated);
    color: var(--brand-brown);
    border-color: var(--border-strong);
}

.nav-count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--accent-red);
    color: #ffffff;
    font-size: var(--font-xs);
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-white);
    line-height: 1;
}

.nav-notification-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background-color: var(--accent-red);
    border-radius: 50%;
    border: 2px solid var(--bg-white);
}

/* Profile Dropdown */
.profile-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    z-index: 200;
    display: none;
    animation: profileDropdownFade 0.15s ease-out;
}

.profile-dropdown-menu.show {
    display: block;
}

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

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

.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.profile-menu-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand-tint-bg);
    color: var(--brand-tint-text);
    font-weight: 800;
    font-size: var(--font-body);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--brand-tint-border);
    letter-spacing: 0.02em;
}

.profile-menu-avatar-guest {
    background: var(--bg-surface-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border-light);
}

.profile-menu-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.profile-menu-name {
    font-size: var(--font-body);
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-menu-email {
    font-size: var(--font-xs);
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 2px;
}

.profile-menu-divider {
    height: 1px;
    background: var(--border-light);
    margin: 6px 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: var(--font-small);
    font-weight: 600;
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.12s ease;
}

.profile-menu-item:hover {
    background-color: var(--bg-surface-elevated);
    color: var(--brand-ochre);
}

.profile-menu-item svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

.profile-menu-item:hover svg {
    color: var(--brand-ochre);
}

.profile-menu-item-primary {
    color: var(--brand-brown);
}

.profile-menu-item-danger {
    color: var(--danger-text);
}

.profile-menu-item-danger:hover {
    background-color: var(--danger-bg);
    color: var(--danger-text);
}

.profile-menu-item-danger svg {
    color: var(--danger-text);
}

.profile-menu-badge {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: var(--font-xs);
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

/* ==========================================================================
   Wishlist Slide-Out Drawer (Right-Hand Side)
   ========================================================================== */
.wishlist-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.wishlist-drawer-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.wishlist-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.25);
    z-index: 501;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wishlist-drawer.open {
    transform: translateX(0);
}

.wishlist-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-white);
}

.wishlist-drawer-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wishlist-drawer-title {
    font-size: var(--font-heading-card);
    font-weight: 800;
    color: var(--brand-brown);
    margin: 0;
}

.wishlist-drawer-count {
    background: var(--brand-tint-bg);
    color: var(--brand-tint-text);
    font-size: var(--font-xs);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.wishlist-drawer-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.wishlist-drawer-close-btn:hover {
    background: var(--bg-surface-elevated);
    color: var(--text-main);
}

.wishlist-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wishlist-item {
    display: flex;
    gap: 14px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wishlist-item:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.wishlist-item-img {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-surface-subtle);
}

.wishlist-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.wishlist-item-title {
    font-size: var(--font-body);
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}

.wishlist-item-title:hover {
    color: var(--brand-ochre);
}

.wishlist-item-store {
    font-size: var(--font-xs);
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 6px;
}

.wishlist-item-price {
    font-size: var(--font-body);
    font-weight: 800;
    color: var(--brand-brown);
    margin-bottom: 8px;
}

/* Shared Discount & Micro-Badge Price Display */
.product-micro-badge {
    display: inline-block;
    font-size: var(--font-xs);
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.25;
}

.badge-discount {
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
}

.price-discount-group {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 6px;
}

.price-sale-amount {
    color: var(--danger-text);
    font-weight: 800;
    font-size: inherit;
}

.price-original-strike {
    color: var(--text-subtle);
    font-weight: 500;
    font-size: 0.82em;
    text-decoration: line-through;
}

.price-regular-amount {
    font-weight: 800;
    color: inherit;
}

.wishlist-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.btn-wishlist-enquire {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: var(--font-xs);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    font-family: inherit;
}

.btn-wishlist-enquire:hover {
    background: var(--accent-green);
    color: #ffffff;
    border-color: var(--accent-green);
}

.btn-wishlist-enquire:disabled,
.btn-wishlist-enquire.wishlist-btn-disabled {
    opacity: 0.48;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--bg-surface-subtle);
    color: var(--text-muted);
    border-color: var(--border-strong);
}

.wishlist-item-unavailable {
    background: var(--bg-surface-subtle);
}

.wishlist-item-unavailable .wishlist-item-img,
.wishlist-item-unavailable .wishlist-item-title,
.wishlist-item-unavailable .wishlist-item-store,
.wishlist-item-unavailable .wishlist-item-price {
    opacity: 0.55;
}

.wishlist-unavailable-label {
    display: inline-block;
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-light);
    padding: 2px 8px;
    border-radius: 999px;
    margin: 3px 0;
}

.btn-wishlist-remove {
    background: none;
    border: none;
    color: var(--text-subtle);
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    margin-left: auto;
}

.btn-wishlist-remove:hover {
    color: var(--accent-red);
    background: var(--danger-bg);
}

.wishlist-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.wishlist-empty-state svg {
    color: var(--border-strong);
    margin-bottom: 12px;
}

.wishlist-empty-title {
    font-size: var(--font-heading-card);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.wishlist-empty-text {
    font-size: var(--font-small);
    line-height: 1.4;
}

.wishlist-empty-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.wishlist-empty-actions a {
    justify-content: center;
    text-align: center;
    text-decoration: none;
    padding: 11px 16px;
}

/* ==========================================================================
   Buyer Mobile Navigation Drawer & Hamburger Menu
   ========================================================================== */
.buyer-mobile-menu-btn {
    display: none;
}

.buyer-mobile-nav-overlay {
    display: none;
}

.buyer-mobile-drawer {
    display: none;
}

@media (max-width: 860px) {
    .buyer-mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        background: transparent;
        border: 1px solid var(--border-light);
        border-radius: 8px;
        color: var(--text-main);
        cursor: pointer;
        padding: 0;
        flex-shrink: 0;
        transition: all 0.15s ease;
    }

    .buyer-mobile-menu-btn:hover,
    .buyer-mobile-menu-btn:focus-visible {
        background: var(--bg-surface-subtle);
        border-color: var(--border-strong);
        color: var(--brand-brown);
    }

    .buyer-mobile-menu-btn:active {
        background: var(--bg-surface-elevated);
    }

    .buyer-mobile-menu-btn svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
    }

    .header-inner .brand-logo {
        margin-right: 0;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .header-inner .nav-actions {
        display: none;
    }

    .buyer-mobile-nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        z-index: 550;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
        pointer-events: none;
    }

    .buyer-mobile-nav-overlay.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .buyer-mobile-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 290px;
        max-width: 85vw;
        height: 100%;
        height: 100vh;
        height: 100dvh;
        background: var(--bg-white);
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
        z-index: 560;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .buyer-mobile-drawer.open {
        transform: translateX(0);
    }

    .buyer-mobile-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid var(--border-light);
        background: var(--bg-white);
        position: sticky;
        top: 0;
        z-index: 2;
    }

    .buyer-mobile-drawer-header .brand-logo {
        font-size: var(--font-heading-card);
        margin-right: 0;
    }

    .buyer-mobile-drawer-close {
        background: transparent;
        border: none;
        color: var(--text-muted);
        cursor: pointer;
        padding: 6px;
        border-radius: 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s ease;
    }

    .buyer-mobile-drawer-close:hover,
    .buyer-mobile-drawer-close:focus-visible {
        background: var(--bg-surface-elevated);
        color: var(--text-main);
    }

    .buyer-mobile-drawer-body {
        flex: 1;
        padding: 16px 12px;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .buyer-mobile-nav-list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .buyer-mobile-nav-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 11px 14px;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: var(--font-body);
        font-weight: 600;
        border-radius: 8px;
        transition: all 0.15s ease;
        background: transparent;
        border: none;
        width: 100%;
        text-align: left;
        cursor: pointer;
        font-family: inherit;
        box-sizing: border-box;
    }

    .buyer-mobile-nav-link:hover,
    .buyer-mobile-nav-link:focus-visible {
        background-color: var(--bg-surface-elevated);
        color: var(--brand-ochre);
    }

    .buyer-mobile-nav-link svg {
        color: var(--text-muted);
        flex-shrink: 0;
        transition: color 0.15s ease;
    }

    .buyer-mobile-nav-link:hover svg,
    .buyer-mobile-nav-link:focus-visible svg {
        color: var(--brand-ochre);
    }

    .buyer-mobile-badge {
        margin-left: auto;
        background: var(--accent-red);
        color: #ffffff;
        font-size: var(--font-xs);
        font-weight: 700;
        padding: 2px 7px;
        border-radius: 10px;
        line-height: 1;
    }

    .buyer-mobile-nav-divider {
        height: 1px;
        background: var(--border-light);
        margin: 12px 6px;
    }

    .buyer-mobile-nav-auth {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .buyer-mobile-nav-highlight {
        background-color: var(--brand-tint-bg);
        color: var(--brand-tint-text);
        border: 1px solid var(--brand-tint-border);
    }

    .buyer-mobile-nav-highlight svg {
        color: var(--brand-ochre);
    }

    .buyer-mobile-nav-highlight:hover,
    .buyer-mobile-nav-highlight:focus-visible {
        background-color: var(--brand-tint-border);
        color: var(--brand-brown);
    }

    .buyer-mobile-nav-highlight:hover svg,
    .buyer-mobile-nav-highlight:focus-visible svg {
        color: var(--brand-brown);
    }
}

@media (max-width: 579px) {
    header {
        min-height: 40px;
        padding: 0;
        transition: transform 0.24s ease;
        will-change: transform;
    }

    .header-inner {
        min-height: 40px;
        padding-left: 12px;
        padding-right: 12px;
        gap: 8px;
    }

    .brand-logo,
    .logo {
        font-size: 0.94rem;
        line-height: 1.1;
        gap: 5px;
    }

    .brand-logo .brand-logo-mark,
    .logo .brand-logo-mark {
        width: 20px;
        height: 20px;
    }

    .theme-toggle-btn {
        width: 32px;
        height: 32px;
    }

    .header-inner .brand-logo {
        margin-right: auto;
    }

    .header-inner .search-wrapper {
        display: none;
    }

    .mobile-search-toggle-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        background: var(--brand-ochre);
        border: 1px solid var(--brand-ochre);
        border-radius: 50%;
        color: #ffffff;
        cursor: pointer;
        padding: 0;
        flex-shrink: 0;
        transition: all 0.15s ease;
    }

    .mobile-search-toggle-btn svg {
        width: 15px;
        height: 15px;
    }

    .mobile-search-toggle-btn:hover,
    .mobile-search-toggle-btn:focus-visible {
        background: var(--brand-ochre-hover);
        border-color: var(--brand-ochre-hover);
        color: #ffffff;
    }

    .mobile-search-toggle-btn:active {
        background: var(--brand-brown);
        border-color: var(--brand-brown);
    }

    header.mobile-search-open .buyer-mobile-menu-btn,
    header.mobile-search-open .brand-logo,
    header.mobile-search-open .mobile-search-toggle-btn {
        display: none;
    }

    header.mobile-search-open .search-wrapper {
        display: flex;
        flex: 1 1 100%;
        min-width: 0;
    }

    header.mobile-search-open .mobile-search-close-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        background: transparent;
        border: none;
        border-right: 1px solid var(--border-light);
        color: var(--text-secondary);
        cursor: pointer;
        padding: 0;
        flex-shrink: 0;
    }

    header.mobile-search-open .mobile-search-close-btn:hover,
    header.mobile-search-open .mobile-search-close-btn:focus-visible {
        background: var(--bg-surface-elevated);
        color: var(--text-main);
    }

    header.mobile-search-open .search-input {
        padding: 5px 10px;
        font-size: 0.85rem;
    }

    header.mobile-search-open .search-submit-btn {
        width: 36px;
    }

    body:has(#mobileBottomNav) .buyer-mobile-menu-btn {
        display: none;
    }

    body:has(#mobileBottomNav) {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-bottom-nav {
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 520;
        background: var(--bg-white);
        border-top: 1px solid var(--border-light);
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
        min-height: 58px;
        box-sizing: border-box;
        transition: transform 0.24s ease;
        will-change: transform;
    }

    .mobile-bottom-nav-item {
        flex: 1 1 0%;
        min-width: 0;
        min-height: 46px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        background: transparent;
        border: none;
        color: var(--text-secondary);
        text-decoration: none;
        font-family: inherit;
        font-size: 0.68rem;
        font-weight: 600;
        line-height: 1.1;
        cursor: pointer;
        padding: 4px 2px;
        border-radius: 8px;
        transition: color 0.15s ease, background-color 0.15s ease;
    }

    .mobile-bottom-nav-item.active,
    .mobile-bottom-nav-item:hover,
    .mobile-bottom-nav-item:focus-visible {
        color: var(--brand-ochre);
    }

    .mobile-bottom-nav-icon {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-bottom-nav-badge {
        position: absolute;
        top: -5px;
        right: -9px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 999px;
        background: var(--accent-red);
        color: #ffffff;
        font-size: 0.62rem;
        font-weight: 800;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    body.mobile-bars-hidden header {
        transform: translateY(-100%);
    }

    body.mobile-bars-hidden .mobile-bottom-nav {
        transform: translateY(100%);
    }

    .price-discount-group {
        gap: 2px 4px;
    }

    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    textarea,
    select:not(.control-select) {
        font-size: 1rem;
    }
}

/* ==========================================================================
   WhatsApp-Style 2-Way Help & Feedback Support Chat
   ========================================================================== */
.tm-support-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.tm-support-modal.open {
    display: flex;
}

.tm-support-modal-window {
    width: 100%;
    max-width: 520px;
    height: min(640px, 86dvh);
    background: var(--bg-white);
    color: var(--text-main);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.tm-chat-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: var(--bg-white);
    color: var(--text-main);
}

.tm-chat-shell--embedded {
    height: clamp(460px, 68vh, 660px);
}

.tm-chat-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.tm-chat-header-meta {
    min-width: 0;
}

.tm-chat-header-title {
    margin: 0;
    font-size: var(--font-heading-card);
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
}

.tm-chat-header-sub {
    margin: 2px 0 0 0;
    font-size: var(--font-xs);
    color: var(--text-muted);
}

.tm-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tm-chat-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: var(--font-xs);
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}

.tm-chat-status-pill.is-open {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: var(--success-border);
}

.tm-chat-status-pill.is-resolved {
    background: var(--bg-surface-subtle);
    color: var(--text-secondary);
    border-color: var(--border-light);
}

.tm-chat-close-btn {
    background: var(--bg-surface-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 6px 11px;
    min-height: 32px;
    font-size: var(--font-xs);
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tm-chat-close-btn:hover {
    background: var(--bg-surface-elevated);
    color: var(--text-main);
    border-color: var(--border-strong);
}

.tm-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-surface-elevated);
}

.tm-chat-empty {
    margin: auto;
    max-width: 360px;
    text-align: center;
    padding: 20px 16px;
    border-radius: 12px;
    background: var(--bg-white);
    border: 1px dashed var(--border-strong);
    color: var(--text-muted);
    font-size: var(--font-small);
    line-height: 1.5;
}

.tm-chat-empty strong {
    display: block;
    color: var(--text-main);
    margin-bottom: 4px;
    font-size: var(--font-body);
}

.tm-chat-bubble-row {
    display: flex;
    flex-direction: column;
    max-width: 82%;
}

.tm-chat-bubble-row.is-mine {
    align-self: flex-end;
    align-items: flex-end;
}

.tm-chat-bubble-row.is-theirs {
    align-self: flex-start;
    align-items: flex-start;
}

.tm-chat-bubble {
    padding: 9px 13px;
    font-size: var(--font-small);
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: var(--shadow-sm);
}

.tm-chat-bubble-row.is-mine .tm-chat-bubble {
    background: var(--brand-ochre);
    color: #ffffff;
    border-radius: 14px 14px 4px 14px;
}

.tm-chat-bubble-row.is-theirs .tm-chat-bubble {
    background: var(--bg-white);
    color: var(--text-main);
    border: 1px solid var(--border-light);
    border-radius: 14px 14px 14px 4px;
}

.tm-chat-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 3px;
    padding: 0 2px;
}

.tm-chat-composer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-white);
    flex-shrink: 0;
}

.tm-chat-input {
    flex: 1;
    min-width: 0;
    resize: none;
    min-height: 40px;
    max-height: 110px;
    padding: 9px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-main);
    font-family: inherit;
    font-size: var(--font-small);
    line-height: 1.4;
    outline: none;
    transition: border-color 0.15s ease;
}

.tm-chat-input:focus {
    border-color: var(--brand-ochre);
}

.tm-chat-send-btn {
    min-height: 40px;
    padding: 9px 16px;
    flex-shrink: 0;
}

.tm-chat-error-bar {
    padding: 8px 14px;
    background: var(--danger-bg);
    color: var(--danger-text);
    border-top: 1px solid var(--danger-border);
    font-size: var(--font-xs);
    font-weight: 600;
    display: none;
}

/* ==========================================================================
   Interactive Spotlight Experience Engine (Borderless Screen Text + Curved Arrow)
   ========================================================================== */
.tm-spotlight-scrim {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2099;
    opacity: 0;
    visibility: hidden;
    background-color: rgba(8, 10, 16, 0.82);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

:root[data-theme="dark"] .tm-spotlight-scrim {
    background-color: rgba(4, 6, 11, 0.86);
}

.tm-spotlight-scrim.is-visible {
    opacity: 1;
    visibility: visible;
}

.tm-spotlight-scrim.use-fallback-shadow {
    display: none !important;
}

.tm-spotlight-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-radius: 8px;
    pointer-events: none;
    z-index: 2100;
    opacity: 0;
    visibility: hidden;
    box-shadow:
        0 0 0 2px var(--brand-gold),
        0 8px 26px rgba(0, 0, 0, 0.45);
    transition:
        top 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        left 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        border-radius 0.24s ease,
        opacity 0.2s ease,
        visibility 0.2s ease;
    animation: tmSpotlightPulse 2.4s ease-in-out infinite;
}

:root[data-theme="dark"] .tm-spotlight-ring {
    box-shadow:
        0 0 0 2px var(--brand-gold),
        0 8px 30px rgba(0, 0, 0, 0.6);
}

.tm-spotlight-ring.is-visible {
    opacity: 1;
    visibility: visible;
}

.tm-spotlight-ring.is-ambient {
    width: 0 !important;
    height: 0 !important;
    top: 50vh !important;
    left: 50vw !important;
    box-shadow: none;
    opacity: 0 !important;
    animation: none;
}

.tm-spotlight-ring.use-fallback-shadow {
    box-shadow:
        0 0 0 100vmax rgba(8, 10, 16, 0.82),
        0 0 0 2px var(--brand-gold),
        0 8px 26px rgba(0, 0, 0, 0.45);
}

:root[data-theme="dark"] .tm-spotlight-ring.use-fallback-shadow {
    box-shadow:
        0 0 0 100vmax rgba(4, 6, 11, 0.86),
        0 0 0 2px var(--brand-gold),
        0 8px 30px rgba(0, 0, 0, 0.6);
}

.tm-spotlight-ring.is-visible.use-fallback-shadow.is-ambient {
    box-shadow: 0 0 0 100vmax rgba(8, 10, 16, 0.82);
    opacity: 1 !important;
}

:root[data-theme="dark"] .tm-spotlight-ring.is-visible.use-fallback-shadow.is-ambient {
    box-shadow: 0 0 0 100vmax rgba(4, 6, 11, 0.86);
    opacity: 1 !important;
}

@keyframes tmSpotlightPulse {
    0%, 100% {
        outline: 2px solid rgba(251, 191, 36, 0.7);
        outline-offset: 0px;
    }
    50% {
        outline: 2px solid rgba(251, 191, 36, 0.18);
        outline-offset: 2px;
    }
}

/* Dynamic Curved Arrow Layer */
.tm-spotlight-arrow-svg {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2140;
    opacity: 0;
    visibility: hidden;
    overflow: visible;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.tm-spotlight-arrow-svg.is-visible {
    opacity: 1;
    visibility: visible;
}

.tm-spotlight-arrow-path,
.tm-spotlight-arrow-head {
    fill: none;
    stroke: #fbbf24;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Borderless Floating Typography & Controls Directly on Dimmed Screen */
.tm-spotlight-card {
    position: fixed;
    inset: auto;
    margin: 0;
    padding: 0;
    width: clamp(248px, calc(100vw - 28px), 328px);
    max-width: calc(100vw - 28px);
    background: transparent !important;
    color: #ffffff;
    border: none !important;
    box-shadow: none !important;
    overflow: visible;
    pointer-events: none;
    z-index: 2150;
    display: none;
    font-family: var(--font-sans);
    transition:
        top 0.26s cubic-bezier(0.22, 1, 0.36, 1),
        left 0.26s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.2s ease;
}

@supports not selector(:popover-open) {
    .tm-spotlight-card[popover]:not(.\:popover-open):not(.is-open) {
        display: none;
    }
}

.tm-spotlight-card:is(:popover-open, .\:popover-open, .is-open) {
    display: block;
}

.tm-spotlight-card-inner {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tm-spotlight-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tm-spotlight-meta-group {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    min-width: 0;
}

.tm-spotlight-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.18);
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, 0.42);
    font-size: var(--font-xs);
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Keep light-card hub badges legible inside Guides modal */
.tm-guide-hub-card .tm-spotlight-badge {
    background: var(--brand-tint-bg);
    color: var(--brand-tint-text);
    border-color: var(--brand-tint-border);
}

.tm-spotlight-tour-label {
    font-size: var(--font-xs);
    font-weight: 700;
    color: rgba(226, 232, 240, 0.78);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 175px;
}

.tm-spotlight-close-btn {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #f8fafc;
    min-width: 28px;
    min-height: 28px;
    padding: 4px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.tm-spotlight-close-btn:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.45);
    color: #ffffff;
}

.tm-spotlight-close-btn:focus-visible,
.tm-spotlight-btn:focus-visible,
.tm-spotlight-dot:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

.nav-guide-trigger-btn:focus-visible,
.tm-guide-hub-card:focus-visible {
    outline: 2px solid var(--brand-ochre);
    outline-offset: 2px;
}

.tm-spotlight-title {
    margin: 0;
    font-size: clamp(0.98rem, 2.2vw, 1.12rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.28;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.92), 0 1px 3px rgba(0, 0, 0, 0.95);
}

.tm-spotlight-body {
    margin: 0;
    font-size: clamp(0.82rem, 1.8vw, 0.9rem);
    color: rgba(241, 245, 249, 0.94);
    line-height: 1.48;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.92), 0 1px 3px rgba(0, 0, 0, 0.95);
}

.tm-spotlight-action-hint {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 0;
    margin-top: 1px;
    background: transparent;
    border: none;
    color: #fcd34d;
    font-size: var(--font-xs);
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.92);
}

.tm-spotlight-action-hint[hidden] {
    display: none;
}

.tm-spotlight-action-hint svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.tm-spotlight-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 6px;
    margin-top: 2px;
    border-top: none;
}

.tm-spotlight-dots {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.tm-spotlight-dot {
    position: relative;
    width: 5px;
    height: 5px;
    min-width: 5px;
    min-height: 5px;
    padding: 0;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.tm-spotlight-dot::before {
    content: "";
    position: absolute;
    inset: -5px -2px;
}

.tm-spotlight-dot.is-done {
    background: rgba(251, 191, 36, 0.58);
}

.tm-spotlight-dot.is-active {
    width: 12px;
    background: #fbbf24;
}

.tm-spotlight-controls {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.tm-spotlight-btn {
    min-height: 33px;
    padding: 6px 13px;
    border-radius: 999px;
    font-family: inherit;
    font-size: var(--font-xs);
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.tm-spotlight-btn:active {
    transform: scale(0.98);
}

.tm-spotlight-btn-secondary {
    background: rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.tm-spotlight-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.tm-spotlight-btn-ghost {
    background: transparent;
    color: rgba(226, 232, 240, 0.82);
    border: 1px solid transparent;
    padding: 6px 8px;
    font-size: var(--font-xs);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.tm-spotlight-btn-ghost:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.tm-spotlight-btn-primary {
    background: #f59e0b;
    color: #1c1917;
    border: 1px solid #fbbf24;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.tm-spotlight-btn-primary:hover {
    background: #fbbf24;
    border-color: #fde68a;
}

/* Header Guide Pill Button (Shopper Navigation) */
.nav-guide-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    padding: 0 11px;
    border-radius: 999px;
    background: var(--brand-tint-bg);
    color: var(--brand-tint-text);
    border: 1px solid var(--brand-tint-border);
    font-family: var(--font-sans);
    font-size: var(--font-xs);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nav-guide-trigger-btn:hover {
    background: var(--brand-tint-border);
    border-color: var(--brand-gold);
    color: var(--brand-brown);
}

/* Seller & Shopper Guides Hub Cards */
.tm-guides-hub-section-label {
    font-size: var(--font-xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 14px 0 8px 0;
}

.tm-guides-hub-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tm-guide-hub-card {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: var(--bg-surface-elevated);
    color: var(--text-main);
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.tm-guide-hub-card:hover {
    border-color: var(--brand-gold);
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.tm-guide-hub-card--featured {
    background: var(--brand-tint-bg);
    border-color: var(--brand-tint-border);
}

.tm-guide-hub-card--featured:hover {
    border-color: var(--brand-gold);
    background: var(--brand-tint-bg);
}

.tm-guide-hub-info {
    min-width: 0;
    flex: 1;
}

.tm-guide-hub-title-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.tm-guide-hub-title {
    font-size: var(--font-body);
    font-weight: 800;
    color: var(--text-main);
}

.tm-guide-hub-done-pill {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
    font-size: 0.68rem;
    font-weight: 800;
}

.tm-guide-hub-desc {
    font-size: var(--font-small);
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.4;
}

.tm-guide-hub-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-xs);
    font-weight: 800;
    color: var(--brand-ochre);
    flex-shrink: 0;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
}

@media (pointer: coarse) {
    .tm-spotlight-close-btn {
        min-width: 38px;
        min-height: 38px;
    }
    .tm-spotlight-btn {
        min-height: 38px;
    }
    .tm-spotlight-dot {
        width: 5px;
        height: 5px;
        min-width: 5px;
        min-height: 5px;
    }
    .tm-spotlight-dot.is-active {
        width: 13px;
    }
}

@media (max-width: 579px) {
    body:has(#mobileBottomNav, #sellerMobileBottomNav, #productMobileStickyBar) #shopperGuideToast,
    body:has(#mobileBottomNav, #sellerMobileBottomNav, #productMobileStickyBar) #sellerToast,
    body:has(#mobileBottomNav, #sellerMobileBottomNav, #productMobileStickyBar) #productToast {
        bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
        max-width: calc(100vw - 28px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tm-spotlight-scrim,
    .tm-spotlight-ring,
    .tm-spotlight-card,
    .tm-spotlight-dot,
    .tm-spotlight-btn {
        transition: none !important;
        animation: none !important;
    }
}

/* ==========================================================================
   Site-Wide Footer & Contextual Legal Links
   ========================================================================== */
.site-footer {
    margin-top: auto;
    width: 100%;
    border-top: 1px solid var(--border-light);
    background: var(--bg-white);
    padding: clamp(14px, 2vw, 20px) 0;
    box-sizing: border-box;
}

.site-footer-inner {
    max-width: var(--container-max-width, 1280px);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--gutter-fluid, clamp(12px, 3vw, 28px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: var(--font-xs);
    color: var(--text-muted);
    box-sizing: border-box;
}

.site-footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 16px;
}

.site-footer-links a,
.site-footer-link-btn {
    color: var(--text-secondary);
    font-weight: 600;
    text-decoration: none;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    transition: color 0.15s ease;
}

.site-footer-links a:hover,
.site-footer-links a:focus-visible,
.site-footer-link-btn:hover,
.site-footer-link-btn:focus-visible {
    color: var(--brand-ochre);
    text-decoration: underline;
}

.profile-menu-legal-row,
.mobile-drawer-legal-row,
.seller-legal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 10px 4px;
    font-size: var(--font-xs);
    color: var(--text-muted);
}

.mobile-drawer-legal-row {
    justify-content: flex-start;
    padding: 10px 14px 4px;
}

.seller-legal-links {
    padding: 4px 2px 0;
    justify-content: center;
}

.profile-menu-legal-row a,
.mobile-drawer-legal-row a,
.seller-legal-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
}

.profile-menu-legal-row a:hover,
.mobile-drawer-legal-row a:hover,
.seller-legal-links a:hover {
    color: var(--brand-ochre);
    text-decoration: underline;
}

.legal-inline-note,
.order-modal-legal-note {
    margin: 10px 0 12px 0;
    font-size: var(--font-xs);
    color: var(--text-muted);
    line-height: 1.45;
    text-align: center;
}

.legal-inline-note {
    text-align: left;
}

.legal-inline-note a,
.order-modal-legal-note a {
    color: var(--brand-ochre);
    font-weight: 600;
    text-decoration: underline;
}

@media (max-width: 579px) {
    .site-footer-inner {
        justify-content: center;
        text-align: center;
    }

    .site-footer-links {
        justify-content: center;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.turnstile-slot {
    display: none;
    justify-content: center;
    align-items: center;
    margin: 10px 0 12px;
    min-height: 65px;
    width: 100%;
}

.verified-store-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.verified-store-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px 2px 5px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    vertical-align: middle;
}

.verified-store-pill--id {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.verified-store-pill--biz {
    background: var(--info-bg);
    color: var(--info-text);
    border: 1px solid var(--info-border);
}
