/* ── Design System Tokens ── */
:root {
    --top-banner-height: 40px;

    /* Typography */
    --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fw-light: 300;
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-black: 800;

    /* Colors – refined neutral palette */
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-text-primary: #0a0a0a;
    --color-text-secondary: #525252;
    --color-text-tertiary: #a3a3a3;
    --color-border: #e5e5e5;
    --color-border-subtle: #f0f0f0;
    --color-accent: #0a0a0a;

    /* Spacing */
    --section-py: clamp(4rem, 8vw, 7rem);
    --section-px: clamp(1.25rem, 4vw, 2.5rem);
    --container-max: 1280px;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --duration-fast: 200ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Hide ALL scrollbars — clean app-like feel */
html,
body {
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE/Edge legacy */
}

::-webkit-scrollbar {
    display: none !important;       /* Chrome, Safari, Edge (Chromium) */
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}


html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    font-family: var(--font-base);
    color: var(--color-text-secondary);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent any section or container from causing horizontal overflow */
section,
.container,
main,
footer {
    max-width: 100%;
    overflow-x: clip;
}

/* Global image safety — prevent images from overflowing on small screens */
img {
    max-width: 100%;
    height: auto;
}


body.scroll-locked {
    overflow: hidden;
    overscroll-behavior: contain;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--color-accent);
    color: var(--color-surface);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: var(--fw-bold);
    line-height: 1;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: min(100%, 24rem);
    max-width: 100vw;
    height: 100vh;
    background: var(--color-surface);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
    transition: right 0.35s var(--ease-out-expo);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.35s var(--ease-out-expo);
    z-index: 999;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.close-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    border-radius: 999px;
    transition: background-color var(--duration-fast) ease;
}

.close-cart-btn:hover {
    background: var(--color-border-subtle);
}

#Store {
    scroll-margin-top: calc(var(--top-banner-height) + 1rem);
}

#products-container,
#no-results {
    min-height: 18rem;
}

@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

.product-item {
    transition: transform var(--duration-slow) var(--ease-out-expo),
                box-shadow var(--duration-slow) var(--ease-out-expo),
                opacity var(--duration-slow) ease;
    will-change: transform;
    border-radius: 1rem;
}

.product-item:hover {
    transform: translateY(-6px) scale(1.01);
}

/* Product badges */
.badge-new {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    color: #111;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.02em;
}

.badge-bestseller {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #111;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.02em;
}

.badge-discount {
    display: inline-flex;
    align-items: center;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 999px;
}

.badge-soldout {
    display: inline-flex;
    align-items: center;
    background: #111;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 5px 12px;
    border-radius: 999px;
}

.add-to-cart-btn {
    border: none;
    cursor: pointer;
    transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
}

.add-to-cart-btn:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.popup-backdrop {
    opacity: 0;
    transition: opacity 220ms ease;
}

.popup-shell {
    opacity: 0;
    transform: translateY(20px) scale(0.985);
    transition: opacity 240ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.popup-shell.is-open,
.popup-backdrop.is-open {
    opacity: 1;
}

.popup-shell.is-open {
    transform: translateY(0) scale(1);
}

.auth-shell {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.28), transparent 34%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.18), transparent 30%),
        #0f172a;
    max-height: min(92vh, 58rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.auth-panel-brand {
    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.95)),
        url('https://images.unsplash.com/photo-1516321318423-f06f85e504b3?q=80&w=1200&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

.auth-panel-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.72)),
        linear-gradient(135deg, rgba(59, 130, 246, 0.26), transparent 40%);
    pointer-events: none;
}

.auth-panel-brand > * {
    position: relative;
    z-index: 1;
}

.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.24em;
}

.auth-kicker {
    color: #bfdbfe;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.auth-feature-item {
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.auth-password-wrap {
    position: relative;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.85rem;
    transform: translateY(-50%);
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.auth-password-toggle:hover {
    color: #0f172a;
}

.auth-tab {
    color: #64748b;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.auth-tab.active {
    background: #0f172a;
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.auth-input {
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.auth-input:focus {
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.08);
}

.auth-input-error {
    border-color: #fda4af !important;
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.08);
}

.auth-inline-error {
    min-height: 1.25rem;
    margin-top: -0.35rem;
    font-size: 0.82rem;
    color: #e11d48;
}

.auth-form-message {
    min-height: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: transparent;
}

.auth-form-message.has-message {
    color: #e11d48;
}

.auth-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 0;
    border-radius: 1rem;
    background: #020617;
    padding: 0.95rem 1rem;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.auth-submit-button:hover {
    background: #111827;
}

.auth-submit-button:disabled {
    cursor: not-allowed;
}

.account-shell {
    max-height: calc(100vh - 7rem);
    -webkit-overflow-scrolling: touch;
}

.account-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-shell {
    max-height: calc(100vh - 3rem);
    -webkit-overflow-scrolling: touch;
}

.admin-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .auth-shell {
        max-height: min(92dvh, 44rem);
        border-radius: 1.5rem;
        background: #ffffff;
    }

    .auth-panel-brand {
        display: none;
    }

    .auth-panel-form {
        min-height: auto;
        padding: 1.5rem 1.25rem 1.75rem !important;
    }

    #auth-shell .grid {
        display: block;
    }

    #auth-close {
        right: 1rem;
        top: 1rem;
        height: 2.75rem;
        width: 2.75rem;
    }

    .account-shell {
        margin-top: 3.5rem;
        max-height: calc(100vh - 5rem);
        border-radius: 1.5rem;
    }

    .admin-shell {
        margin-top: 1rem;
        max-height: calc(100vh - 2rem);
        border-radius: 1.5rem;
    }
}

@media (max-height: 780px) {
    .auth-shell,
    .account-shell,
    .admin-shell {
        max-height: calc(100vh - 2rem);
    }
}

/* Home page */
.marquee-bar {
    background: #000;
    color: #fff;
    overflow: hidden;
    overflow-x: clip;
    clip-path: inset(0);
    contain: paint;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 70;
    height: 40px;
    display: flex;
    align-items: center;
    isolation: isolate;
}

.marquee-bar::before,
.marquee-bar::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 72px;
    z-index: 1;
    pointer-events: none;
}

.marquee-bar::before {
    left: 0;
    background: linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0) 100%);
}

.marquee-bar::after {
    right: 0;
    background: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0) 100%);
}

.marquee-inner {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    width: max-content;
    min-width: max-content;
    will-change: transform;
    animation: marquee-scroll 24s linear infinite;
}

.marquee-group {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    gap: clamp(1.75rem, 3vw, 3rem);
    flex: 0 0 auto;
    min-width: max-content;
    padding-inline: 1rem;
}

.marquee-group span {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.82rem;
    letter-spacing: 0;
    line-height: 1;
}

.marquee-inner:hover {
    animation-play-state: paused;
}

#header {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--top-banner-height);
    z-index: 60;
    background: transparent;
    box-shadow: none;
    margin-bottom: 0;
    transition: top 0.3s var(--ease-out-quart),
                background-color 0.3s var(--ease-out-quart),
                box-shadow 0.3s var(--ease-out-quart),
                border-color 0.3s var(--ease-out-quart);
}

#header .container {
    background: transparent;
    border: 0;
    border-radius: 0;
    margin-top: 0;
    box-shadow: none;
}

.navbar-link,
.navbar-brand,
.navbar-icon-btn {
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    transition: color var(--duration-fast) ease,
                opacity var(--duration-fast) ease;
}

/* Nav link hover underline */
.navbar-link {
    position: relative;
    font-size: 0.82rem;
    font-weight: var(--fw-medium);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.navbar-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 70%;
    height: 1px;
    background: currentColor;
    transform: translateX(-50%) scaleX(0);
    transition: transform var(--duration-normal) var(--ease-out-expo);
    transform-origin: center;
}

.navbar-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Brand logo */
.navbar-brand {
    font-weight: var(--fw-bold);
    letter-spacing: 0.08em;
    font-size: 1.1rem;
}

.navbar-link:hover,
.navbar-brand:hover,
.navbar-icon-btn:hover {
    color: #ffffff;
}

/* Login/Logout text-link style */
.navbar-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: #f8fafc;
    font-size: 0.8rem;
    font-weight: var(--fw-medium);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background-color var(--duration-fast) ease,
                border-color var(--duration-fast) ease,
                color var(--duration-fast) ease;
}

.navbar-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.5);
}

#header.header-solid .container {
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    width: 100%;
    margin-top: 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

#header.header-solid {
    background: var(--color-surface);
    box-shadow: none;
    border-bottom: 1px solid var(--color-border);
}

#header.header-solid .navbar-link,
#header.header-solid .navbar-brand,
#header.header-solid .navbar-icon-btn {
    color: var(--color-text-primary);
}

#header.header-solid .navbar-link:hover,
#header.header-solid .navbar-brand:hover,
#header.header-solid .navbar-icon-btn:hover {
    color: var(--color-text-primary);
    opacity: 0.7;
}

#header.header-solid .navbar-pill {
    border-color: var(--color-border);
    background: transparent;
    color: var(--color-text-primary);
}

#header.header-solid .navbar-pill:hover {
    border-color: var(--color-text-tertiary);
    background: var(--color-border-subtle);
    color: var(--color-text-primary);
}

.navbar-side {
    flex: 1 1 0;
    min-width: 0;
}

.navbar-side-left {
    justify-content: flex-start;
}

.navbar-side-right {
    justify-content: flex-end;
}

.navbar-center {
    z-index: 1;
}

.navbar-search-wrap {
    gap: 0.5rem;
    min-width: 3rem;
}

.navbar-search-input {
    width: 0;
    min-width: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    outline: none;
}

.navbar-search-input::placeholder {
    color: rgba(248, 250, 252, 0.72);
}

.navbar-search-input.w-64 {
    width: 16rem;
    padding: 0.6rem 5.1rem 0.6rem 1rem;
    border-color: rgba(255, 255, 255, 0.16);
}

.navbar-search-btn,
.navbar-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f8fafc;
    transition: color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.navbar-search-btn {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    height: 2.5rem;
    width: 2.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.navbar-search-btn:hover,
.navbar-search-clear:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.navbar-search-clear {
    position: absolute;
    right: 3.2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    height: 2rem;
    width: 2rem;
    border-radius: 999px;
    cursor: pointer;
}

.navbar-search-clear:not(.opacity-0) {
    background: rgba(255, 255, 255, 0.16);
}

.mobile-safe-media {
    width: 100%;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.setup-card-stack {
    width: 100%;
}

.feature-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.navbar-search-input.w-64 + .navbar-search-btn {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.26);
}

/* FIX Bug #2 & #3: Split selectors so mobile-menu-toggle is visible on mobile
   and mobile-nav-menu can be shown/hidden by JS removing/adding the .hidden class. */

/* Mobile nav menu: hidden by default, shown by JS (removing .hidden class) */
.mobile-nav-menu {
    display: none;
}

/* Mobile menu toggle: hidden on desktop (md+), visible on mobile via flex */
@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-nav-menu.hidden,
.mobile-nav-search-clear.hidden,
.mobile-nav-action.hidden {
    display: none !important;
}

/* FIX Bug #3: When JS removes .hidden, the menu must be visible */
.mobile-nav-menu:not(.hidden) {
    display: block;
}

.mobile-menu-toggle {
    align-items: center;
    justify-content: center;
    height: 2.75rem;
    width: 2.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.18);
    color: #f8fafc;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.mobile-nav-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 40;
    padding: 0.5rem 0 0;
}

.mobile-nav-card {
    margin-left: auto;
    width: min(100%, 22rem);
    max-width: calc(100vw - 1rem);
    border-radius: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.82);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.16);
    padding: 0.9rem;
}

.mobile-nav-search {
    position: relative;
}

.mobile-nav-search-input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background: #ffffff;
    color: #0f172a;
    outline: none;
    padding: 0.78rem 2.85rem 0.78rem 1rem;
    font-size: 0.92rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mobile-nav-search-input:focus {
    border-color: rgba(148, 163, 184, 0.9);
    box-shadow: 0 0 0 4px rgba(241, 245, 249, 0.9);
}

.mobile-nav-search-clear {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.25rem;
    width: 2.25rem;
    border-radius: 999px;
    color: #64748b;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-nav-search-clear:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.mobile-nav-actions {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.55rem;
}

.mobile-nav-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    width: 100%;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background: #ffffff;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 600;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.mobile-nav-action:hover {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.45);
}

#header.header-solid .navbar-search-input {
    background: #f8fafc;
    color: #334155;
}

#header.header-solid .navbar-search-input::placeholder {
    color: #94a3b8;
}

#header.header-solid .navbar-search-input.w-64 {
    border-color: rgba(148, 163, 184, 0.2);
}

#header.header-solid .navbar-search-btn,
#header.header-solid .navbar-search-clear {
    color: #475569;
}

#header.header-solid .navbar-search-btn {
    border-color: rgba(148, 163, 184, 0.18);
    background: #ffffff;
}

#header.header-solid .navbar-search-btn:hover,
#header.header-solid .navbar-search-clear:hover {
    color: #0f172a;
}

#header.header-solid .navbar-search-clear:not(.opacity-0) {
    background: rgba(148, 163, 184, 0.12);
}

#header.header-solid .mobile-menu-toggle {
    border-color: rgba(148, 163, 184, 0.18);
    background: #ffffff;
    color: #334155;
}

#header.header-solid .mobile-menu-toggle:hover {
    background: #f8fafc;
    color: #0f172a;
}

.hero-showcase {
    background-image: url('https://images.unsplash.com/photo-1714359177644-dc07d4c562b8?q=80&w=1631&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    min-height: 100vh;
    min-height: 100svh;
    background-size: cover;
    background-position: center;
    touch-action: pan-y;
}

.hero-overlay {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.18) 0%,
        rgba(0, 0, 0, 0.06) 35%,
        rgba(0, 0, 0, 0.42) 100%
    );
    pointer-events: none;
}

/* Hero CTA */
.hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--color-surface);
    color: var(--color-accent);
    padding: 0.9rem 2.4rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background var(--duration-fast) ease,
                color var(--duration-fast) ease,
                transform var(--duration-fast) ease;
    min-height: 48px;
}

.hero-cta:hover {
    background: var(--color-accent);
    color: var(--color-surface);
}

.hero-cta:active {
    transform: scale(0.97);
}

/* Editorial product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    /* Feature item: first and every 7th get editorial treatment */
    .product-grid .product-item:nth-child(7n + 1) {
        grid-column: span 2;
        grid-row: span 2;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.75rem;
    }

    .product-grid .product-item:nth-child(7n + 1) {
        grid-column: span 2;
        grid-row: span 2;
    }
}

/* Product card images */
.product-img {
    transition: transform 0.7s var(--ease-out-expo),
                opacity var(--duration-slow) ease;
}

.product-item:hover .product-img {
    transform: scale(1.06);
}

.product-quick-add {
    pointer-events: none;
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 100%);
}

.product-quick-add > * {
    pointer-events: auto;
}

/* Quick-add glass button */
.product-quick-add .add-to-cart-btn {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.06em;
}

.product-quick-add .add-to-cart-btn:hover {
    background: var(--color-accent);
    color: var(--color-surface);
    border-color: var(--color-accent);
}

.product-quick-add .add-to-cart-btn:active {
    transform: scale(0.97);
}

section[id] {
    scroll-margin-top: calc(var(--top-banner-height) + 1rem);
}


@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Checkout page */
.checkout-page .checkout-step {
    transition: all 0.3s ease;
}

.checkout-page .checkout-step.active {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.checkout-page .checkout-step.completed {
    border-color: #10b981;
    background-color: #ecfdf5;
}

.checkout-page .step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.checkout-page .step-number.active {
    background-color: #3b82f6;
    color: #fff;
}

.checkout-page .step-number.completed {
    background-color: #10b981;
    color: #fff;
}

.checkout-page .step-number.inactive {
    background-color: #e5e7eb;
    color: #6b7280;
}

.checkout-page .form-section {
    display: none;
    animation: checkout-fade-in 0.3s ease-in-out;
}

.checkout-page .form-section.active {
    display: block;
}

.checkout-page .payment-method {
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkout-page .payment-method:hover {
    border-color: #d1d5db;
}

.checkout-page .payment-method.selected {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.checkout-page .payment-method input[type="radio"] {
    margin: 0 0.5rem 0 0;
    flex: 0 0 auto;
}

.checkout-page .payment-method > label {
    display: block;
    flex: 1 1 auto;
    cursor: pointer;
}

.checkout-page .payment-method .text-right {
    white-space: nowrap;
}

.checkout-page .loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.checkout-page .loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.checkout-page .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: checkout-spin 1s linear infinite;
}

.checkout-page .success-animation {
    animation: checkout-success-pulse 0.6s ease-out;
}

.checkout-page .error-shake {
    animation: checkout-shake 0.5s ease-in-out;
}

.checkout-page .form-input {
    transition: all 0.2s ease;
}

.checkout-page .form-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.checkout-page .form-input.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.checkout-page .form-input.success {
    border-color: #10b981;
    background-color: #ecfdf5;
}

.checkout-page .order-summary {
    position: static;
    overflow: visible;
    max-height: none;
}

.checkout-page .order-summary .promo-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.checkout-page .order-summary input#promo-code {
    flex: 1 1 auto;
}

.checkout-page .progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.checkout-page .progress-fill {
    width: 25%;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.checkout-page #promo-discount,
.checkout-page #payment-fee {
    display: none;
}

@media (max-width: 768px) {
    .checkout-page .checkout-steps-scroll {
        margin-left: -1rem;
        margin-right: -1rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 1rem 0.75rem;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .checkout-page .checkout-steps-scroll ol {
        min-width: max-content;
        justify-content: flex-start;
        gap: 1rem;
    }

    .checkout-page .checkout-steps-scroll li {
        flex: 0 0 auto;
        padding-right: 0;
        scroll-snap-align: start;
    }

    .checkout-page .checkout-steps-scroll .checkout-step {
        width: 9rem;
    }
}

@keyframes checkout-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes checkout-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes checkout-success-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes checkout-shake {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ── Global micro-interactions ── */
button:active,
a:active {
    transition-duration: 80ms;
}

/* Focus ring for accessibility */
:focus-visible {
    outline: 2px solid rgba(10, 10, 10, 0.15);
    outline-offset: 2px;
}

/* Section spacing normalization */
.section-spacing {
    padding-top: var(--section-py);
    padding-bottom: var(--section-py);
}

/* ── Unified Button System ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--color-accent);
    color: var(--color-surface);
    padding: 0.8rem 2rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background var(--duration-fast) ease,
                color var(--duration-fast) ease,
                transform var(--duration-fast) ease;
    min-height: 48px;
}

.btn-primary:hover {
    background: #262626;
}

.btn-primary:active {
    transform: scale(0.97);
}

/* Outline variant — dark bg contexts */
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--color-text-tertiary);
    border: 1px solid rgba(115, 115, 115, 0.4);
    padding: 0.8rem 2rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: border-color var(--duration-fast) ease,
                color var(--duration-fast) ease,
                transform var(--duration-fast) ease;
    min-height: 48px;
}

.btn-outline:hover {
    border-color: var(--color-surface);
    color: var(--color-surface);
}

.btn-outline:active {
    transform: scale(0.97);
}

/* Outline variant — light bg contexts */
.btn-outline-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-border);
    padding: 0.8rem 2rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background var(--duration-fast) ease,
                color var(--duration-fast) ease,
                transform var(--duration-fast) ease;
    min-height: 48px;
}

.btn-outline-light:hover {
    background: var(--color-accent);
    color: var(--color-surface);
}

.btn-outline-light:active {
    transform: scale(0.97);
}

/* ── Editorial banner ── */
.editorial-banner {
    padding: clamp(3rem, 6vw, 5rem) clamp(2rem, 5vw, 4rem);
}

/* ── Footer refinements ── */
footer .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background var(--duration-fast) ease,
                border-color var(--duration-fast) ease,
                transform var(--duration-fast) ease;
}

footer .social-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

footer .social-icon:active {
    transform: scale(0.95);
}

/* ── Solid-state navbar search ── */
#header.header-solid .navbar-search-btn {
    border-color: var(--color-border);
    background: transparent;
    color: var(--color-text-primary);
}

#header.header-solid .navbar-search-btn:hover {
    background: var(--color-border-subtle);
}

#header.header-solid .navbar-search-input {
    background: var(--color-border-subtle);
    color: var(--color-text-primary);
    border-color: var(--color-border);
}

#header.header-solid .navbar-search-input::placeholder {
    color: var(--color-text-tertiary);
}

#header.header-solid .navbar-search-clear {
    color: var(--color-text-secondary);
}

@media (max-width: 640px) {
    :root {
        --top-banner-height: 36px;
    }

    .marquee-bar {
        height: 36px;
    }

    .marquee-inner {
        animation-duration: 18s;
    }

    .marquee-bar::before,
    .marquee-bar::after {
        width: 40px;
    }

    .marquee-group {
        gap: 1.25rem;
        padding-inline: 0.75rem;
        padding-right: 1.15rem;
    }

    .marquee-group span {
        font-size: 0.73rem;
    }

    .navbar-side {
        flex: 0 1 auto;
    }

    .navbar-side-right {
        gap: 0.45rem;
    }

    .navbar-side-right {
        flex-shrink: 0;
    }

    .navbar-side-left {
        display: none;
    }

    .navbar-link {
        font-size: 0.95rem;
    }

    .navbar-center a {
        font-size: 0.9rem;
        letter-spacing: 0.02em;
    }

    .navbar-center {
        position: static;
        transform: none;
        pointer-events: auto;
        flex: 1 1 auto;
        min-width: 0;
        padding-right: 0.5rem;
    }

    .navbar-pill {
        min-height: 2.1rem;
        padding: 0.35rem 0.75rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .mobile-menu-toggle,
    .mobile-nav-menu {
        display: block;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    #header .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    #header.header-solid .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    #header {
        margin-bottom: 0;
    }

    body.mobile-menu-open {
        overscroll-behavior: none;
    }

    .mobile-nav-menu {
        padding: 0.5rem 0.5rem 0;
    }

    .mobile-nav-card {
        width: 100%;
        margin-left: 0;
    }

    .cart-sidebar {
        width: 100vw;
        max-width: 100vw;
        height: 100dvh;
        right: -100vw;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .notification {
        top: calc(var(--top-banner-height) + 1rem);
        left: 0.75rem;
        right: 0.75rem;
        width: auto;
        transform: translateY(-150%);
    }

    .notification.show {
        transform: translateY(0);
    }

    .hero-showcase .min-h-screen {
        min-height: 100svh;
        padding-top: 8rem;
        padding-bottom: 7rem;
    }

    .product-quick-add {
        transform: translateY(0) !important;
    }

    .hero-thumb-strip .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .hero-thumb-strip .text-white {
        min-width: 0;
    }

    .hero-thumb-strip .text-white > div:last-child {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .account-shell,
    .admin-shell {
        width: min(calc(100vw - 1rem), 42rem);
        margin-top: 0;
        max-height: calc(100dvh - 1rem);
        height: auto;
        border-radius: 1.75rem;
    }

    .account-shell > div:first-child,
    .admin-shell > div:first-child {
        padding: 1.25rem 1.25rem 1rem !important;
    }

    .account-body,
    .admin-body {
        padding: 1rem 1rem 1.25rem !important;
        min-height: 0;
        padding-bottom: calc(3rem + env(safe-area-inset-bottom)) !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    #account-close,
    #admin-close {
        height: 2.75rem;
        width: 2.75rem;
        flex: 0 0 auto;
    }

    #account-orders article {
        padding: 1rem;
    }

    #account-orders article > div:first-child {
        gap: 0.75rem;
    }

    #account-orders article .flex.flex-wrap.items-center.gap-2 {
        gap: 0.45rem;
    }

    #account-orders article .flex.items-start.justify-between.gap-3 {
        align-items: flex-start;
    }

    #admin-panel .admin-body .grid {
        gap: 1rem;
    }

    #admin-shell {
        margin-bottom: 0;
    }

    #account-modal > div:last-child,
    #admin-panel > div:last-child {
        min-height: 100dvh;
        align-items: flex-start;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    #admin-shell > div:first-child {
        gap: 0.9rem !important;
    }

    #admin-shell > div:first-child > div:last-child {
        width: 100%;
        justify-content: space-between;
        gap: 0.6rem;
    }

    #admin-tab-products,
    #admin-tab-orders {
        flex: 1 1 0;
        text-align: center;
    }

    #admin-products-list > div,
    #admin-orders-list > div {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    #admin-products-list > div > div:last-child,
    #admin-orders-list > div > div:last-child {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    #admin-orders-list > div > div:last-child {
        align-items: center;
    }

    #admin-order-details {
        margin-top: 0 !important;
    }

    #admin-products-list img,
    #admin-orders-list img {
        width: 4.5rem;
        height: 4.5rem;
    }
}

@media (hover: none) {
    .product-quick-add {
        transform: translateY(0) !important;
    }
}

@media (min-width: 1024px) {
    .checkout-page .order-summary {
        position: sticky;
        top: 6rem;
        max-height: calc(100vh - 7rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}
