/* =========================================================
   MobilDepå – mobile-first stylesheet
   Sections: tokens · base · controls · header · dialogs ·
   product cards · home · category · product page · cart ·
   checkout · footer · misc
   ========================================================= */

/* ---------- 1. design tokens (light, with dark overrides) ---------- */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f4f6f9;
  --surface-2: #e8ecf2;
  --text: #141922;
  --muted: #4a5565;
  --line: #d3dae4;
  --accent: #0b57d0;
  --accent-hover: #0a47aa;
  --on-accent: #ffffff;
  --accent-soft: #e6efff;
  --focus: #0b57d0;
  --ok: #0a6b39;   --ok-bg: #e0f5e8;
  --warn: #7a4300; --warn-bg: #fff0d1;
  --bad: #a11d1d;  --bad-bg: #fde6e6;
  --radius: 12px;
  --shadow: 0 2px 10px rgb(15 25 40 / .08);
  --gutter: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1217; --surface: #171d25; --surface-2: #222a35; --text: #e9eef5; --muted: #a9b4c3; --line: #2f3946;
    --accent: #7db1ff; --accent-hover: #a6caff; --on-accent: #08111f; --accent-soft: #16263f; --focus: #9cc4ff;
    --ok: #74e0a3; --ok-bg: #13301f; --warn: #ffc76b; --warn-bg: #3a2a0c; --bad: #ff9d9d; --bad-bg: #3c1717;
    --shadow: 0 2px 12px rgb(0 0 0 / .45);
  }
}
:root[data-theme="dark"] {
  --bg: #0e1217; --surface: #171d25; --surface-2: #222a35; --text: #e9eef5; --muted: #a9b4c3; --line: #2f3946;
  --accent: #7db1ff; --accent-hover: #a6caff; --on-accent: #08111f; --accent-soft: #16263f; --focus: #9cc4ff;
  --ok: #74e0a3; --ok-bg: #13301f; --warn: #ffc76b; --warn-bg: #3a2a0c; --bad: #ff9d9d; --bad-bg: #3c1717;
  --shadow: 0 2px 12px rgb(0 0 0 / .45);
}

/* ---------- 2. base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; min-width: 320px; background: var(--bg); color: var(--text);
  font: 400 1rem/1.5 var(--font); -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { display: block; height: auto; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.5rem, 1.1rem + 2vw, 2.25rem); }
h2 { font-size: clamp(1.25rem, 1.05rem + 1vw, 1.65rem); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
address { font-style: normal; }
pre { background: var(--surface-2); padding: 12px; border-radius: 8px; overflow-x: auto; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--line); }
.icon { width: 22px; height: 22px; flex: none; }
.icon--lg { width: 30px; height: 30px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 28px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section__head h2 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--accent); color: var(--on-accent); border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 8px; }
.noscript { padding: 16px; background: var(--warn-bg); color: var(--warn); text-align: center; margin: 0; }

/* ---------- 3. controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border: 2px solid var(--accent); border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; text-align: center;
  line-height: 1.2; transition: background-color .15s, border-color .15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-hover); }
.btn--block { width: 100%; }
.btn--lg { min-height: 50px; padding: 0 24px; font-size: 1.05rem; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--text); }
.icon-btn:hover { background: var(--surface-2); }
.link-btn { display: inline-flex; align-items: center; gap: 4px; padding: 8px 4px; min-height: 44px; border: 0; background: none; color: var(--muted); font-size: .875rem; text-decoration: underline; }
.link-btn:hover { color: var(--bad); }
.link-btn .icon { width: 18px; height: 18px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .field legend { font-weight: 600; }
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="number"], select {
  width: 100%; min-height: 46px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text);
}
input[aria-invalid="true"] { border-color: var(--bad); }
.field__error { margin: 0; color: var(--bad); font-size: .875rem; font-weight: 600; }
.field__error:empty { display: none; }
fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
legend { padding: 0; margin-bottom: 10px; font-size: 1.1rem; font-weight: 800; }
.fields-2 { display: grid; gap: 0 12px; }
@media (min-width: 480px) { .fields-2 { grid-template-columns: 1fr 1fr; } .fields-2--postcode { grid-template-columns: 1fr 2fr; } }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.option { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; margin-bottom: 8px; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.option input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.option__fee { margin-left: auto; font-weight: 700; white-space: nowrap; }
.notice { padding: 12px 16px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--line); }
.notice--ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; font-weight: 600; }
.notice--bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.notice--bad pre { color: var(--text); }
.empty { text-align: center; padding: 40px 16px; display: grid; gap: 12px; justify-items: center; }
.empty p { margin: 0; }
.form-error { color: var(--bad); font-weight: 700; margin: 0 0 12px; }
.form-error:empty { display: none; }

/* ---------- 4. header: top strip + sticky bar ---------- */
.topstrip { background: var(--surface); border-bottom: 1px solid var(--line); }
.topstrip__inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; padding-block: 6px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; min-width: 0; }
.logo:hover { color: var(--text); }
.logo img { width: 34px; height: 34px; }
.logo__text { white-space: nowrap; }
.topstrip__tools { display: flex; align-items: center; gap: 4px; }
.lang { display: flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { min-width: 40px; min-height: 36px; padding: 0 9px; border: 0; background: transparent; font-weight: 700; font-size: .85rem; }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.currency { padding: 0 8px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.topstrip__account { display: inline-flex; align-items: center; gap: 6px; min-width: 44px; min-height: 44px; justify-content: center; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; font-weight: 600; }
.topstrip__account:hover { background: var(--surface-2); }
.topstrip__account span { display: none; }
@media (min-width: 640px) { .topstrip__account span { display: inline; } }
@media (max-width: 400px) { .currency { display: none; } .logo { font-size: 1.05rem; } }

.bar { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.bar__inner { position: relative; display: flex; align-items: center; gap: 8px; padding-block: 8px; }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 46px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 700; flex: none; }
.menu-btn:hover { background: var(--accent-hover); }
.menu-btn span { display: none; }
@media (min-width: 560px) { .menu-btn span { display: inline; } .menu-btn { padding: 0 16px; } }
.search { flex: 1; min-width: 0; display: flex; }
.search input { border-radius: 10px 0 0 10px; border-right: 0; background: var(--surface); }
.search__btn { flex: none; width: 46px; min-height: 46px; display: grid; place-items: center; border: 1.5px solid var(--line); border-left: 0; border-radius: 0 10px 10px 0; background: var(--surface-2); }
.search__btn:hover { background: var(--accent-soft); }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 46px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); font-weight: 700; }
.cart-btn:hover { background: var(--surface); }
.cart-btn__sum { display: grid; line-height: 1.1; text-align: left; }
.cart-btn__sum small { font-size: .62rem; font-weight: 600; color: var(--muted); }
.cart-btn__sum small:empty { display: none; }
.cart-btn__total { font-size: .88rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cart-btn__count { position: absolute; top: -7px; left: 24px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: .72rem; line-height: 20px; text-align: center; }
.cart-btn.has-items .cart-btn__count { background: var(--accent); color: var(--on-accent); }
@media (min-width: 700px) { .search { position: relative; max-width: 720px; } .bar__inner { gap: 12px; } .cart-btn { padding: 0 14px; } .cart-btn__total { font-size: 1rem; } }

.suggest {
  position: absolute; z-index: 60; left: var(--gutter); right: var(--gutter); top: calc(100% - 2px);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
@media (min-width: 700px) { .suggest { left: 0; right: 0; top: calc(100% + 6px); } }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; min-height: 56px; color: var(--text); text-decoration: none; }
.suggest a:hover, .suggest a:focus-visible { background: var(--accent-soft); outline-offset: -3px; }
.suggest img { width: 44px; height: 44px; border-radius: 8px; flex: none; }
.suggest__text { display: grid; min-width: 0; }
.suggest__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest__meta { font-size: .8rem; color: var(--muted); }
.suggest .suggest__all { min-height: 48px; justify-content: center; border-top: 1px solid var(--line); color: var(--accent); font-weight: 700; }
.suggest__none { margin: 0; padding: 14px 16px; color: var(--muted); }

/* ---------- 5. dialogs: mega-menu, cart drawer, modals ---------- */
dialog { padding: 0; border: 0; max-width: none; max-height: none; color: var(--text); background: var(--bg); }
dialog::backdrop { background: rgb(8 12 20 / .55); }
dialog[open] { animation: pop-in .18s ease-out; }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.drawer { margin: 0 0 0 auto; height: 100dvh; width: min(440px, 100%); box-shadow: -8px 0 30px rgb(0 0 0 / .25); }
.drawer[open] { animation-name: slide-in-right; }
@keyframes slide-in-right { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer__panel { display: flex; flex-direction: column; height: 100%; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { margin: 0; font-size: 1.25rem; }
.drawer__body { flex: 1; overflow-y: auto; padding: 0 16px; overscroll-behavior: contain; }
.drawer__foot { display: grid; gap: 10px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.drawer__foot:empty { display: none; }
.drawer__foot p { margin: 0; }
.shipping-hint { font-weight: 600; font-size: .9rem; }

.modal { margin: auto; width: min(440px, calc(100% - 32px)); border-radius: 16px; box-shadow: 0 20px 60px rgb(0 0 0 / .35); }
.modal__panel { padding: 8px 16px 20px; display: grid; gap: 4px; }
.modal__panel .drawer__head { padding-inline: 0; margin-bottom: 8px; }

.menu { margin: 0 auto 0 0; height: 100dvh; width: min(420px, 100%); box-shadow: 8px 0 30px rgb(0 0 0 / .25); }
.menu[open] { animation-name: slide-in-left; }
@keyframes slide-in-left { from { transform: translateX(-32px); opacity: 0; } to { transform: none; opacity: 1; } }
.menu__panel { display: flex; flex-direction: column; height: 100%; }
.menu__head { display: flex; align-items: center; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); }
.menu__head h2 { margin: 0 auto 0 8px; font-size: 1.15rem; }
.menu__back { order: -1; }
.menu__back[hidden] { display: none; }
.menu__cols { flex: 1; overflow-y: auto; }
.menu__col { display: none; }
.menu__col.is-last { display: block; }
.menu__all { display: flex; align-items: center; min-height: 48px; padding: 10px 16px; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--line); background: var(--surface); }
.menu__item {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 50px; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--text); text-align: left; text-decoration: none;
}
.menu__item > span:first-child { flex: 1; }
.menu__item:hover { background: var(--surface); color: var(--text); }
.menu__item.is-open { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.menu__item .icon { width: 18px; height: 18px; color: var(--muted); }
.menu__count { margin-left: auto; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

@media (min-width: 900px) {
  .menu { margin: 0 auto; top: var(--menu-top, 0px); bottom: auto; height: auto; max-height: calc(100dvh - var(--menu-top, 0px)); width: min(1240px, calc(100% - 32px)); border-radius: 0 0 16px 16px; box-shadow: 0 20px 50px rgb(0 0 0 / .3); }
  .menu[open] { animation-name: pop-in; }
  .menu__panel { height: auto; max-height: inherit; }
  .menu__head { padding-left: 16px; }
  .menu__back { display: none; }
  .menu__cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); min-height: 380px; max-height: min(560px, calc(100dvh - var(--menu-top, 0px) - 70px)); overflow: hidden; }
  .menu__col, .menu__col.is-last { display: block; overflow-y: auto; border-right: 1px solid var(--line); }
  .menu__col:last-child { border-right: 0; }
}

/* ---------- 6. product cards, grids, quantity, stock, price ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid > li, .scroller > li { display: flex; min-width: 0; }

.card { display: flex; flex-direction: column; width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.card:hover { box-shadow: var(--shadow); border-color: var(--muted); }
.card__media { display: block; background: #fff; }
.card__media img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.card__body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 10px; }
.card__sku { margin: 0; font-size: .75rem; color: var(--muted); letter-spacing: .02em; }
.card__title { margin: 0; font-size: .95rem; line-height: 1.3; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__title a { color: var(--text); text-decoration: none; }
.card__title a:hover { text-decoration: underline; }
.card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.card { position: relative; }
.card .buy, .card .qty { position: relative; z-index: 1; } /* keep controls above the stretched link */
.buy { display: grid; gap: 8px; margin-top: auto; }
.card__body .stock { margin-top: 2px; }

.stock { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin: 0; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.stock__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock--in { background: var(--ok-bg); color: var(--ok); }
.stock--low { background: var(--warn-bg); color: var(--warn); }
.stock--out { background: var(--bad-bg); color: var(--bad); }
.stock--backorder { background: var(--accent-soft); color: var(--accent); }
.price { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; }
.price__now { font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.price__vat { font-size: .75rem; color: var(--muted); }
.price--lg .price__now { font-size: 1.9rem; }
.price__now.is-sale { color: var(--bad); }
.price__was { font-size: .85rem; color: var(--muted); }
.badge-sale { padding: 1px 7px; border-radius: 6px; background: var(--bad); color: #fff; font-size: .75rem; font-weight: 800; }
:root[data-theme="dark"] .badge-sale { color: #1a0a0a; }
.cart-line__total small, .totals dt small { font-weight: 400; color: var(--muted); font-size: .75rem; }
.rich { max-width: 78ch; }
.rich h3 { font-size: 1.15rem; margin-top: 1.2em; }
.rich h4 { font-size: 1.02rem; margin-top: 1em; }
.rich ul, .rich ol { padding-left: 1.3em; margin: 0 0 1em; }
.rich ul { list-style: disc; } .rich ol { list-style: decimal; }
.rich table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; margin-bottom: 1em; }
.rich td, .rich th { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.filter__note { grid-column: 1 / -1; margin: 4px 0 8px; }
#more { flex-direction: column; align-items: center; gap: 10px; text-align: center; }

.qty { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.qty button { min-height: 44px; border: 0; background: var(--surface); font-size: 1.25rem; font-weight: 700; line-height: 1; }
.qty button:hover { background: var(--accent-soft); }
.qty input { min-height: 44px; border: 0; border-radius: 0; text-align: center; padding: 0; -moz-appearance: textfield; appearance: textfield; font-weight: 700; background: var(--bg); }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty :focus-visible { outline-offset: -3px; }

/* ---------- 7. home ---------- */
.hero { background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border-bottom: 1px solid var(--line); }
.hero__inner { display: grid; gap: 20px; align-items: center; padding-block: 28px; }
.hero h1 { margin-bottom: .4em; }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__art img { width: min(100%, 460px); margin-inline: auto; }
@media (min-width: 800px) { .hero__inner { grid-template-columns: 1.1fr .9fr; padding-block: 48px; } }

.trust { display: grid; gap: 12px; padding-block: 20px; }
.trust li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.trust .icon { width: 28px; height: 28px; color: var(--accent); }
.trust strong { display: block; }
.trust span span { color: var(--muted); font-size: .9rem; }
@media (min-width: 700px) { .trust { grid-template-columns: repeat(3, 1fr); } }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { display: grid; justify-items: center; gap: 6px; height: 100%; padding: 18px 10px; text-align: center; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .15s, border-color .15s; }
.tile:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.tile__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.tile__name { font-weight: 700; }
.tile__count { font-size: .82rem; color: var(--muted); }

.brands { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-pill { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); text-decoration: none; }
.brand-pill:hover { border-color: var(--accent); color: var(--text); }
.brand-pill__name { font-weight: 800; letter-spacing: .02em; }
.brand-pill__count { font-size: .8rem; color: var(--muted); }

.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(160px, 44%, 250px); gap: 12px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.scroller > li { scroll-snap-align: start; }

/* ---------- 8. category page ---------- */
.crumbs { padding-block: 14px 6px; font-size: .88rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--muted); }
.crumbs [aria-current] { color: var(--muted); }
.chips ul { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); text-decoration: none; white-space: nowrap; font-weight: 600; }
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip span { font-size: .8rem; font-weight: 400; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 8px 0 16px; padding-block: 10px; border-block: 1px solid var(--line); }
.toolbar__count { margin: 0; font-weight: 700; margin-right: auto; }
.toolbar__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.sort { display: flex; align-items: center; gap: 8px; }
.sort select { width: auto; min-width: 150px; }
.filter { position: relative; }
.filter summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 600; cursor: pointer; list-style: none; }
.filter summary::-webkit-details-marker { display: none; }
.filter summary::after { content: "▾"; margin-left: 8px; }
.filter[open] summary { border-color: var(--accent); }
.filter__panel { margin-top: 8px; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); column-gap: 16px; }
.filter[open] { flex-basis: 100%; }
.check small { color: var(--muted); }
#more { display: flex; justify-content: center; padding-block: 24px; }

/* ---------- 9. product page ---------- */
.pdp { display: grid; gap: 24px; padding-block: 8px 16px; }
@media (min-width: 800px) { .pdp { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; } }
.gallery__main { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.gallery__main img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 10px; margin-top: 10px; }
.thumb { width: 72px; height: 72px; padding: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.thumb[aria-pressed="true"] { border-color: var(--accent); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp__info { display: grid; gap: 12px; align-content: start; }
.pdp__info h1 { margin: 0; }
.pdp__info > * { margin-block: 0; }
.pdp__meta { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); font-size: .92rem; }
.pdp__meta strong { color: var(--text); }
.pdp__info .buy { grid-template-columns: 1fr; max-width: 420px; }
@media (min-width: 480px) { .pdp__info .buy { grid-template-columns: 150px 1fr; } }
.pdp__info .buy:not([data-buy]) { grid-template-columns: minmax(0, 280px); }
.perks { display: grid; gap: 8px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.perks li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.perks .icon { color: var(--accent); }
.pdp__section { padding-block: 18px; border-top: 1px solid var(--line); }
.pdp__section p { max-width: 70ch; }
.compat { display: flex; flex-wrap: wrap; gap: 8px; }
.compat a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); background: var(--surface); }
.compat a:hover { border-color: var(--accent); color: var(--text); }

/* ---------- 10. cart drawer lines ---------- */
.cart-list { display: grid; }
.cart-line { display: grid; grid-template-columns: 72px 1fr; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line__img img { width: 72px; height: 72px; border-radius: 8px; border: 1px solid var(--line); }
.cart-line__main { display: grid; align-content: start; gap: 2px; min-width: 0; }
.cart-line__name { font-weight: 600; color: var(--text); text-decoration: none; line-height: 1.3; }
.cart-line__name:hover { text-decoration: underline; }
.cart-line__sku { font-size: .8rem; color: var(--muted); }
.cart-line__side { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.cart-line__side .qty { width: 136px; }
.cart-line__total { margin-left: auto; font-variant-numeric: tabular-nums; }
.totals { margin: 0; display: grid; gap: 6px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; }
.totals dt, .totals dd { margin: 0; }
.totals dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.drawer__foot .totals { font-size: 1.15rem; }
.totals__grand { font-size: 1.2rem; padding-top: 8px; border-top: 1px solid var(--line); }
.totals__vat { color: var(--muted); font-size: .88rem; }

/* ---------- 11. checkout ---------- */
.checkout { display: grid; gap: 24px; margin-top: 16px; }
.checkout[hidden], .empty[hidden], .confirm[hidden] { display: none; }
@media (min-width: 900px) { .checkout { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 40px; align-items: start; } .checkout__summary { position: sticky; top: 96px; } }
.checkout__summary { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.checkout__summary h2 { font-size: 1.25rem; }
.sum-line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sum-line img { width: 56px; height: 56px; border-radius: 8px; border: 1px solid var(--line); }
.sum-line__name { display: grid; line-height: 1.3; font-weight: 600; }
.sum-line__name small { font-weight: 400; color: var(--muted); }
.checkout__summary .totals { margin-top: 14px; }
.confirm { max-width: 640px; margin: 24px auto; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.confirm h2:focus { outline: none; }
.confirm-total { font-size: 1.2rem; font-weight: 800; margin-block: 14px; }

/* ---------- 12. footer, toast, static pages ---------- */
.footer { margin-top: 40px; background: var(--surface); border-top: 1px solid var(--line); }
.footer__grid { display: grid; gap: 24px; padding-block: 32px; }
@media (min-width: 640px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1.2fr 1fr; } }
.footer__h { font-size: 1rem; margin-bottom: .6em; }
.footer li { margin-bottom: 4px; }
.footer a { color: var(--text); }
.footer a:hover { color: var(--accent); }
.footer__bottom { padding-block: 16px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.footer__bottom p { margin: 0; }

.toast {
  position: fixed; inset: calc(12px + env(safe-area-inset-top)) 16px auto 16px; margin: 0 auto; width: fit-content; pointer-events: none; max-width: min(520px, calc(100vw - 32px));
  padding: 12px 18px; border: 0; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 600; box-shadow: 0 8px 30px rgb(0 0 0 / .35);
}
.toast:not(:popover-open) { display: none; }

.prose { max-width: 760px; padding-block: 8px 24px; }
.prose h2 { margin-top: 1.4em; font-size: 1.3rem; }
html[lang="en"] .t-sv { display: none; }
html:not([lang="en"]) .t-en { display: none; }
.placeholder-note { padding: 10px 14px; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .stock { border: 1px solid CanvasText; }
  .option:has(input:checked) { outline: 2px solid Highlight; }
}
