/* CheapFood Shop — minimalist modern UI */

:root {
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --color-bg: #f6f6f4;
    --color-surface: #ffffff;
    --color-ink: #111111;
    --color-muted: #6b7280;
    --color-border: #e8e8e4;
    --color-border-strong: #d4d4d0;
    --color-accent: #166534;
    --color-accent-hover: #14532d;
    --color-accent-soft: #ecfdf3;
    --color-accent-soft-strong: rgba(22, 101, 52, 0.16);
    --color-accent-rgb: 22, 101, 52;
    --color-accent-contrast: #ffffff;
    --color-danger: #dc2626;
    --color-danger-soft: #fef2f2;
    --color-warning: #d97706;
    --color-star: #f59e0b;
    --focus-ring: 0 0 0 3px rgba(var(--color-accent-rgb), 0.18);
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-full: 999px;
    --shadow-xs: 0 1px 2px rgba(17, 17, 17, 0.04);
    --shadow-sm: 0 4px 16px rgba(17, 17, 17, 0.06);
    --shadow-md: 0 12px 40px rgba(17, 17, 17, 0.08);
    --shadow-lg: 0 20px 50px rgba(17, 17, 17, 0.12);
    --topbar-h: 38px;
    --header-h: 68px;
    --site-top: calc(var(--topbar-h) + var(--header-h));
    --bottom-nav-h: 64px;
    --transition: 180ms ease;
    --container: 1180px;
    --field-h: 2.75rem;
    --field-px: .9rem;
    --field-py: .75rem;
    --field-fs: .9375rem;
    --field-radius: var(--radius-sm);
    --field-border: 1px solid var(--color-border);
    --field-bg: var(--color-surface);
    --field-shadow-focus: 0 0 0 3px rgba(var(--color-accent-rgb), 0.12);
    --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-ink);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

body.storefront-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img { max-width: 100%; display: block; }

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: var(--color-accent); }

h1, h2, h3, h4 {
    margin: 0 0 .5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1rem; }

.container {
    width: min(var(--container), calc(100% - 2rem));
    margin-inline: auto;
}

.narrow { width: min(480px, calc(100% - 2rem)); margin-inline: auto; }

.section { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.main-content {
    flex: 1;
    min-height: calc(100vh - var(--header-h) - 200px);
    padding-bottom: env(safe-area-inset-bottom);
}

.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: fixed;
    width: auto;
    height: auto;
    margin: 0;
    padding: .75rem 1rem;
    clip: auto;
    overflow: visible;
    z-index: 9999;
    background: var(--color-ink);
    color: #fff;
    border-radius: var(--radius-sm);
    left: 1rem;
    top: 1rem;
}

/* ── Header ── */
.site-header {
    position: sticky;
    top: var(--topbar-h);
    z-index: 100;
    height: var(--header-h);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow var(--transition), border-color var(--transition);
}

.site-header.is-scrolled {
    box-shadow: var(--shadow-sm);
    border-bottom-color: transparent;
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    height: var(--header-h);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.03em;
    color: var(--color-ink);
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: var(--color-accent);
    color: #fff;
    border-radius: 10px;
    font-size: .95rem;
}

.header-search-wrap {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin-inline: auto;
    min-width: 0;
}

.search-field {
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
    gap: .35rem;
    width: 100%;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: .25rem .25rem .25rem .85rem;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.search-form:focus-within {
    border-color: var(--color-accent);
    box-shadow: var(--field-shadow-focus);
    background: var(--color-surface);
}

.search-form-icon {
    color: var(--color-muted);
    font-size: .9rem;
    flex-shrink: 0;
}

.search-form-input {
    flex: 1;
    min-width: 0;
    min-height: 0;
    border: 0;
    background: transparent;
    padding: .65rem .35rem;
    font: inherit;
    font-size: .925rem;
    color: var(--color-ink);
    box-shadow: none;
}

.search-form-input:focus {
    outline: none;
    box-shadow: none;
    border-color: transparent;
}

.search-form-input::placeholder {
    color: var(--color-muted);
}

.search-form-clear {
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--color-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition), color var(--transition);
}

.search-form-clear:hover {
    background: var(--color-bg);
    color: var(--color-ink);
}

.search-form-clear.is-hidden {
    display: none;
}

.search-form-submit {
    flex: 0 0 auto;
    width: auto;
    min-height: auto;
    border: 0;
    border-radius: var(--radius-full) !important;
    padding: .55rem 1rem !important;
    background: var(--color-accent);
    color: #fff;
    box-shadow: var(--shadow-xs);
}

.search-form--shop {
    border-radius: var(--radius);
    padding: .35rem .35rem .35rem 1rem;
}

.search-form--shop .search-form-submit {
    border-radius: var(--radius-sm) !important;
}

.search-form--drawer {
    margin-bottom: .75rem;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    right: 0;
    z-index: 130;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-height: min(70vh, 420px);
    overflow-y: auto;
}

.search-suggestions[hidden] {
    display: none !important;
}

.search-suggestions-head {
    padding: .65rem 1rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-muted);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.search-suggestion {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    color: inherit;
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition);
}

.search-suggestion:last-child {
    border-bottom: 0;
}

.search-suggestion:hover,
.search-suggestion.is-active {
    background: var(--color-accent-soft);
    color: inherit;
}

.search-suggestion-thumb {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.search-suggestion-thumb.is-placeholder {
    display: grid;
    place-items: center;
    color: var(--color-muted);
    font-size: .9rem;
}

.search-suggestion-body {
    min-width: 0;
}

.search-suggestion-body strong {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.35;
}

.search-suggestion-body span {
    display: block;
    font-size: .78rem;
    color: var(--color-muted);
    margin-top: .15rem;
}

.search-suggestion-price {
    font-size: .875rem;
    font-weight: 700;
    white-space: nowrap;
}

.search-suggestion--category {
    grid-template-columns: auto 1fr;
}

.search-suggestion-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: .85rem;
}

.search-suggestions-foot {
    display: block;
    padding: .8rem 1rem;
    text-align: center;
    font-size: .875rem;
    font-weight: 600;
    color: var(--color-accent);
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.search-suggestions-foot:hover {
    background: var(--color-accent-soft);
    color: var(--color-accent-hover);
}

.search-suggestions-empty,
.search-suggestions-loading {
    padding: 1.1rem 1rem;
    text-align: center;
    font-size: .875rem;
    color: var(--color-muted);
}

.search-suggestions-loading i {
    margin-right: .35rem;
}

.header-search-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-ink);
    cursor: pointer;
    place-items: center;
}

.header-search-toggle[aria-expanded="true"] {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-accent-soft);
}

.shop-search-bar {
    margin-bottom: 1.25rem;
}

.shop-results-head {
    margin-top: .25rem;
}

/* ── Shop category page ── */
.shop-page .breadcrumbs ol {
    margin-bottom: 1rem;
}

.shop-category-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 1.35rem 1.5rem;
    background: linear-gradient(135deg, var(--color-accent-soft) 0%, var(--color-surface) 70%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.shop-category-hero:has(.shop-category-hero-media) {
    grid-template-columns: auto 1fr;
}

.shop-category-hero-media {
    width: 88px;
    height: 88px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}

.shop-category-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-category-hero-body {
    min-width: 0;
}

.shop-category-hero-kicker {
    margin: 0 0 .35rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.shop-category-hero-body h1 {
    margin: 0 0 .45rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.shop-category-hero-lead {
    margin: 0 0 .55rem;
    color: var(--color-muted);
    line-height: 1.6;
    max-width: 62ch;
}

.shop-category-hero-meta {
    margin: 0;
    font-size: .875rem;
    font-weight: 600;
    color: var(--color-ink);
}

.shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .85rem 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.shop-toolbar-summary p {
    margin: 0;
    font-size: .925rem;
    color: var(--color-muted);
}

.shop-sort-form {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.shop-sort-label {
    font-size: .875rem;
    font-weight: 600;
    color: var(--color-muted);
    white-space: nowrap;
}

.shop-sort-select {
    width: auto;
    min-width: 11rem;
    min-height: 2.5rem;
    padding: .55rem 2.2rem .55rem .85rem;
    font-size: .875rem;
}

.shop-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
}

.shop-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .75rem;
    border-radius: var(--radius-full);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    font-size: .8125rem;
    font-weight: 600;
    color: var(--color-ink);
    transition: border-color var(--transition), background var(--transition);
}

.shop-filter-chip:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-accent-soft);
}

.shop-filter-chip i {
    font-size: .7rem;
    opacity: .65;
}

.shop-filter-clear {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--color-accent);
}

.shop-filter-clear:hover {
    color: var(--color-accent-hover);
}

.shop-category-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.shop-category-chips-label {
    font-size: .8125rem;
    font-weight: 700;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.shop-category-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .8rem;
    border-radius: var(--radius-full);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    font-size: .8125rem;
    font-weight: 600;
    color: var(--color-ink);
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.shop-category-chip:hover {
    border-color: var(--color-accent);
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.shop-category-chip-count {
    min-width: 1.25rem;
    padding: .05rem .35rem;
    border-radius: var(--radius-full);
    background: var(--color-bg);
    font-size: .72rem;
    font-weight: 700;
    color: var(--color-muted);
    text-align: center;
}

.shop-filter-reset {
    display: inline-block;
    margin-top: .35rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--color-accent);
}

.shop-filter-reset:hover {
    color: var(--color-accent-hover);
}

.pagination-nav {
    min-width: 40px;
}

.pagination-meta {
    margin: .65rem 0 0;
    font-size: .8125rem;
    color: var(--color-muted);
    text-align: center;
}

.search-clear-link {
    white-space: nowrap;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

mark.search-highlight {
    background: rgba(var(--color-accent-rgb), 0.18);
    color: inherit;
    padding: 0 .1em;
    border-radius: 3px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .75rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    color: var(--color-muted);
    transition: background var(--transition), color var(--transition);
}

.nav-link:hover {
    background: var(--color-bg);
    color: var(--color-ink);
}

.nav-link.is-text { padding-inline: .65rem; }

.nav-icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-ink);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.nav-icon-btn:hover {
    border-color: var(--color-border-strong);
    background: var(--color-bg);
}

.nav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-grid;
    place-items: center;
    background: var(--color-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-surface);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    cursor: pointer;
    color: var(--color-ink);
}

.mobile-drawer {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(17, 17, 17, 0.4);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.mobile-drawer.is-open {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer-panel {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
    display: grid;
    gap: .25rem;
    transform: translateY(-8px);
    transition: transform var(--transition);
}

.mobile-drawer.is-open .mobile-drawer-panel { transform: translateY(0); }

.mobile-drawer a {
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.mobile-drawer a:hover { background: var(--color-bg); }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    padding: .75rem 1.35rem;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.btn-primary.is-added {
    background: var(--color-accent-hover);
    pointer-events: none;
}

.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-lg { padding: .9rem 1.6rem; font-size: .95rem; }

.btn-primary {
    background: var(--color-accent);
    color: #fff;
    box-shadow: var(--shadow-xs);
}
.btn-primary:hover { background: var(--color-accent-hover); color: #fff; }

.btn-outline {
    background: transparent;
    border-color: var(--color-border-strong);
    color: var(--color-ink);
}
.btn-outline:hover {
    border-color: var(--color-ink);
    background: var(--color-surface);
    color: var(--color-ink);
}

.hero .btn-outline {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    background: transparent;
}

.hero .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--color-muted);
}
.btn-ghost:hover { background: var(--color-bg); color: var(--color-ink); }

.btn-danger {
    background: var(--color-danger);
    color: #fff;
}

.btn-block { width: 100%; }

/* ── Hero ── */
.hero {
    background: var(--color-ink);
    color: #fff;
    overflow: hidden;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(var(--color-accent-rgb), 0.35), transparent 45%),
        radial-gradient(circle at 10% 80%, rgba(255, 255, 255, 0.06), transparent 40%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    padding: clamp(3rem, 8vw, 5rem) 0;
    min-height: 420px;
}

.hero-copy { max-width: 560px; }

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
    padding: .35rem .85rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.hero h1 {
    font-size: clamp(2.2rem, 6vw, 3.75rem);
    margin-bottom: 1rem;
    letter-spacing: -0.04em;
}

.hero-lead {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 1.75rem;
    max-width: 48ch;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero-visual {
    display: grid;
    gap: 1rem;
}

.hero-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
}

.hero-stat {
    padding: 1.1rem 1.2rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
}

.hero-stat strong {
    display: block;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.hero-stat span {
    font-size: .8rem;
    color: rgba(255, 255, 255, 0.6);
}

.trust-strip {
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.trust-strip-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1.25rem 0;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--color-muted);
}

.trust-item i {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    border-radius: 10px;
    flex-shrink: 0;
}

/* ── Section headers ── */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.section-head p {
    margin: .35rem 0 0;
    color: var(--color-muted);
    font-size: .925rem;
}

.section-link {
    font-size: .9rem;
    font-weight: 600;
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.section-link:hover { color: var(--color-accent-hover); }

.page-header {
    padding: 2rem 0 1rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
    background: var(--color-surface);
}

.page-header .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header p {
    margin: .35rem 0 0;
    color: var(--color-muted);
}

/* ── Grids & cards ── */
.category-grid,
.product-grid {
    display: grid;
    gap: 1rem;
}

.category-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.surface-card,
.category-card,
.product-card,
.form-card,
.stat-card,
.address-card,
.checkout-summary,
.table-card,
.review-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    padding: 1.25rem;
    font-weight: 600;
    font-size: .95rem;
    text-align: center;
    background: linear-gradient(145deg, var(--color-surface), var(--color-bg));
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.category-card::before {
    content: '\f06c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    display: block;
    font-size: 1.1rem;
    color: var(--color-accent);
    margin-bottom: .45rem;
    opacity: .85;
}

.category-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    color: var(--color-accent);
}

/* Product card */
.product-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.product-card:has(.social-share--popover.is-open) {
    overflow: visible;
    z-index: 3;
}

.product-card-top {
    position: relative;
    overflow: visible;
    border-radius: var(--radius) var(--radius) 0 0;
}

.product-card-top .product-badge {
    z-index: 4;
}

.product-card-top .card-wishlist,
.product-card-top .social-share--popover {
    z-index: 5;
}

.product-badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
    z-index: 2;
    padding: .25rem .55rem;
    border-radius: var(--radius-full);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.2;
}

.product-badge--sale {
    background: var(--color-danger);
    color: #fff;
}

.product-badge--sold {
    background: rgba(17, 17, 17, 0.72);
    color: #fff;
    backdrop-filter: blur(4px);
}

.product-card:not(:has(.product-card-footer .add-to-cart-form)) .product-card-image img {
    opacity: .72;
    filter: grayscale(0.25);
}

.product-card-image {
    display: grid;
    aspect-ratio: 1;
    background: linear-gradient(145deg, #f3f4f6, #ececec);
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}

.product-card-image img {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.product-card-image .product-placeholder {
    grid-area: 1 / 1;
    min-height: 100%;
}

.product-card:hover .product-card-image img { transform: scale(1.04); }

.product-card-body {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1rem 1.1rem 1.1rem;
    flex: 1;
    min-height: 11.5rem;
}

.product-card-body h3 {
    font-size: .98rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-body h3 a:hover { color: var(--color-accent); }

.product-category {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.product-card-meta {
    min-height: 1.25rem;
    display: flex;
    align-items: center;
}

.product-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: auto;
    padding-top: .15rem;
}

.product-price strong {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.product-price s {
    font-size: .85rem;
    color: var(--color-muted);
}

.product-card-footer {
    display: flex;
    gap: .5rem;
    align-items: stretch;
    margin-top: .5rem;
}

.product-card-footer .add-to-cart-form {
    flex: 1;
    display: flex;
}

.product-card-footer .btn {
    width: 100%;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
}

.product-card-footer .badge {
    width: 100%;
    justify-content: center;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
}

.product-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #c4c4c4;
    font-size: 2rem;
}

.product-placeholder.large { min-height: 360px; }

.card-wishlist {
    position: absolute;
    top: .75rem;
    right: .75rem;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    color: var(--color-muted);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: color var(--transition), transform var(--transition);
    z-index: 2;
}

.card-wishlist:hover { transform: scale(1.06); }

.social-share--popover {
    position: absolute;
    top: .75rem;
    right: .75rem;
    left: auto;
    bottom: auto;
    z-index: 5;
}

.product-card-top:has(.card-wishlist) .social-share--popover {
    top: calc(.75rem + 38px + .5rem);
}

.product-card-top .social-share-menu {
    top: calc(100% + .5rem);
    bottom: auto;
    right: 0;
    left: auto;
}

.social-share-trigger.card-share {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    color: var(--color-muted);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: color var(--transition), transform var(--transition);
    display: grid;
    place-items: center;
}

.social-share-trigger.card-share:hover,
.social-share--popover.is-open .social-share-trigger.card-share {
    transform: scale(1.06);
    color: var(--color-accent);
}

.social-share-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + .5rem);
    min-width: 11rem;
    padding: .65rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.social-share-menu[hidden] {
    display: none !important;
}

.social-share-menu-title {
    margin: 0 0 .5rem;
    padding: 0 .35rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.social-share--inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem;
    width: 100%;
    padding-bottom: .25rem;
}

.social-share-label {
    font-size: .875rem;
    font-weight: 600;
    color: var(--color-muted);
}

.social-share-links {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.social-share--popover .social-share-links {
    flex-direction: column;
    gap: .2rem;
}

.social-share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    width: 2.35rem;
    height: 2.35rem;
    border: 0;
    border-radius: var(--radius-full);
    background: var(--color-bg);
    color: var(--color-ink);
    font: inherit;
    font-size: .95rem;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition), color var(--transition);
}

.social-share--popover .social-share-link {
    width: 100%;
    height: auto;
    justify-content: flex-start;
    padding: .55rem .65rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
}

.social-share-link:hover {
    transform: translateY(-1px);
    color: #fff;
}

.social-share-link.is-whatsapp { background: #dcfce7; color: #15803d; }
.social-share-link.is-whatsapp:hover { background: #25d366; }

.social-share-link.is-facebook { background: #dbeafe; color: #1d4ed8; }
.social-share-link.is-facebook:hover { background: #1877f2; }

.social-share-link.is-twitter { background: #e5e7eb; color: #111827; }
.social-share-link.is-twitter:hover { background: #111827; }

.social-share-link.is-telegram { background: #e0f2fe; color: #0369a1; }
.social-share-link.is-telegram:hover { background: #0088cc; }

.social-share-link.is-linkedin { background: #dbeafe; color: #1e40af; }
.social-share-link.is-linkedin:hover { background: #0a66c2; }

.social-share-link.is-copy { background: var(--color-bg); color: var(--color-muted); }
.social-share-link.is-copy:hover { background: var(--color-ink); color: #fff; }

.card-wishlist.is-active,
.wishlist-toggle.is-active { color: var(--color-danger); }

.wishlist-toggle.btn-outline.is-active {
    border-color: var(--color-danger);
    color: var(--color-danger);
    background: var(--color-danger-soft);
}

/* ── Shop layout ── */
.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
}

.shop-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    padding: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.shop-sidebar h3 {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--color-muted);
    margin-bottom: .85rem;
}

.shop-sidebar nav { display: grid; gap: .2rem; }

.shop-sidebar nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem .85rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    color: var(--color-muted);
}

.shop-nav-count {
    min-width: 1.5rem;
    padding: .1rem .45rem;
    border-radius: var(--radius-full);
    background: var(--color-bg);
    color: var(--color-muted);
    font-size: .75rem;
    font-weight: 700;
    text-align: center;
}

.shop-sidebar a.active .shop-nav-count {
    background: rgba(255, 255, 255, 0.65);
    color: var(--color-accent);
}

.shop-sidebar nav a:hover,
.shop-sidebar nav a.active {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

/* ── Product detail ── */
.product-page .breadcrumbs ol {
    margin-bottom: 1.25rem;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.product-gallery-wrap {
    display: grid;
    gap: .85rem;
    position: sticky;
    top: calc(var(--site-top) + 1rem);
}

.product-gallery {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.product-gallery-main {
    position: relative;
    aspect-ratio: 1;
    background: var(--color-bg);
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery-badge {
    position: absolute;
    top: .85rem;
    z-index: 2;
    padding: .35rem .7rem;
    border-radius: var(--radius-full);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    line-height: 1.2;
}

.product-gallery-badge--sale {
    left: .85rem;
    background: var(--color-danger);
    color: #fff;
}

.product-gallery-badge--featured {
    right: .85rem;
    background: var(--color-accent);
    color: #fff;
}

.product-info {
    display: grid;
    gap: 1.25rem;
    align-content: start;
}

.product-info-header {
    display: grid;
    gap: .65rem;
}

.product-info-header h1 {
    margin: 0;
    font-size: clamp(1.65rem, 3.5vw, 2.35rem);
}

.product-rating-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}

.product-rating-row .product-rating {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

.product-rating-row .product-rating:hover {
    color: var(--color-accent);
}

.product-rating--empty {
    color: var(--color-muted);
}

.product-purchase-card {
    padding: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 1rem;
}

.product-price.large {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .55rem .75rem;
}

.product-price.large strong {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    letter-spacing: -0.03em;
}

.product-save-badge {
    display: inline-flex;
    align-items: center;
    padding: .25rem .6rem;
    border-radius: var(--radius-full);
    background: var(--color-danger-soft);
    color: var(--color-danger);
    font-size: .78rem;
    font-weight: 700;
}

.stock-label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    width: fit-content;
    margin: 0;
    padding: .45rem .75rem;
    border-radius: var(--radius-full);
    font-size: .875rem;
    font-weight: 600;
}

.stock-label--is-in {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.stock-label--is-low {
    background: #fffbeb;
    color: var(--color-warning);
}

.stock-label--is-out {
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

.stock-label--is-select {
    background: var(--color-bg);
    color: var(--color-muted);
}

.variant-picker label {
    display: block;
    margin-bottom: .45rem;
    font-size: .875rem;
    font-weight: 600;
}

.product-buy-form {
    width: 100%;
}

.product-buy-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .85rem;
    align-items: end;
}

.product-qty-field {
    display: grid;
    gap: .45rem;
}

.product-qty-label {
    font-size: .875rem;
    font-weight: 600;
}

.product-add-btn {
    width: 100%;
    min-height: 3rem;
}

.product-description {
    padding-top: .25rem;
}

.product-description h2,
.product-section-head h2 {
    font-size: 1.15rem;
    margin-bottom: .75rem;
}

.product-description-body {
    color: var(--color-muted);
    line-height: 1.7;
}

.product-meta {
    list-style: none;
    margin: 0;
    padding: 1rem 0 0;
    border-top: 1px solid var(--color-border);
    display: grid;
    gap: .65rem;
}

.product-meta li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: .9rem;
}

.product-meta span {
    color: var(--color-muted);
}

.product-meta strong {
    font-weight: 600;
    text-align: right;
}

.product-meta a {
    color: inherit;
}

.product-meta a:hover {
    color: var(--color-accent);
}

.product-reviews-section {
    padding-top: clamp(2rem, 5vw, 3rem);
}

.product-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.product-section-subtitle {
    margin: .35rem 0 0;
    color: var(--color-muted);
    font-size: .925rem;
}

.product-reviews-summary {
    display: grid;
    justify-items: center;
    gap: .25rem;
    padding: .85rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    min-width: 5.5rem;
}

.product-reviews-score {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
}

.empty-state--compact {
    padding: 2rem 1rem;
}

.product-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
    z-index: 95;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -8px 30px rgba(17, 17, 17, 0.08);
    transform: translateY(110%);
    transition: transform var(--transition);
}

.product-sticky-bar.is-visible {
    transform: translateY(0);
}

.product-sticky-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: .75rem;
}

.product-sticky-info {
    min-width: 0;
    display: grid;
    gap: .15rem;
}

.product-sticky-title {
    display: block;
    font-size: .875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-sticky-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-accent);
}

.product-sticky-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.product-actions {
    display: grid;
    gap: .85rem;
    padding-top: 0;
}

.product-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.product-thumbs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.product-thumb {
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: none;
    transition: border-color var(--transition), transform var(--transition);
}

.product-thumb:hover {
    transform: translateY(-1px);
}

.product-thumb.is-active {
    border-color: var(--color-accent);
}

.product-thumb img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    display: block;
}

.product-rating {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--color-star);
    font-weight: 600;
}

.product-rating.compact { font-size: .875rem; color: var(--color-ink); }
.product-rating span { color: var(--color-muted); font-weight: 500; }

/* ── Forms ── */
.form-card,
.panel-card,
.checkout-summary,
.table-card,
.address-card {
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

/* Text inputs, selects, textareas — global base */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="color"]):not([type="image"]):not(.search-form-input),
select,
textarea {
    width: 100%;
    min-height: var(--field-h);
    padding: var(--field-py) var(--field-px);
    border: var(--field-border);
    border-radius: var(--field-radius);
    font: inherit;
    font-size: var(--field-fs);
    line-height: 1.4;
    background: var(--field-bg);
    color: var(--color-ink);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

textarea {
    min-height: 6.5rem;
    resize: vertical;
}

select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.35rem;
    background-image: var(--select-chevron);
    background-repeat: no-repeat;
    background-position: right .85rem center;
    background-size: 12px;
    cursor: pointer;
}

select:disabled,
input:not([type="checkbox"]):not([type="radio"]):disabled,
textarea:disabled {
    opacity: .6;
    cursor: not-allowed;
    background: var(--color-bg);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-muted);
    opacity: 1;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="color"]):not(.search-form-input):focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: var(--field-shadow-focus);
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="file"] {
    width: 100%;
    min-height: var(--field-h);
    padding: .55rem var(--field-px);
    border: var(--field-border);
    border-radius: var(--field-radius);
    font: inherit;
    font-size: .875rem;
    background: var(--field-bg);
    color: var(--color-ink);
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    margin-right: .75rem;
    padding: .45rem .85rem;
    border: 0;
    border-radius: var(--radius-full);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font: inherit;
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}

input[type="file"]::file-selector-button:hover {
    background: var(--color-accent-soft-strong);
}

input[type="color"] {
    width: 100%;
    min-height: var(--field-h);
    padding: .25rem;
    border: var(--field-border);
    border-radius: var(--field-radius);
    background: var(--field-bg);
    cursor: pointer;
}

input[type="color"]:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: var(--field-shadow-focus);
}

/* Checkboxes & radios */
input[type="checkbox"],
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.125rem;
    height: 1.125rem;
    min-width: 1.125rem;
    margin: 0;
    border: 2px solid var(--color-border-strong);
    border-radius: 5px;
    background: var(--color-surface);
    cursor: pointer;
    vertical-align: middle;
    flex-shrink: 0;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 5.2 4.2 8.4 11 1.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 8px;
}

input[type="radio"]:checked {
    background-image: radial-gradient(circle, #fff 0 35%, transparent 36%);
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* Block labels (text fields, selects, textareas) */
.form-card label:not(:has(> input[type="checkbox"])):not(:has(> input[type="radio"])),
.panel-card label:not(.address-option):not(:has(> input[type="checkbox"])):not(:has(> input[type="radio"])),
.admin-form label:not(:has(> input[type="checkbox"])):not(:has(> input[type="radio"])),
.shop-filters label,
.review-form label,
.product-actions label,
.location-fields label {
    display: grid;
    gap: .45rem;
    margin-bottom: 1rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--color-ink);
}

/* Inline checkbox / radio labels */
.form-card label:has(> input[type="checkbox"]),
.form-card label:has(> input[type="radio"]),
.panel-card label:has(> input[type="checkbox"]),
.panel-card label:has(> input[type="radio"]),
.panel-card label.address-option,
.admin-form label:has(> input[type="checkbox"]),
.admin-form label:has(> input[type="radio"]),
.shop-filters label:has(> input[type="checkbox"]),
.shop-filters label:has(> input[type="radio"]),
label.city-check,
label.form-check {
    display: flex;
    align-items: center;
    gap: .65rem;
    cursor: pointer;
    font-weight: 500;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row > label { margin-bottom: 0; }
.form-error { color: var(--color-danger); font-size: .875rem; margin: .35rem 0 0; }

.form-inline {
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.form-inline input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.form-inline select {
    width: auto;
    min-width: 10rem;
    flex: 1 1 10rem;
}

/* Choice cards (address, payment) */
.form-choice {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .9rem 1rem;
    border: var(--field-border);
    border-radius: var(--field-radius);
    background: var(--field-bg);
    cursor: pointer;
    font-weight: 500;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.form-choice:hover {
    border-color: var(--color-border-strong);
}

.form-choice:has(input:checked) {
    border-color: var(--color-accent);
    background: var(--color-accent-soft);
    box-shadow: var(--field-shadow-focus);
}

.form-choice input[type="radio"],
.form-choice input[type="checkbox"] {
    margin-top: .15rem;
}

.form-check {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    flex-shrink: 0;
}

/* Context-specific layout */
.product-actions .add-to-cart-form {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: flex-end;
}

.product-actions .add-to-cart-form.product-buy-form {
    display: block;
}

.product-actions label {
    margin-bottom: 0;
    min-width: 5.5rem;
}

.shop-filters label {
    margin-bottom: 0;
}

.shop-filters label:last-of-type {
    margin-bottom: 0;
}

.promo-row {
    display: flex;
    gap: .5rem;
    align-items: stretch;
}

.promo-row input {
    flex: 1;
    min-width: 0;
}

.shop-search-inline {
    display: flex;
    gap: .5rem;
    align-items: stretch;
}

.shop-search-inline input {
    flex: 1;
    min-width: 0;
}

/* Search input — keep flush inside the pill wrapper */
.search-form .search-form-input {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: .65rem .35rem;
    box-shadow: none;
}

.search-form .search-form-input:focus {
    outline: none;
    border-color: transparent;
    box-shadow: none;
}

.qty-stepper input {
    min-height: 0;
    width: 44px;
    padding: .55rem .25rem;
    border: 0;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
    font-weight: 600;
    -moz-appearance: textfield;
}

.qty-stepper input:focus {
    border-color: var(--color-border);
    box-shadow: none;
    background: var(--color-accent-soft);
}

.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.auth-section {
    min-height: calc(100vh - var(--header-h) - 120px);
    display: grid;
    place-items: center;
    padding: 2rem 0;
}

.auth-card {
    width: 100%;
    padding: clamp(1.5rem, 4vw, 2rem);
}

.auth-card h1 { margin-bottom: .35rem; }
.auth-card .auth-sub { color: var(--color-muted); margin-bottom: 1.5rem; font-size: .925rem; }
.auth-footer { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--color-border); font-size: .9rem; color: var(--color-muted); }
.auth-footer a { font-weight: 600; color: var(--color-accent); }

/* ── Cart & checkout ── */
.cart-table,
.table-card { display: grid; gap: .75rem; }

.cart-row,
.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.15rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.cart-row:hover {
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow-xs);
}

.cart-line-total {
    font-size: .95rem;
    text-align: right;
}

.cart-product { display: flex; gap: 1rem; align-items: center; min-width: 0; }
.cart-product img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.cart-product strong { display: block; font-size: .95rem; }
.cart-product span { font-size: .85rem; color: var(--color-muted); }

.cart-summary,
.checkout-summary {
    margin-top: 1.5rem;
    padding: 1.35rem;
    max-width: 400px;
    margin-left: auto;
    position: sticky;
    top: calc(var(--header-h) + 1rem);
}

.summary-line,
.summary-total {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .55rem 0;
    font-size: .925rem;
}

.summary-line span:first-child { color: var(--color-muted); }
.summary-total {
    border-top: 1px solid var(--color-border);
    margin-top: .5rem;
    padding-top: 1rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 1.75rem;
    align-items: start;
}

/* ── Account ── */
.account-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.75rem;
    width: min(var(--container), calc(100% - 2rem));
    margin: 2rem auto 3rem;
    align-items: start;
}

.account-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    padding: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.account-sidebar h3 {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--color-muted);
    margin-bottom: .85rem;
}

.account-sidebar nav { display: grid; gap: .15rem; }

.account-sidebar a {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .7rem .85rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    color: var(--color-muted);
}

.account-sidebar a i { width: 18px; text-align: center; font-size: .85rem; }
.account-sidebar a:hover,
.account-sidebar a.active {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.account-content {
    min-width: 0;
    padding: .25rem 0;
}

.account-content > h1:first-child { margin-bottom: 1.25rem; }

/* ── Stats & badges ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card { padding: 1.15rem 1.25rem; }
.stat-card span {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-muted);
    margin-bottom: .35rem;
}
.stat-card strong { font-size: 1.6rem; letter-spacing: -0.03em; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: .25rem .65rem;
    border-radius: var(--radius-full);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: .75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-muted { background: #f3f4f6; color: var(--color-muted); }

.order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: .875rem;
    color: var(--color-muted);
}

/* ── Reviews ── */
.review-form { margin-bottom: 1.5rem; }
.review-list { display: grid; gap: .85rem; }
.review-card { padding: 1.15rem 1.25rem; }
.review-head {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: center;
    margin-bottom: .5rem;
}
.review-stars { color: var(--color-star); font-size: .85rem; }
.review-date, .review-note { color: var(--color-muted); font-size: .875rem; }
.review-card h4 { margin: .25rem 0 .35rem; font-size: .95rem; }
.review-card p { margin: 0; font-size: .925rem; color: var(--color-muted); }

/* ── Pagination ── */
.pagination {
    display: flex;
    gap: .4rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a {
    min-width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    padding: 0 .75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    font-size: .875rem;
    font-weight: 600;
    color: var(--color-muted);
}

.pagination a:hover { border-color: var(--color-border-strong); color: var(--color-ink); }
.pagination a.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
    background: var(--color-surface);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
}

.empty-state i {
    font-size: 2rem;
    color: var(--color-muted);
    margin-bottom: 1rem;
    opacity: .5;
}

.empty-state p { color: var(--color-muted); margin-bottom: 1.25rem; }

/* ── Footer ── */
.site-footer {
    margin-top: auto;
    background: var(--color-ink);
    color: rgba(255, 255, 255, 0.75);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 2rem;
    padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem;
}

.footer-brand strong {
    display: block;
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: .65rem;
}

.footer-brand p { font-size: .925rem; line-height: 1.6; }

.footer-col h4 {
    color: #fff;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 1rem;
}

.footer-col nav { display: grid; gap: .55rem; }
.footer-col a { font-size: .9rem; color: rgba(255, 255, 255, 0.65); }
.footer-col a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.15rem 0;
    text-align: center;
    font-size: .85rem;
    color: rgba(255, 255, 255, 0.45);
}

/* ── Toast ── */
.toast-container {
    position: fixed;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    right: 1rem;
    z-index: 200;
    display: grid;
    gap: .65rem;
    max-width: min(380px, calc(100vw - 2rem));
    pointer-events: none;
}

.toast {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: .75rem;
    padding: .85rem 1rem .95rem;
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.45;
    color: var(--color-ink);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(12px);
    overflow: hidden;
    pointer-events: auto;
    animation: toast-in 320ms cubic-bezier(.22, 1, .36, 1);
}

.toast.is-leaving {
    animation: toast-out 240ms ease forwards;
}

.toast-icon {
    display: inline-grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: .1rem;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.toast-body {
    padding-top: .05rem;
    padding-right: .25rem;
    word-break: break-word;
}

.toast-close {
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    margin: -.15rem -.25rem 0 0;
    padding: 0;
    border: 0;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--color-muted);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.toast-close:hover,
.toast-close:focus-visible {
    background: var(--color-bg);
    color: var(--color-ink);
    outline: none;
}

.toast-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    transform-origin: left center;
    animation: toast-progress linear forwards;
}

.toast-success {
    border-left: 3px solid var(--color-accent);
}
.toast-success .toast-icon { color: var(--color-accent); }
.toast-success .toast-progress { background: var(--color-accent); }

.toast-error {
    border-left: 3px solid var(--color-danger);
}
.toast-error .toast-icon { color: var(--color-danger); }
.toast-error .toast-progress { background: var(--color-danger); }

.toast-info {
    border-left: 3px solid #2563eb;
}
.toast-info .toast-icon { color: #2563eb; }
.toast-info .toast-progress { background: #2563eb; }

.toast-warning {
    border-left: 3px solid var(--color-warning);
}
.toast-warning .toast-icon { color: var(--color-warning); }
.toast-warning .toast-progress { background: var(--color-warning); }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(8px) scale(.96); }
}

@keyframes toast-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .toast {
        animation: none;
    }
    .toast.is-leaving {
        animation: none;
        opacity: 0;
    }
    .toast-progress {
        display: none;
    }
}

/* ── Notifications ── */
.notification-wrap {
    position: relative;
}

.notification-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(360px, calc(100vw - 2rem));
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    overflow: hidden;
}

.notification-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.notification-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 320px;
    overflow-y: auto;
}

.notification-item a {
    display: grid;
    gap: .2rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--color-border);
    color: inherit;
    transition: background var(--transition);
}

.notification-item a:hover {
    background: var(--color-bg);
}

.notification-item.is-unread a {
    background: rgba(22, 101, 52, 0.06);
}

.notification-item strong {
    font-size: .9rem;
}

.notification-item span {
    font-size: .85rem;
    color: var(--color-muted);
    line-height: 1.4;
}

.notification-item small {
    font-size: .75rem;
    color: var(--color-muted);
}

.notification-empty {
    padding: 1.25rem 1rem;
    text-align: center;
    color: var(--color-muted);
    font-size: .9rem;
}

.notification-panel-foot {
    display: block;
    padding: .75rem 1rem;
    text-align: center;
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-accent);
    border-top: 1px solid var(--color-border);
}

.notification-page-list {
    display: grid;
    gap: .75rem;
}

.notification-page-item {
    display: block;
    padding: 1rem 1.1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: inherit;
}

.notification-page-item.is-unread {
    border-color: rgba(22, 101, 52, 0.35);
    background: rgba(22, 101, 52, 0.04);
}

.notification-page-item-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .35rem;
}

.notification-page-item-head span {
    font-size: .8rem;
    color: var(--color-muted);
    white-space: nowrap;
}

.notification-page-item p {
    margin: 0;
    color: var(--color-muted);
    font-size: .92rem;
}

/* ── Modal ── */
body.modal-open {
    overflow: hidden;
}

.app-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.app-modal[hidden] {
    display: none !important;
}

.app-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.48);
    backdrop-filter: blur(2px);
}

.app-modal-dialog {
    position: relative;
    width: min(420px, 100%);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem 1.5rem 1.25rem;
    animation: modal-in 220ms cubic-bezier(.22, 1, .36, 1);
}

.app-modal-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    margin-bottom: .85rem;
    font-size: 1.15rem;
}

.app-modal-icon-success { background: rgba(22, 101, 52, 0.12); color: var(--color-accent); }
.app-modal-icon-error { background: rgba(220, 38, 38, 0.12); color: var(--color-danger); }
.app-modal-icon-info { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.app-modal-icon-warning { background: rgba(217, 119, 6, 0.12); color: var(--color-warning); }

.app-modal-title {
    margin: 0 0 .45rem;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.app-modal-message {
    margin: 0 0 1.25rem;
    color: var(--color-muted);
    line-height: 1.55;
}

.app-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: .65rem;
    flex-wrap: wrap;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .app-modal-dialog { animation: none; }
}

/* ── Mobile bottom nav (hidden on desktop) ── */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 95;
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border);
}

.bottom-nav-inner {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: var(--bottom-nav-h);
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    font-size: .65rem;
    font-weight: 600;
    color: var(--color-muted);
    position: relative;
    transition: color var(--transition);
}

.bottom-nav a::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 3px;
    border-radius: var(--radius-full);
    background: var(--color-accent);
    transition: transform var(--transition);
}

.bottom-nav a.is-active::before {
    transform: translateX(-50%) scaleX(1);
}

.bottom-nav a i { font-size: 1.1rem; }
.bottom-nav a.is-active { color: var(--color-accent); }

.bottom-nav .nav-badge {
    top: 6px;
    right: calc(50% - 22px);
}

.preview-image {
    width: 120px;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
}

.text-success { color: var(--color-accent); }
.checkout-account-note {
    margin: -.35rem 0 1rem;
}

.text-muted { color: var(--color-muted); font-size: .875rem; }

/* ── Responsive ── */
@media (min-width: 961px) {
    .mobile-drawer,
    .bottom-nav,
    .menu-toggle {
        display: none !important;
    }

    .shop-sidebar-body {
        display: block !important;
    }
}

@media (max-width: 960px) {
    .header-inner {
        grid-template-columns: auto 1fr auto;
    }

    /* Hide header search on mobile — use toggle + drawer/overlay */
    .header-search-wrap { display: none; }
    .header-search-wrap.is-open {
        display: block;
        position: absolute;
        left: 1rem;
        right: 1rem;
        top: calc(100% + .5rem);
        max-width: none;
        margin: 0;
        z-index: 110;
    }

    .site-header { position: sticky; }
    .header-inner { position: relative; }
    .header-search-toggle { display: inline-grid; }

    .header-nav .nav-link.is-text,
    .header-nav .btn { display: none; }

    .menu-toggle { display: inline-grid; place-items: center; }

    .hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .hero-visual { display: none; }

    .trust-strip-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .shop-layout,
    .product-detail,
    .checkout-grid,
    .account-shell,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .product-gallery-wrap {
        position: static;
    }

    .product-buy-row {
        grid-template-columns: 1fr;
    }

    .shop-category-hero {
        grid-template-columns: 1fr;
    }

    .shop-category-hero-media {
        width: 72px;
        height: 72px;
    }

    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-sort-form {
        width: 100%;
    }

    .shop-sort-select {
        flex: 1;
        width: 100%;
    }

    .shop-sidebar,
    .account-sidebar {
        position: static;
    }

    .table-row {
        grid-template-columns: 1fr;
        gap: .75rem;
    }

    .cart-summary,
    .checkout-summary {
        max-width: none;
        margin-left: 0;
        position: static;
    }

    .form-row { grid-template-columns: 1fr; }

    .bottom-nav { display: block; }

    body.storefront-body {
        padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
    }

    .toast-container {
        right: 1rem;
        left: 1rem;
        bottom: calc(var(--bottom-nav-h) + 1rem + env(safe-area-inset-bottom));
        max-width: none;
    }
}

@media (min-width: 961px) {
    .product-sticky-bar {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .trust-strip-inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
    .product-card-body { padding: .85rem; }
    .product-card-body h3 { font-size: .875rem; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Breadcrumbs ── */
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .5rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    font-size: .85rem;
    color: var(--color-muted);
}
.breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin-left: .5rem;
    opacity: .5;
}
.breadcrumbs a:hover { color: var(--color-accent); }

/* ── Order timeline ── */
.order-timeline {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    border-left: 2px solid var(--color-border);
}
.order-timeline li {
    padding: .65rem 0 .65rem 1rem;
    position: relative;
}
.order-timeline li::before {
    content: '';
    position: absolute;
    left: -.35rem;
    top: 1rem;
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: var(--color-accent);
}

/* ── Notice card ── */
.notice-card {
    padding: 1rem 1.15rem;
    border-radius: var(--radius);
    background: var(--color-accent-soft);
    border: 1px solid rgba(22, 101, 52, 0.15);
    margin-bottom: 1.25rem;
}

/* ── Checkout extras ── */
.address-picker { display: grid; gap: .65rem; margin-bottom: 1.25rem; }

label.address-option,
.panel-card .payment-methods label,
.payment-methods label {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .9rem 1rem;
    margin-bottom: 0;
    border: var(--field-border);
    border-radius: var(--field-radius);
    background: var(--field-bg);
    cursor: pointer;
    font-weight: 500;
    font-size: .9375rem;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

label.address-option:hover,
.panel-card .payment-methods label:hover,
.payment-methods label:hover {
    border-color: var(--color-border-strong);
}

label.address-option:has(input:checked),
.panel-card .payment-methods label:has(input:checked),
.payment-methods label:has(input:checked) {
    border-color: var(--color-accent);
    background: var(--color-accent-soft);
    box-shadow: var(--field-shadow-focus);
}

label.address-option input[type="radio"],
.panel-card .payment-methods label input[type="radio"],
.payment-methods label input[type="radio"] {
    margin-top: .2rem;
}

.payment-methods {
    display: grid;
    gap: .65rem;
    margin-bottom: 1rem;
}

.shop-filters {
    display: grid;
    gap: .75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}
.rich-content h2 { margin-top: 1.5rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; align-items: center; }
.admin-export-link { margin-left: auto; }
.zone-list { padding-left: 1.25rem; color: var(--color-muted); font-size: .9rem; }
.city-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .5rem;
    max-height: 280px;
    overflow: auto;
    padding: .75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}
.city-check {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 0;
    padding: .55rem .65rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition);
}

.city-check:hover {
    background: var(--color-bg);
}

/* UI ENHANCEMENTS */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 101;
    background: var(--color-ink);
    color: rgba(255,255,255,.88);
    font-size: .78rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.top-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--topbar-h); }
.top-bar-promo { display: inline-flex; align-items: center; gap: .45rem; font-weight: 500; }
.top-bar-promo i { color: var(--color-accent); }
.top-bar-right { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.top-bar-link { color: rgba(255,255,255,.75); font-weight: 500; display: inline-flex; align-items: center; gap: .35rem; }
.top-bar-link:hover { color: #fff; }
.logo-image { height: 36px; width: auto; max-width: 120px; object-fit: contain; }
.logo-text { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.user-menu { position: relative; }
.user-menu-trigger { display: inline-flex; align-items: center; gap: .55rem; padding: .35rem .5rem .35rem .35rem; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600; color: var(--color-ink); }
.user-menu-trigger:hover, .user-menu-trigger[aria-expanded="true"] { border-color: var(--color-border-strong); box-shadow: var(--shadow-xs); }
.user-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--color-accent); color: var(--color-accent-contrast); font-size: .8rem; font-weight: 700; }
.user-menu-label { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-panel { position: absolute; top: calc(100% + 8px); right: 0; min-width: 210px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .4rem; z-index: 120; }
.user-menu-panel a { display: flex; align-items: center; gap: .65rem; padding: .7rem .85rem; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 500; color: var(--color-ink); }
.user-menu-panel a:hover { background: var(--color-bg); color: var(--color-ink); }
.user-menu-panel a.is-danger { color: var(--color-danger); }
.mobile-drawer { inset: var(--site-top) 0 0 0; }
.page-head { margin-bottom: 1.75rem; }
.page-subtitle { margin: 0; color: var(--color-muted); font-size: .95rem; }
.panel-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); padding: clamp(1.25rem, 3vw, 1.75rem); }
.panel-card-head { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--color-border); }
.panel-card-head i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--color-accent-soft); color: var(--color-accent); }
.panel-card-head h3 { margin: 0; font-size: 1.05rem; }
.checkout-meta { color: var(--color-muted); font-size: .925rem; }
.checkout-steps { display: flex; align-items: center; gap: .5rem; margin: 1.25rem 0 1.75rem; flex-wrap: wrap; }
.checkout-step { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 600; color: var(--color-muted); }
.checkout-step-num { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--color-border); font-size: .75rem; }
.checkout-step.is-active { color: var(--color-accent); }
.checkout-step.is-active .checkout-step-num { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-contrast); }
.checkout-step-divider { width: 28px; height: 2px; background: var(--color-border); }
.empty-state-card { text-align: center; padding: 2rem 1.25rem; background: var(--color-bg); border: 1px dashed var(--color-border); border-radius: var(--radius); }
.empty-state-card i { font-size: 2rem; color: var(--color-accent); margin-bottom: .75rem; display: block; }
.summary-card { position: sticky; top: calc(var(--site-top) + 1rem); }
.summary-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.summary-trust { display: grid; gap: .45rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--color-border); font-size: .78rem; color: var(--color-muted); }
.summary-trust span { display: inline-flex; align-items: center; gap: .4rem; }
.summary-trust i { color: var(--color-accent); }
.stat-card { padding: 1.15rem 1.25rem; display: grid; gap: .35rem; }
.stat-card span { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--color-muted); }
.stat-card strong { font-size: 1.65rem; letter-spacing: -0.03em; }
.account-sidebar { position: sticky; top: calc(var(--site-top) + 1rem); align-self: start; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-xs); }
.account-sidebar h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--color-muted); margin-bottom: .85rem; }
.account-sidebar nav { display: grid; gap: .2rem; }
.account-sidebar a { display: flex; align-items: center; gap: .7rem; padding: .7rem .85rem; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500; color: var(--color-muted); }
.account-sidebar a i { width: 18px; text-align: center; }
.account-sidebar a:hover, .account-sidebar a.active { background: var(--color-accent-soft); color: var(--color-accent); }
.auth-section { background: radial-gradient(circle at top right, rgba(var(--color-accent-rgb), .08), transparent 40%), var(--color-bg); }
.auth-card { box-shadow: var(--shadow-md); border-radius: var(--radius-lg); }
.site-footer { background: var(--color-ink); color: rgba(255,255,255,.72); margin-top: 2rem; }
.site-footer a:hover { color: #fff; }
.footer-brand strong { color: #fff; font-size: 1.1rem; display: block; margin-bottom: .5rem; }
.footer-col h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .85rem; }
.footer-col nav { display: grid; gap: .55rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.25rem 0 1.5rem; font-size: .85rem; color: rgba(255,255,255,.5); }
.cart-summary, .checkout-summary { top: calc(var(--site-top) + 1rem); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.notice-card { background: var(--color-accent-soft); border: 1px solid rgba(var(--color-accent-rgb), .2); border-radius: var(--radius); padding: 1rem 1.15rem; margin-bottom: 1.25rem; }
.shop-sidebar { position: sticky; top: calc(var(--site-top) + 1rem); align-self: start; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-xs); }
.shop-sidebar h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-muted); margin-bottom: .75rem; }
.shop-sidebar nav { display: grid; gap: .15rem; margin-bottom: 1.25rem; }
.shop-sidebar nav a { padding: .6rem .75rem; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500; color: var(--color-muted); }
.shop-sidebar nav a:hover, .shop-sidebar nav a.active { background: var(--color-accent-soft); color: var(--color-accent); }
@media (max-width: 960px) {
    .top-bar-right { display: none; }
    .user-menu-label, .nav-link.is-text span { display: none; }
    .account-sidebar { position: static; }
    .account-sidebar nav { grid-template-columns: repeat(2, 1fr); }
    .summary-card { position: static; }
}

/* ── Utilities & modifiers ── */
.container--cart { max-width: 880px; }
.section--tight-top { padding-top: 0; }
.u-margin-0 { margin: 0; }
.u-margin-top-sm { margin-top: 1rem; }
.u-margin-top-md { margin-top: 1.25rem; }
.u-margin-top-lg { margin-top: 1.5rem; }
.u-margin-bottom-sm { margin-bottom: .75rem; }
.label-hint { font-weight: 400; color: var(--color-muted); }
.text-link-row { margin-top: 1rem; }
.text-link-row a { font-weight: 600; color: var(--color-accent); }
.text-link-row a:hover { color: var(--color-accent-hover); }

.nav-badge.is-hidden { display: none !important; }

.auth-card .panel-card-head {
    border: 0;
    padding: 0;
    margin-bottom: 1rem;
}

.auth-card .panel-card-head + form { margin-top: 0; }

.auth-card h1 {
    margin: 0;
    font-size: 1.5rem;
}

.auth-card .auth-sub {
    margin: .25rem 0 0;
    margin-bottom: 0;
}

.notice-card p { margin: 0; }
.notice-card p + form,
.notice-card p + .btn { margin-top: .75rem; }
.notice-card i { margin-right: .35rem; color: var(--color-accent); }

.cart-qty-form {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.qty-stepper {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--color-surface);
}

.qty-stepper-btn {
    width: 36px;
    border: 0;
    background: transparent;
    color: var(--color-ink);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: .75rem;
    transition: background var(--transition), color var(--transition);
}

.qty-stepper-btn:hover:not(:disabled) {
    background: var(--color-bg);
    color: var(--color-accent);
}

.qty-stepper-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.qty-stepper.is-loading {
    opacity: .65;
    pointer-events: none;
}

.cart-row-label {
    display: none;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-muted);
    margin-bottom: .35rem;
}

.cart-remove-btn {
    color: var(--color-muted);
}

.cart-remove-btn:hover {
    color: var(--color-danger);
    background: var(--color-danger-soft);
}

.shop-sidebar-toggle {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .85rem 1rem;
    margin-bottom: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    color: var(--color-ink);
    cursor: pointer;
    box-shadow: var(--shadow-xs);
}

.shop-sidebar-toggle-icon {
    transition: transform var(--transition);
    font-size: .75rem;
    color: var(--color-muted);
}

.shop-sidebar.is-open .shop-sidebar-toggle-icon {
    transform: rotate(180deg);
}

@media (max-width: 960px) {
    .cart-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "product remove"
            "qty total";
        gap: .85rem 1rem;
        padding: 1.1rem;
    }

    .cart-product { grid-area: product; }
    .cart-row-qty { grid-area: qty; }
    .cart-row-total { grid-area: total; text-align: right; }
    .cart-remove-form { grid-area: remove; align-self: start; }

    .cart-row-label { display: block; }

    .cart-line-total { text-align: right; }

    .shop-sidebar-toggle { display: flex; }

    .shop-sidebar-body {
        display: none;
        margin-top: .85rem;
    }

    .shop-sidebar.is-open .shop-sidebar-body {
        display: block;
    }

    .shop-sidebar {
        position: static;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .shop-sidebar.is-open .shop-sidebar-toggle {
        border-color: var(--color-accent);
        box-shadow: var(--focus-ring);
    }
}

.product-placeholder--thumb {
    width: 72px;
    height: 72px;
    font-size: 1.25rem;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.cart-summary .btn-block { margin-top: 1rem; }

.checkout-subhead { margin-top: 1.25rem; }
.panel-card-head--spaced { margin-top: 1.5rem; }
#shippingFields.is-collapsed { display: none; }
.summary-card-head h3 { margin: 0; }
.checkout-page .form-error { margin: 0; }

.stat-card--action {
    color: inherit;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.stat-card--action:hover {
    border-color: rgba(var(--color-accent-rgb), 0.35);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
    color: inherit;
}

.stat-card--action strong {
    font-size: 1rem;
    color: var(--color-accent);
}

/* ── Error pages ── */
.error-page {
    text-align: center;
    padding: clamp(2.5rem, 6vw, 3.5rem) 1.75rem;
}

.error-page-code {
    display: inline-block;
    margin-bottom: 1rem;
    padding: .35rem .8rem;
    border-radius: var(--radius-full);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.error-page-icon {
    display: grid;
    place-items: center;
    width: 4.25rem;
    height: 4.25rem;
    margin: 0 auto 1rem;
    border-radius: var(--radius-full);
    background: var(--color-bg);
    color: var(--color-muted);
    font-size: 1.55rem;
}

.error-page--server .error-page-code {
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

.error-page--server .error-page-icon {
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

.error-page h1 {
    margin: 0 0 .65rem;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
}

.error-page > p {
    max-width: 34rem;
    margin: 0 auto 1.5rem;
    color: var(--color-muted);
}

.error-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    justify-content: center;
}

.error-page .error-debug-panel {
    max-width: 40rem;
    margin-inline: auto;
}

.error-debug-panel {
    text-align: left;
    margin: var(--space-md) 0;
    padding: var(--space-md);
    background: var(--color-surface-muted, #f3f4f6);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border, #e5e7eb);
}

.error-debug {
    overflow: auto;
    max-height: 12rem;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.error-debug--trace {
    max-height: 20rem;
}

.faq-group h2 {
    margin-bottom: var(--space-sm);
}

.faq-item {
    border-top: 1px solid var(--color-border, #e5e7eb);
    padding: var(--space-sm) 0;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
}

.faq-answer {
    margin-top: var(--space-xs);
    color: var(--color-text-muted);
}

.order-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
    margin: var(--space-sm) 0 var(--space-md);
}

.variant-picker {
    margin-bottom: var(--space-sm);
}

/* ── Profile sections ── */
.profile-section {
    margin-top: 2rem;
    scroll-margin-top: 1.5rem;
}

.profile-section > h2 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.profile-section > .text-muted {
    margin: -.35rem 0 1rem;
}

.profile-section .form-card,
.profile-section .panel-card,
.profile-section .notice-card {
    width: 100%;
    max-width: none;
    margin-inline: 0;
}

.profile-section .form-card + .form-card,
.profile-section .panel-card + .form-card,
.profile-section .notice-card + .panel-card,
.profile-section .notice-card + .form-card {
    margin-top: 1rem;
}

/* ── Two-factor authentication ── */
.two-factor-hint {
    margin: -.35rem 0 1rem;
    font-size: .875rem;
}

.two-factor-intro p,
.two-factor-status p {
    margin: 0 0 1rem;
}

.two-factor-benefits {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    display: grid;
    gap: .55rem;
}

.two-factor-benefits li {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: var(--color-muted);
    font-size: .925rem;
}

.two-factor-benefits i {
    color: var(--color-accent);
}

.two-factor-status-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem;
    margin-bottom: .75rem;
}

.badge-success {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .65rem;
    border-radius: var(--radius-full);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: .8125rem;
    font-weight: 700;
}

.two-factor-setup-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.two-factor-qr {
    padding: .75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.two-factor-secret {
    display: inline-block;
    padding: .65rem .85rem;
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    font-size: 1rem;
    letter-spacing: .08em;
}

.recovery-code-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    gap: .5rem;
}

.recovery-code-list code {
    display: block;
    padding: .55rem .65rem;
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    font-size: .9rem;
    text-align: center;
}

.btn.is-danger {
    color: var(--color-danger);
    border-color: var(--color-danger);
}

.btn.is-danger:hover {
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

.two-factor-cancel-form {
    margin-top: .75rem;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: center;
    margin-top: .25rem;
}

@media (max-width: 600px) {
    .two-factor-setup-grid {
        grid-template-columns: 1fr;
        justify-items: start;
    }
}
