/* ==========================================================================
   gopozz online store — storefront base stylesheet
   --------------------------------------------------------------------------
   Shared by every theme. Themes never restyle from scratch: they set the
   CSS custom properties below (emitted inline by the layout from the store's
   theme settings) and add their own theme.css for the pieces that make them
   distinct.

   Direction: written entirely with CSS *logical* properties
   (margin-inline, inset-inline-start, border-start-*, text-align: start),
   so `dir="rtl"` mirrors the whole layout with no RTL stylesheet and no
   duplicated rules. Anything that must NOT mirror — prices, phone numbers,
   order numbers — is wrapped in <bdi> and given `direction: ltr` by .num.

   Mobile-first: every layout rule starts at the phone and widens at
   min-width breakpoints (40rem / 60rem / 78rem).
   ========================================================================== */

/* --------------------------------------------------------------- tokens */
:root {
    /* Filled by the theme; these are last-resort fallbacks only. */
    --color-primary: #1f2a44;
    --color-accent: #c0693b;
    --color-bg: #ffffff;
    --color-surface: #f6f4f0;
    --color-text: #17161a;
    --color-muted: #6b6862;
    --color-border: #e5e1d8;
    --font-heading: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --radius: 14px;

    --radius-sm: calc(var(--radius) * 0.5);
    --radius-pill: 999px;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 6%), 0 1px 3px rgb(0 0 0 / 4%);
    --shadow-md: 0 4px 16px rgb(0 0 0 / 8%), 0 1px 3px rgb(0 0 0 / 5%);
    --shadow-lg: 0 18px 48px rgb(0 0 0 / 16%);
    --container: 1220px;
    --gutter: 16px;
    --header-h: 62px;

    --ok: #167c4a;
    --warn: #b26a00;
    --danger: #b3261e;

    color-scheme: light;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-wrap: break-word;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    line-height: 1.18;
    margin: 0 0 0.5em;
    font-weight: 600;
    letter-spacing: -0.011em;
}

h1 { font-size: clamp(1.7rem, 1.3rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
    color: inherit;
    text-decoration: none;
}

a:hover { color: var(--color-primary); }

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

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Numbers, money, phone numbers and order references stay LTR inside RTL
   copy — "KD 12.500" must never render as "500.12 KD". */
.num,
bdi {
    direction: ltr;
    unicode-bidi: isolate;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute;
    inset-inline-start: -9999px;
    top: 0;
    z-index: 200;
    background: var(--color-primary);
    color: #fff;
    padding: 10px 16px;
}
.skip-link:focus { inset-inline-start: 0; }

/* --------------------------------------------------------------- layout */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container--narrow { max-width: 780px; }

.section {
    padding-block: 40px;
}
.section--tight { padding-block: 24px; }

@media (min-width: 60rem) {
    :root { --gutter: 24px; }
    .section { padding-block: 60px; }
}

.section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.section__head h2 { margin: 0; }
.section__head a {
    color: var(--color-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}
.section__head a:hover { color: var(--color-primary); }

.stack > * + * { margin-block-start: var(--stack-gap, 16px); }

.muted { color: var(--color-muted); }
.small { font-size: 0.86rem; }
.center { text-align: center; }

.grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 40rem) { .grid { gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 60rem) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--dense { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

/* --------------------------------------------------------------- buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
    transition: filter .15s ease, background-color .15s ease, border-color .15s ease, transform .06s ease;
}
.btn:hover { filter: brightness(1.08); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

.btn--accent { background: var(--color-accent); }
.btn--ghost {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn--ghost:hover { background: var(--color-surface); color: var(--color-text); filter: none; }
.btn--quiet { background: transparent; color: var(--color-muted); min-height: 36px; padding: 6px 10px; }
.btn--quiet:hover { color: var(--color-text); background: var(--color-surface); }
.btn--block { width: 100%; }
.btn--sm { min-height: 36px; padding: 6px 12px; font-size: .86rem; }
.btn--lg { min-height: 52px; font-size: 1.02rem; padding-inline: 26px; }
.btn--pill { border-radius: var(--radius-pill); }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border: 0;
    background: transparent;
    border-radius: var(--radius-pill);
    cursor: pointer;
    position: relative;
    color: inherit;
}
.icon-btn:hover { background: color-mix(in srgb, var(--color-text) 8%, transparent); }
/* Inline icons ship without width/height so each context can size them.
   Any context that forgets used to render a ~600px SVG -- the product page's
   "Ask about this item" button did exactly that. This is the floor; every
   `.context svg` rule below is more specific and still wins. */
.icon { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -0.15em; }

.icon-btn svg { width: 21px; height: 21px; }

.count-bubble {
    position: absolute;
    inset-block-start: 2px;
    inset-inline-end: 0;
    min-width: 18px;
    height: 18px;
    padding-inline: 4px;
    border-radius: var(--radius-pill);
    background: var(--color-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

/* --------------------------------------------------------------- header */
.announce {
    background: var(--color-primary);
    color: #fff;
    font-size: .85rem;
    text-align: center;
    padding: 8px 16px;
}
.announce a { text-decoration: underline; }

.site-header {
    background: var(--color-bg);
    border-block-end: 1px solid var(--color-border);
    position: relative;
    z-index: 60;
}
.site-header--sticky { position: sticky; inset-block-start: 0; }

.site-header__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.12rem;
    letter-spacing: -0.02em;
    margin-inline-end: auto;
    min-width: 0;
}
.brand img { height: 36px; width: auto; }
.brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav { display: none; }
@media (min-width: 60rem) {
    .nav {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-inline: 8px auto;
    }
}
.nav__link {
    display: inline-block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: .93rem;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
}
.nav__link:hover { background: var(--color-surface); }
.nav__link[aria-current="page"] { color: var(--color-primary); font-weight: 600; }

.nav__item { position: relative; }
.nav__menu {
    position: absolute;
    inset-block-start: 100%;
    inset-inline-start: 0;
    min-width: 210px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 6px;
    display: none;
    z-index: 70;
}
.nav__item:hover > .nav__menu,
.nav__item:focus-within > .nav__menu { display: block; }
.nav__menu a { display: block; padding: 8px 10px; border-radius: 6px; font-size: .9rem; }
.nav__menu a:hover { background: var(--color-surface); }

.header__actions { display: flex; align-items: center; gap: 2px; }

.lang-switch {
    display: inline-flex;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    overflow: hidden;
}
.lang-switch a {
    padding: 5px 11px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--color-muted);
}
.lang-switch a[aria-current="true"] { background: var(--color-primary); color: #fff; }

/* mobile drawer nav */
.mobile-nav {
    border-block-start: 1px solid var(--color-border);
    padding-block: 8px 14px;
}
.mobile-nav a {
    display: block;
    padding: 11px 4px;
    border-block-end: 1px solid var(--color-border);
    font-weight: 500;
}
.mobile-nav a:last-child { border-block-end: 0; }
@media (min-width: 60rem) { .mobile-nav, .nav-toggle { display: none !important; } }

/* --------------------------------------------------------------- search */
.search {
    position: relative;
    flex: 1 1 auto;
    max-width: 460px;
    display: none;
}
@media (min-width: 48rem) { .search { display: block; } }

.search__field {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-surface);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    padding-inline: 14px;
}
.search__field:focus-within { border-color: var(--color-border); background: var(--color-bg); }
.search__field input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 10px 0;
    outline: none;
    min-width: 0;
}
.search__field svg { width: 18px; height: 18px; color: var(--color-muted); flex: none; }

.suggest {
    position: absolute;
    inset-block-start: calc(100% + 8px);
    inset-inline: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 80;
    max-height: 60vh;
    overflow-y: auto;
}
.suggest__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
}
.suggest__row:hover, .suggest__row:focus { background: var(--color-surface); }
.suggest__row img { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; flex: none; }
.suggest__label {
    padding: 8px 8px 4px;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--color-muted);
}

/* ---------------------------------------------------------------- cards */
.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.product-card:hover {
    box-shadow: var(--shadow-md);
    border-color: color-mix(in srgb, var(--color-primary) 25%, var(--color-border));
}
@media (hover: hover) {
    .product-card:hover { transform: translateY(-2px); }
}

.product-card__media {
    display: block;
    position: relative;
    background: var(--color-surface);
    aspect-ratio: var(--card-ratio, 4 / 5);
    overflow: hidden;
}
.product-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.product-card:hover .product-card__media img { transform: scale(1.04); }

.product-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 13px 14px;
    flex: 1;
}
.product-card__title {
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-block-start: auto;
    padding-block-start: 4px;
    font-weight: 700;
}
.product-card__was {
    color: var(--color-muted);
    text-decoration: line-through;
    font-weight: 500;
    font-size: .86rem;
}
.product-card__actions { margin-block-start: 10px; }

.badges {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-start: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    background: var(--color-text);
    color: var(--color-bg);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.badge--sale { background: var(--color-accent); color: #fff; }
.badge--out { background: color-mix(in srgb, var(--color-text) 55%, transparent); color: #fff; }
.badge--soft {
    background: var(--color-surface);
    color: var(--color-muted);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}

.stock-line { font-size: .8rem; font-weight: 600; }
.stock-line--in { color: var(--ok); }
.stock-line--low { color: var(--warn); }
.stock-line--out { color: var(--color-muted); }

/* collection tile */
.collection-tile {
    display: block;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-surface);
    aspect-ratio: 4 / 3;
}
.collection-tile img { width: 100%; height: 100%; object-fit: cover; }
.collection-tile__label {
    position: absolute;
    inset-inline: 0;
    inset-block-end: 0;
    padding: 26px 14px 12px;
    background: linear-gradient(to top, rgb(0 0 0 / 62%), transparent);
    color: #fff;
    font-weight: 600;
}
.collection-tile__label small { display: block; font-weight: 400; opacity: .8; font-size: .78rem; }

/* --------------------------------------------------------------- chips */
.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-block: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none;
    padding: 7px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--color-bg);
    font-size: .87rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}
.chip:hover { border-color: var(--color-primary); }
.chip[aria-current="true"], .chip.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* --------------------------------------------------------------- forms */
.field { display: block; margin-block-end: 14px; }
.field > label,
.label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    margin-block-end: 6px;
}

.input,
input[type="text"], input[type="tel"], input[type="email"],
input[type="search"], input[type="number"], select, textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    outline: none;
}
textarea { min-height: 96px; resize: vertical; }
.input:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 16%, transparent);
}
.field__error { color: var(--danger); font-size: .82rem; margin-block-start: 5px; }

.choice {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--color-bg);
    margin-block-end: 8px;
}
.choice:hover { border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border)); }
.choice input { margin-block-start: 3px; flex: none; accent-color: var(--color-primary); }
.choice__body { flex: 1; min-width: 0; }
.choice__title { font-weight: 600; font-size: .94rem; }
.choice__note { color: var(--color-muted); font-size: .84rem; }
.choice.is-selected {
    border-color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg));
}

/* option swatches / pills on the product page */
.opt-group { margin-block-end: 18px; }
.opt-values { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
    min-width: 46px;
    min-height: 42px;
    padding: 6px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
}
.opt:hover { border-color: var(--color-primary); }
.opt[aria-pressed="true"] {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}
.opt[disabled] { opacity: .38; cursor: not-allowed; text-decoration: line-through; }

.swatch {
    width: 40px; height: 40px;
    padding: 0;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    position: relative;
    cursor: pointer;
    background-clip: content-box;
}
.swatch[aria-pressed="true"] {
    box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-primary);
}
.swatch[disabled] { opacity: .35; cursor: not-allowed; }

/* quantity stepper */
.stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--color-bg);
    overflow: hidden;
}
.stepper button {
    width: 38px; height: 38px;
    border: 0;
    background: transparent;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text);
}
.stepper button:hover { background: var(--color-surface); }
.stepper button[disabled] { opacity: .35; cursor: not-allowed; }
.stepper input,
.stepper .stepper__value {
    width: 46px;
    min-height: 38px;
    border: 0;
    background: transparent;
    text-align: center;
    font-weight: 600;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.stepper--sm button { width: 32px; height: 32px; }
.stepper--sm input, .stepper--sm .stepper__value { width: 38px; min-height: 32px; font-size: .9rem; }

/* --------------------------------------------------------------- drawer */
.scrim {
    position: fixed;
    inset: 0;
    background: rgb(15 12 10 / 45%);
    z-index: 100;
    backdrop-filter: blur(1px);
}

.drawer {
    position: fixed;
    inset-block: 0;
    inset-inline-end: 0;
    width: min(420px, 100%);
    background: var(--color-bg);
    z-index: 101;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}
.drawer-anim { transition: transform .25s cubic-bezier(.32, .72, 0, 1); }
.drawer-hidden { transform: translateX(100%); }
[dir="rtl"] .drawer-hidden { transform: translateX(-100%); }

.drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-block-end: 1px solid var(--color-border);
}
.drawer__head h2 { margin: 0; font-size: 1.05rem; }
.drawer__body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.drawer__foot {
    border-block-start: 1px solid var(--color-border);
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    background: var(--color-bg);
}

/* ---------------------------------------------------------------- modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 101;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}
@media (min-width: 40rem) { .modal { align-items: center; padding: 24px; } }

.modal__panel {
    background: var(--color-bg);
    width: min(560px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    border-start-start-radius: var(--radius);
    border-start-end-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
@media (min-width: 40rem) { .modal__panel { border-radius: var(--radius); max-height: 86vh; } }

/* ---------------------------------------------------------------- lines */
.line {
    display: flex;
    gap: 12px;
    padding-block: 14px;
    border-block-end: 1px solid var(--color-border);
}
.line:last-child { border-block-end: 0; }
.line__media {
    width: 72px; height: 72px;
    flex: none;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-surface);
}
.line__media img { width: 100%; height: 100%; object-fit: cover; }
.line__body { flex: 1; min-width: 0; }
.line__title { font-weight: 600; font-size: .93rem; }
.line__meta { color: var(--color-muted); font-size: .82rem; }
.line__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-block-start: 8px;
}

/* --------------------------------------------------------------- totals */
.totals { border-block-start: 1px solid var(--color-border); padding-block-start: 12px; }
.totals__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-block: 5px;
    font-size: .93rem;
}
.totals__row--grand {
    border-block-start: 1px solid var(--color-border);
    margin-block-start: 8px;
    padding-block-start: 12px;
    font-size: 1.1rem;
    font-weight: 700;
}
.totals__row--discount { color: var(--ok); }

/* ---------------------------------------------------------------- toast */
.toasts {
    position: fixed;
    inset-block-end: calc(16px + env(safe-area-inset-bottom));
    inset-inline: 16px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}
.toast {
    background: var(--color-text);
    color: var(--color-bg);
    padding: 11px 16px;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-lg);
    font-size: .9rem;
    font-weight: 500;
    max-width: 460px;
}
.toast--error { background: var(--danger); color: #fff; }

/* ---------------------------------------------------------------- misc */
.notice {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    padding: 13px 15px;
    font-size: .9rem;
}
.notice--warn {
    border-color: color-mix(in srgb, var(--warn) 40%, var(--color-border));
    background: color-mix(in srgb, var(--warn) 8%, var(--color-bg));
}
.notice--error {
    border-color: color-mix(in srgb, var(--danger) 40%, var(--color-border));
    background: color-mix(in srgb, var(--danger) 7%, var(--color-bg));
    color: var(--danger);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: .84rem;
    color: var(--color-muted);
    padding-block: 14px;
}
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs span[aria-hidden] { opacity: .5; }

.empty {
    text-align: center;
    padding: 56px 20px;
    color: var(--color-muted);
}
.empty svg { width: 54px; height: 54px; margin-inline: auto; opacity: .35; margin-block-end: 14px; }

.prose { max-width: 68ch; }
.prose h2, .prose h3 { margin-block-start: 1.6em; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose img { border-radius: var(--radius-sm); margin-block: 1em; }
.prose table { width: 100%; border-collapse: collapse; margin-block: 1em; }
.prose th, .prose td { border: 1px solid var(--color-border); padding: 8px 10px; text-align: start; }
.prose blockquote {
    margin: 1.2em 0;
    padding-inline-start: 16px;
    border-inline-start: 3px solid var(--color-accent);
    color: var(--color-muted);
}

.skeleton {
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--color-text) 6%, transparent) 25%,
        color-mix(in srgb, var(--color-text) 10%, transparent) 37%,
        color-mix(in srgb, var(--color-text) 6%, transparent) 63%);
    background-size: 400% 100%;
    animation: skeleton 1.2s ease-in-out infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* --------------------------------------------------------------- footer */
.site-footer {
    margin-block-start: 48px;
    background: var(--color-surface);
    border-block-start: 1px solid var(--color-border);
    padding-block: 40px 24px;
}
.footer-grid {
    display: grid;
    gap: 26px;
    grid-template-columns: 1fr;
}
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-col h3 {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--color-muted);
    margin-block-end: 12px;
}
.footer-col a { display: block; padding-block: 5px; font-size: .92rem; }
.footer-bottom {
    margin-block-start: 28px;
    padding-block-start: 18px;
    border-block-start: 1px solid var(--color-border);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    color: var(--color-muted);
    font-size: .82rem;
}

.socials { display: flex; gap: 8px; margin-block-start: 12px; }
.socials a {
    width: 38px; height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    color: var(--color-muted);
}
.socials a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.socials svg { width: 17px; height: 17px; }

.pay-icons { display: flex; gap: 6px; flex-wrap: wrap; margin-block-start: 12px; }
.pay-icons span {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 4px 9px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--color-muted);
    background: var(--color-bg);
}

/* WhatsApp float */
.wa-float {
    position: fixed;
    inset-block-end: calc(18px + env(safe-area-inset-bottom));
    inset-inline-end: 18px;
    width: 52px; height: 52px;
    border-radius: var(--radius-pill);
    background: #25d366;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 90;
}
.wa-float:hover { color: #fff; filter: brightness(1.05); }
.wa-float svg { width: 27px; height: 27px; }
body.has-cartbar .wa-float { inset-block-end: calc(84px + env(safe-area-inset-bottom)); }

/* sticky bottom bar (mart / bistro) */
.cart-bar {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 95;
    background: var(--color-primary);
    color: #fff;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 24px rgb(0 0 0 / 18%);
}
.cart-bar__inner {
    max-width: var(--container);
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}
.cart-bar strong { font-size: 1.02rem; }
.cart-bar .btn { background: #fff; color: var(--color-primary); }
.cart-bar .btn:hover { background: #fff; filter: brightness(.95); }

/* two-column page shells */
.split {
    display: grid;
    gap: 28px;
    grid-template-columns: 1fr;
    align-items: start;
}
@media (min-width: 60rem) {
    .split { grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; }
    .split--sidebar-start { grid-template-columns: 250px minmax(0, 1fr); }
}
.sticky-side { position: sticky; inset-block-start: calc(var(--header-h) + 16px); }

[x-cloak] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   Page-level blocks
   ========================================================================== */

/* ------------------------------------------------------------------ hero */
.hero { background: var(--color-surface); }
.hero__inner {
    display: grid;
    gap: 22px;
    padding-block: 40px;
    align-items: center;
}
.hero__copy h1 { margin-block-end: 12px; }
.hero__sub {
    color: var(--color-muted);
    font-size: 1.05rem;
    max-width: 46ch;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 20px; }
.hero__media img {
    width: 100%;
    border-radius: var(--radius);
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
@media (min-width: 60rem) {
    .hero__inner { grid-template-columns: 1fr 1fr; gap: 46px; padding-block: 72px; }
    .hero--full .hero__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .hero--minimal .hero__inner { grid-template-columns: 1fr; padding-block: 44px; }
    .hero--minimal .hero__media { display: none; }
}

/* ------------------------------------------------------------------ usps */
.usps { border-block-end: 1px solid var(--color-border); background: var(--color-bg); }
.usps__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding-block: 16px;
}
@media (min-width: 48rem) { .usps__inner { grid-template-columns: repeat(3, 1fr); } }
.usp {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .9rem;
    font-weight: 500;
}
.usp svg { width: 20px; height: 20px; color: var(--color-primary); flex: none; }

/* --------------------------------------------------------- promo banner */
.promo-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 26px;
    border-radius: var(--radius);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}
.promo-banner h2 { margin: 0 0 4px; }
.promo-banner__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.testimonial { padding: 20px; }
.testimonial blockquote { margin: 0 0 10px; font-size: 1.02rem; }

/* ------------------------------------------------------- open / closed */
.open-state {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}
.open-state svg { width: 22px; height: 22px; flex: none; }
.open-state > div { flex: 1; min-width: 0; }
.open-state--open { border-color: color-mix(in srgb, var(--ok) 45%, var(--color-border)); }
.open-state--open svg { color: var(--ok); }
.open-state--closed { border-color: color-mix(in srgb, var(--warn) 45%, var(--color-border)); }
.open-state--closed svg { color: var(--warn); }

.hours-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.hours-table th { text-align: start; font-weight: 500; padding-block: 5px; color: var(--color-muted); }
.hours-table td { text-align: end; padding-block: 5px; }

.category-rail .chip { padding: 9px 16px; }

/* --------------------------------------------------------- product page */
.collection-head { padding-block: 8px 20px; }
.collection-head h1 { margin-block-end: 6px; }

.product { padding-block: 8px 40px; }
.product__layout { display: grid; gap: 26px; }
@media (min-width: 60rem) {
    .product__layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: start; }
    .product__gallery { position: sticky; top: calc(var(--header-h) + 16px); }
}

.product__stage {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-surface);
    /* Themes override this ratio (aurora 4:5, bistro 16:10) — the track and
       its slides fill whatever it resolves to rather than setting their own. */
    aspect-ratio: 1 / 1;
}
/* One frame per slide, snapped: a swipe on a phone is the browser's own
   momentum scroll, and with JS off the shopper can still reach every
   image. */
.product__track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.product__track::-webkit-scrollbar { display: none; }
.product__slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; }
.product__slide img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product__gallery.is-zoomable .product__slide:hover img { transform: scale(1.35); }

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: color-mix(in srgb, var(--color-surface) 88%, transparent);
    color: var(--color-text);
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s ease;
}
.product__stage:hover .gallery-nav,
.gallery-nav:focus-visible { opacity: 1; }
.gallery-nav[disabled] { opacity: 0 !important; pointer-events: none; }
.gallery-nav--prev { inset-inline-start: 10px; }
.gallery-nav--next { inset-inline-end: 10px; }
/* Touch has the swipe itself; arrows would only cover the picture. */
@media (hover: none) {
    .gallery-nav { display: none; }
}

.product__dots {
    position: absolute;
    inset-inline: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
}
.product__dot {
    width: 7px; height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--color-text) 30%, transparent);
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}
.product__dot[aria-current="true"] { width: 18px; border-radius: 4px; background: var(--color-primary); }

.product__thumbs { display: flex; gap: 8px; margin-block-start: 10px; overflow-x: auto; }
.product__thumb {
    flex: none;
    width: 68px; height: 68px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-surface);
    cursor: pointer;
}
.product__thumb[aria-pressed="true"] { border-color: var(--color-primary); }
.product__thumb img { width: 100%; height: 100%; object-fit: cover; }

.product__info h1 { margin-block-end: 10px; }
.product__price { display: flex; align-items: baseline; gap: 10px; margin-block: 8px 12px; }
.product__price-now { font-size: 1.5rem; font-weight: 700; }
.product__price-was { color: var(--color-muted); text-decoration: line-through; }
.product__lede { color: var(--color-muted); }
.product__availability { display: flex; align-items: center; gap: 10px; margin-block-end: 18px; }

.modifier-group { border: 0; padding: 0; margin-inline: 0; }
.modifier-group legend { padding: 0; display: flex; align-items: center; gap: 8px; }

.product__buy {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-block-start: 18px;
}
.product__add { flex: 1; }

.share-row { display: flex; align-items: center; gap: 10px; margin-block-start: 18px; color: var(--color-muted); }
.share-row a { display: inline-flex; }
.share-row svg { width: 19px; height: 19px; }
.share-row a:hover { color: var(--color-primary); }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 10px; }

.product__detail { margin-block-start: 40px; padding-block-start: 28px; border-block-start: 1px solid var(--color-border); }
.spec-table { width: 100%; border-collapse: collapse; margin-block: 16px; max-width: 640px; }
.spec-table th, .spec-table td { border-block-end: 1px solid var(--color-border); padding: 9px 4px; text-align: start; }
.spec-table th { font-weight: 500; color: var(--color-muted); width: 40%; }

/* ---------------------------------------------------------------- search */
.search-page-form { display: flex; gap: 8px; max-width: 560px; margin-block-start: 14px; }
.search-page-form input { flex: 1; }

/* ------------------------------------------------------------ cart page */
.cart-page { padding-block-end: 40px; }
.coupon-row { margin-block: 14px; }

/* ------------------------------------------------------------- checkout */
.checkout { padding-block-end: 48px; }
.checkout__form { --stack-gap: 16px; }
.checkout__step { padding: 20px; }
.checkout__step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    margin-block-end: 14px;
}
.checkout__step-n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    flex: none;
}

/* ==========================================================================
   Task 5 — order, tracking and payment-return pages
   ========================================================================== */

/* A chip that is a button (area picker, slot picker) — the catalogue chips
   were links, these carry state. */
.chip.is-selected { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.chip.is-disabled,
.chip:disabled { opacity: .45; cursor: not-allowed; }

/* Order status timeline. Horizontal on a desktop, a vertical list on a
   phone, because five statuses do not fit across 360px. */
.timeline { display: flex; gap: 4px; list-style: none; margin: 18px 0 6px; padding: 0; }
.timeline__step { flex: 1; position: relative; text-align: center; font-size: .78rem; color: var(--color-muted); }
.timeline__dot {
    display: block; inline-size: 12px; block-size: 12px; margin: 0 auto 8px;
    border-radius: 50%; background: var(--color-border);
}
.timeline__step::before {
    content: ""; position: absolute; inset-block-start: 5px; inset-inline: -50% 50%;
    block-size: 2px; background: var(--color-border);
}
.timeline__step:first-child::before { display: none; }
.timeline__step.is-done { color: var(--color-text); }
.timeline__step.is-done .timeline__dot { background: var(--color-primary); }
.timeline__step.is-done::before { background: var(--color-primary); }
.timeline__step.is-current .timeline__label { font-weight: 600; }

@media (max-width: 640px) {
    .timeline { flex-direction: column; gap: 10px; }
    .timeline__step { display: flex; align-items: center; gap: 10px; text-align: start; }
    .timeline__step::before { display: none; }
    .timeline__dot { margin: 0; }
}

.order-page .line__body { inline-size: 100%; }
.page-pay .card h1 { font-size: 1.35rem; margin-block: 6px 8px; }

/* -------------------------------------------------------- store banners */
/* Vendor-managed banners (announcement strips and home-page blocks). The
   `--style` modifiers are what a vendor picks instead of two raw colours,
   so a palette change keeps looking deliberate. */
.store-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    border-radius: var(--radius);
    overflow: hidden;
}
.store-banner + .store-banner { margin-block-start: 16px; }
.store-banner__media { flex: 1 1 320px; min-width: 0; }
.store-banner__media img { display: block; width: 100%; height: auto; object-fit: cover; }
.store-banner__copy { flex: 1 1 280px; padding: 26px; min-width: 0; }
.store-banner__copy h2 { margin: 0 0 6px; }
.store-banner__copy p { margin: 0 0 14px; }

.store-banner--soft { background: var(--color-surface); border: 1px solid var(--color-border); }
.store-banner--solid { background: var(--color-primary); color: #fff; }
.store-banner--solid .muted,
.store-banner--solid h2 { color: inherit; }
.store-banner--solid .btn { background: #fff; color: var(--color-primary); border-color: #fff; }
.store-banner--outline { background: transparent; border: 1px solid var(--color-primary); }
.store-banner--image { background: var(--color-surface); }
.store-banner--image .store-banner__media { flex: 1 1 100%; }
.store-banner--image .store-banner__copy { flex: 1 1 100%; }

/* ---------------------------------------------------------------- account
 * The signed-in shopper's pages. Built from the same tokens as the rest of
 * the storefront so a theme that recolours the shop recolours these too:
 * the stat figure borrows the price's weight, the status pills borrow the
 * stock line's semantic colours.
 */
.account-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: baseline;
    justify-content: space-between;
    margin-block-end: 4px;
}
.account-head h1 { margin: 0; }
.account-head__sub { color: var(--color-muted); font-size: .88rem; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-block: 18px;
}
@media (min-width: 45rem) {
    .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.stat {
    display: block;
    padding: 16px 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, transform .15s ease;
}
a.stat:hover { border-color: var(--color-primary); transform: translateY(-1px); color: inherit; }
.stat__figure {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.stat__label {
    display: block;
    margin-block-start: 4px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--color-muted);
}

/* Order state, as a colour a shopper can scan down a column. */
.state {
    display: inline-block;
    padding: 2px 9px;
    border-radius: var(--radius-pill);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: color-mix(in srgb, var(--color-muted) 14%, transparent);
    color: var(--color-muted);
}
.state--wait { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.state--live { background: color-mix(in srgb, var(--color-primary) 12%, transparent); color: var(--color-primary); }
.state--done { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.state--off  { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }

/* A row of item thumbnails, so an order is recognisable without opening it. */
.thumb-row { display: flex; gap: 6px; margin-block-start: 8px; }
.thumb-row img,
.thumb-row .thumb-row__more {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}
.thumb-row__more {
    display: grid;
    place-items: center;
    font-size: .72rem;
    font-weight: 700;
    color: var(--color-muted);
}

.account-grid { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 60rem) {
    .account-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}
.account-card { padding: 18px; }
.account-card h2 { font-size: 1.02rem; margin: 0 0 10px; }
.account-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-block-end: 10px;
}
.account-card__head h2 { margin: 0; }

/* Five tabs do not fit a phone: scroll them rather than clipping the last
   two, and keep the scrollbar out of the design. */
.account-nav {
    margin-block-end: 18px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-block-end: 2px;
}
.account-nav::-webkit-scrollbar { display: none; }
.account-nav .chip { flex: none; }

/* Price and actions share a row on a desktop and stack on a phone. */
.account-card .line__foot { flex-wrap: wrap; row-gap: 8px; }
