﻿/* Quartz Eon storefront styles.
   Piece 2: theme tokens, page shell (promo bar, header with log in menu, footer) and the products page. */

/* ---------- Tokens ----------
   Midnight indigo: a premium palette built from the logo's own blue-violet gradient.
   Dark mode is a true near-black indigo (not grey); light mode is crisp white on a soft
   violet-tinted paper. The same tokens are shared by admin.html and seller.html. */
:root {
  color-scheme: light;

  --font-display: "Bricolage Grotesque", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;

  /* Neutrals carry a whisper of violet so they sit with the indigo accent */
  --paper: #F6F5FB;
  --card: #FFFFFF;
  --ink: #15132A;
  --ink-2: #55506E;
  --ink-3: #78738F;
  --line: #E1DEEF;
  --ink-line: rgb(21 19 42 / .28);
  --focus: #4C3FE0;

  /* Indigo-violet, sampled from the logo. The one accent colour. */
  --brand: #4C3FE0;
  --brand-ink: #FFFFFF;

  /* A separate red for form errors, kept apart from the indigo accent on purpose */
  --danger: #D23B3B;

  /* Section washes: each section sets --h (its hue), these set how light it is */
  --tone-s: 62%;
  --tone-l: 92%;
  --dot-s: 72%;
  --dot-l: 44%;

  /* Product tiles: the tint comes from each tile's own --h */
  --art-s: 62%;
  --art-l: 90%;
  --art-fg-s: 50%;
  --art-fg-l: 27%;

  /* The promo bar and footer are always a dark indigo band, in both themes */
  --footer-bg: #140F28;
  --footer-ink: #F2F0FB;
  --footer-ink-2: #A9A3C4;
  --footer-line: rgb(255 255 255 / .12);

  --shadow-2: 0 24px 60px -20px rgb(15 12 30 / .35);

  --gutter: clamp(16px, 4vw, 32px);
  --radius: 14px;
  --radius-l: 22px;
  --h: 248;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0A0912;
    --card: #14121F;
    --ink: #F1EEFC;
    --ink-2: #B6AFCB;
    --ink-3: #948DA8;
    --line: #29253C;
    --ink-line: rgb(241 238 252 / .3);
    --focus: #9C8FFF;
    --brand: #8B7CFF;
    --brand-ink: #14101F;
    --danger: #FF6B6B;
    --tone-s: 34%;
    --tone-l: 13%;
    --dot-s: 78%;
    --dot-l: 64%;
    --art-s: 34%;
    --art-l: 21%;
    --art-fg-s: 78%;
    --art-fg-l: 78%;
    --footer-bg: #06050C;
    --footer-ink: #F1EEFC;
    --footer-ink-2: #988FAE;
    --footer-line: rgb(255 255 255 / .1);
    --shadow-2: 0 24px 60px -20px rgb(0 0 0 / .8);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0A0912;
  --card: #14121F;
  --ink: #F1EEFC;
  --ink-2: #B6AFCB;
  --ink-3: #948DA8;
  --line: #29253C;
  --ink-line: rgb(241 238 252 / .3);
  --focus: #9C8FFF;
  --brand: #8B7CFF;
  --brand-ink: #14101F;
  --danger: #FF6B6B;
  --tone-s: 34%;
  --tone-l: 13%;
  --dot-s: 78%;
  --dot-l: 64%;
  --art-s: 34%;
  --art-l: 21%;
  --art-fg-s: 78%;
  --art-fg-l: 78%;
  --footer-bg: #06050C;
  --footer-ink: #F1EEFC;
  --footer-ink-2: #988FAE;
  --footer-line: rgb(255 255 255 / .1);
  --shadow-2: 0 24px 60px -20px rgb(0 0 0 / .8);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* stable gutter: hiding the scrollbar while a dialog is open must not shift the page */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; }
/* A column that is at least as tall as the screen, so the footer sits at the bottom on short pages */
body {
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.art {
  flex: none;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  html.theme-switching, html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after {
    transition: background-color .3s ease, color .3s ease, border-color .3s ease, fill .3s ease, stroke .3s ease !important;
  }
}

/* ---------- Layout ---------- */
.wrap { width: min(1200px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.sec { padding-block: clamp(36px, 5vw, 64px) clamp(24px, 3vw, 40px); }
section[id] { scroll-margin-top: 76px; }

/* Each section is its own colour wash; --h is the hue */
.tone { background: hsl(var(--h) var(--tone-s) var(--tone-l)); }
.tone--sapphire { --h: 234; }
.tone--paper { --h: 248; background: var(--paper); }

.sec__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 12px 24px; margin-bottom: 28px;
}
.sec__count { font: 500 13px/1 var(--font-mono); letter-spacing: .04em; color: var(--ink-2); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font: 500 12px/1.2 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow::before {
  content: ""; width: 9px; height: 9px; flex: none; border-radius: 2px; transform: rotate(45deg);
  background: hsl(var(--h) var(--dot-s) var(--dot-l));
}
.h2 {
  font: 700 clamp(1.9rem, 1.2rem + 2.6vw, 3rem)/1.04 var(--font-display);
  letter-spacing: -.03em; text-wrap: balance;
}
.note { padding: 14px 16px; border: 1px dashed var(--ink-line); border-radius: var(--radius); color: var(--ink-2); font-size: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 1.5px solid transparent; border-radius: var(--radius);
  font: 600 15px/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--brand); color: var(--brand-ink); }
.btn--ghost { background: transparent; border-color: var(--ink-line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--sm { min-height: 40px; padding: 0 20px; border-radius: 12px; font-size: 14px; }
.btn--block { width: 100%; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1.5px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink);
  transition: border-color .15s ease, background-color .15s ease;
}
.icon-btn:hover { border-color: var(--ink); }

.link {
  justify-self: start; padding: 0; border: 0; background: none; color: var(--ink-2);
  font-size: 14px; text-decoration: underline; text-underline-offset: 3px;
}
.link:hover { color: var(--ink); }

/* ---------- Promo bar and header ---------- */
.promo { background: var(--footer-bg); color: var(--footer-ink); }
.promo__row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 16px;
  padding-block: 9px; font: 500 12px/1.3 var(--font-mono); letter-spacing: .04em;
}
.promo__sep { width: 6px; height: 6px; background: var(--brand); transform: rotate(45deg); }
/* Phones: no promo bar (owner: it only takes space; it wraps to two lines there) */
@media (max-width: 560px) { .promo { display: none; } }

.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.site-header__row { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__word { font: 800 28px/1 var(--font-display); letter-spacing: -.04em; text-transform: lowercase; white-space: nowrap; }
.site-header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Log in menu: a button at the top right that opens a Customer / Seller choice */
.login { position: relative; }
.login__btn { min-height: 44px; padding: 0 14px 0 16px; gap: 8px; border-radius: 999px; font-size: 14px; }
.login__btn .i { width: 18px; height: 18px; }
.login__chev { transition: transform .2s ease; }
.login__btn[aria-expanded="true"] { border-color: var(--ink); }
.login__btn[aria-expanded="true"] .login__chev { transform: rotate(180deg); }
.login__menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 40;
  width: min(340px, calc(100vw - 2 * var(--gutter))); padding: 8px;
  border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--card); box-shadow: var(--shadow-2);
}
.login__panel { display: grid; gap: 8px; padding: 10px; }
.login__title {
  padding-bottom: 4px; font: 500 12px/1 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2);
}
.login__opt {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 14px; text-align: left;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: transparent;
  transition: border-color .15s ease, background-color .15s ease;
}
.login__opt:hover { border-color: var(--ink); background: var(--paper); }
.login__icon {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px;
  background: hsl(var(--h) var(--art-s) var(--art-l));
  color: hsl(var(--h) var(--art-fg-s) var(--art-fg-l));
}
.login__text { display: grid; gap: 2px; min-width: 0; }
.login__text strong { font: 700 17px/1.2 var(--font-display); letter-spacing: -.01em; }
.login__text span { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.login__note { font-size: 14px; color: var(--ink-2); }

/* Account menu: same shape as the log in menu, shown once a session is loaded */
.account__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #3FB27F; }
.account__dot.is-pending { background: #D9A32B; }
.account__dot.is-news { background: #5B7CFA; box-shadow: 0 0 0 3px rgba(91, 124, 250, .3); }
.count-badge { padding: 0 8px; border-radius: 999px; background: #5B7CFA; color: #fff; font-size: 12px; font-weight: 600; line-height: 20px; }
.count-badge[hidden] { display: none; }
.account__email { margin-bottom: 4px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.login__panel .note { margin: 4px 0; }

/* ---------- Intro strip: one line of context and the search box ---------- */
/* Kept short on purpose (owner): the products must start near the top of the screen */
.intro { padding-block: clamp(18px, 2.6vw, 30px); }
.intro__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 40px; }
.intro .eyebrow { margin-bottom: 8px; }
.intro__title {
  max-width: 20ch;
  font: 800 clamp(1.55rem, 1.1rem + 1.6vw, 2.35rem)/1.05 var(--font-display);
  letter-spacing: -.035em; text-wrap: balance;
}
.search { position: relative; display: flex; align-items: center; flex: 1 1 320px; max-width: 460px; }
/* Four short reasons to trust the shop: one thin line under the title and search (the long text is a hover title) */
.trust {
  display: flex; flex-wrap: wrap; gap: 8px 26px;
  margin-top: clamp(14px, 2vw, 20px); padding-top: clamp(12px, 1.6vw, 16px);
  border-top: 1px solid hsl(var(--h) 40% 45% / .16);
}
.trust li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.trust__icon {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--card); color: hsl(var(--h) var(--dot-s) var(--dot-l));
}
.trust__icon .i { width: 15px; height: 15px; }
.trust__text { font-size: 13.5px; font-weight: 600; line-height: 1.2; color: var(--ink); }
/* Phones: no trust line and no eyebrow ("How it works" under the products says the same) */
@media (max-width: 560px) {
  .trust, .intro .eyebrow { display: none; }
}
.search .i {
  position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
  color: var(--ink-3); pointer-events: none;
}
.search input {
  width: 100%; height: 52px; padding: 0 18px 0 44px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--card);
}
.search input::placeholder { color: var(--ink-3); opacity: 1; }

/* ---------- Products ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-bottom: 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-2);
  font-size: 14px; font-weight: 600;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.chip small { font: 500 11px/1 var(--font-mono); opacity: .75; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
@media (max-width: 640px) {
  .chips {
    flex: 1 1 100%; flex-wrap: nowrap; min-width: 0; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .chips::-webkit-scrollbar { display: none; }
  .chips > * { flex: none; }
  .chips.fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); }
  .chips.fade-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 44px), transparent); }
  .chips.fade-l.fade-r {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent);
  }
}

.select { position: relative; display: flex; align-items: center; }
.select select {
  height: 44px; padding: 0 40px 0 18px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card);
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
.select__chev { position: absolute; right: 14px; width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
/* Country picker in the shop header: a pill showing the currency code. It opens a panel with a search box,
   the two main currencies (LKR and USD) as big choices, then every country. */
.cur { position: relative; }
.cur__btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 14px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink);
  font: 600 14px/1 var(--font-mono); letter-spacing: .02em; white-space: nowrap; cursor: pointer;
  transition: border-color .15s ease;
}
.cur__btn:hover, .cur__btn[aria-expanded="true"] { border-color: var(--ink); }
.cur__chev { width: 16px; height: 16px; color: var(--ink-3); transition: transform .2s ease; }
.cur__btn[aria-expanded="true"] .cur__chev { transform: rotate(180deg); }
.cur__menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 40;
  display: flex; flex-direction: column; width: min(340px, calc(100vw - 2 * var(--gutter))); max-height: min(520px, calc(100vh - 100px));
  border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--card); box-shadow: var(--shadow-2); overflow: hidden;
}
.cur__menu[hidden] { display: none; }
.cur__search {
  display: flex; align-items: center; gap: 8px; margin: 10px 10px 4px; padding: 0 14px; height: 44px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink-3);
}
.cur__search:focus-within { border-color: var(--ink); }
.cur__search .i { width: 18px; height: 18px; flex: none; }
.cur__search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font-size: 15px; outline: none; }
.cur__search input::-webkit-search-cancel-button { cursor: pointer; }
.cur__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 6px; }
.cur__group { display: grid; padding: 8px 4px 4px; }
.cur__group + .cur__group { margin-top: 4px; border-top: 1px solid var(--line); }
.cur__title { padding: 6px 8px 8px; font: 500 11px/1 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.cur__mains { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 4px 6px; }
.cur__main {
  display: grid; gap: 4px; padding: 12px 14px; text-align: left; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: transparent; color: var(--ink); cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.cur__main strong { font: 700 20px/1 var(--font-display); letter-spacing: -.01em; }
.cur__main span { font-size: 12px; color: var(--ink-2); }
.cur__main:hover { border-color: var(--ink); }
.cur__main[aria-current="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); }
.cur__opt {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 10px; text-align: left;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink); font-size: 14px; cursor: pointer;
}
.cur__opt:hover, .cur__opt:focus-visible { background: var(--paper); outline: none; }
.cur__opt:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.cur__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cur__code { font: 500 12px/1 var(--font-mono); color: var(--ink-3); }
.cur__tick { width: 16px; height: 16px; flex: none; color: var(--brand); visibility: hidden; }
.cur__opt[aria-current="true"] { font-weight: 600; }
.cur__opt[aria-current="true"] .cur__tick { visibility: visible; }
.cur__empty { padding: 10px 10px 14px; font-size: 14px; color: var(--ink-2); }
.cur__note { padding: 10px 16px 12px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.4; color: var(--ink-3); }
/* Phones: the pill sits mid-header, so the panel is pinned to the screen edges instead of the pill */
@media (max-width: 640px) {
  .cur__menu { position: fixed; top: var(--cur-top, 76px); left: var(--gutter); right: var(--gutter); width: auto; max-height: calc(100dvh - var(--cur-top, 76px) - 16px); }
}

/* Product lists: never fewer than three tiles a row (more on wide screens). Each column is at most a third of the
   row minus the gaps (1px less so rounding never drops it to two). The list is a size container: the
   "Small product tiles" rules further down shrink the tiles as it narrows. */
.grid {
  --gap-x: 16px;
  display: grid; gap: 30px var(--gap-x); container: grid / inline-size;
  grid-template-columns: repeat(auto-fill, minmax(min(190px, calc((100% - 2 * var(--gap-x)) / 3 - 1px)), 1fr));
}
.product { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.product__art {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 18px;
  background: hsl(var(--h) var(--art-s) var(--art-l));
  color: hsl(var(--h) var(--art-fg-s) var(--art-fg-l));
}
.product__art .art { width: 36%; height: 36%; }
.product__art .badge { top: 10px; left: 10px; padding: 4px 8px; font-size: 10px; }
.product__art .badge--soldout { top: auto; bottom: 10px; left: 10px; right: auto; } /* the top right corner has the heart */
.badge {
  position: absolute; top: 12px; left: 12px; padding: 5px 9px; border-radius: 6px;
  background: var(--ink); color: var(--paper);
  font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
}
.product__info { display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; }
.product__cat { font: 500 10px/1 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
/* Long names stop after two lines so tiles in a row stay the same size */
.product__name {
  margin-top: 2px; font: 600 16px/1.25 var(--font-display); letter-spacing: -.015em; text-wrap: balance; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.product__seller { font-size: 13px; color: var(--ink-2); }
.product__seller a { text-decoration: underline; text-underline-offset: 3px; }
.product__seller a:hover { color: var(--ink); }
/* Bottom of a card: a hairline, the price (rupees big, approximate dollars small), then a full width Buy button.
   It sits at the bottom of the tile, so the prices and buttons of one row line up. */
.product__buy {
  display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line);
}
.product__info > :nth-last-child(2) { margin-bottom: 8px; }
.product__buy .price { font-size: 19px; }
.product__price { display: flex; flex-direction: column; gap: 6px; }
.price { font: 700 22px/1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price__cur { margin-right: 5px; font: 500 13px/1 var(--font-mono); letter-spacing: 0; color: var(--ink-2); }
.usd { font: 400 13px/1 var(--font-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }

.product__art { overflow: hidden; }
.product__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product__name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.badge--soldout { left: auto; right: 12px; background: hsl(0 60% 42%); color: #fff; }
.product.is-soldout .product__photo, .product.is-soldout .art { opacity: .45; }
.price__from { margin-right: 4px; font: 500 12px/1 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- Product page ---------- */
.pd { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.pd__main {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-l);
  background: hsl(var(--h) var(--art-s) var(--art-l)); color: hsl(var(--h) var(--art-fg-s) var(--art-fg-l));
}
.pd__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd__art { display: grid; place-items: center; width: 100%; height: 100%; }
.pd__art .art { width: 34%; height: 34%; }
.pd__thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pd__thumb { width: 72px; height: 72px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 10px; background: var(--paper); cursor: pointer; }
.pd__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd__thumb[aria-pressed="true"] { border-color: var(--ink); }
.pd__info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pd__title { font: 800 clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem)/1.08 var(--font-display); letter-spacing: -.03em; text-wrap: balance; overflow-wrap: anywhere; }
.pd__price { flex-direction: row; align-items: baseline; gap: 12px; margin-top: 4px; }
.pd__price .price { font-size: 32px; }
.pd__stock { font: 500 13px/1.3 var(--font-mono); color: hsl(30 70% 38%); }
.pd__buy { min-height: 52px; font-size: 16px; }
.pd__buy:disabled { opacity: .55; cursor: not-allowed; }
.pd__order { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.pd__order .btn { gap: 10px; }
.pd__order .social__icon { width: 22px; height: 22px; padding: 0; background: transparent; }
.pd__desc { display: grid; gap: 12px; color: var(--ink-2); line-height: 1.6; overflow-wrap: anywhere; }
.pd-options { display: grid; gap: 8px; margin: 4px 0; padding: 0; border: 0; min-width: 0; }
.pd-options legend { margin-bottom: 8px; padding: 0; font-size: 13px; font-weight: 600; }
.pd-option {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 12px;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer;
}
.pd-option:has(input:checked) { border-color: var(--ink); }
.pd-option.is-disabled { opacity: .55; cursor: not-allowed; }
.pd-option input { accent-color: var(--ink); width: 17px; height: 17px; margin: 0; grid-row: 1 / span 2; }
.pd-option__name { font-weight: 600; overflow-wrap: anywhere; }
.pd-option__name small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--ink-2); }
.pd-option__price { font: 700 15px/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-option__stock { grid-column: 2 / -1; font: 500 12px/1.2 var(--font-mono); color: var(--ink-3); }
.pd-option__stock:empty { display: none; }
@media (max-width: 760px) { .pd { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 761px) {
  .pd__gallery, .pd__info { position: sticky; top: 88px; }
}

/* 3. Phones: price and Buy button at the bottom of a product page once the main button scrolls away (app.js) */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); background: var(--card);
  box-shadow: 0 -14px 34px -20px rgb(15 12 30 / .4);
}
.buybar__row { display: flex; align-items: center; gap: 12px; }
.buybar__text { display: grid; gap: 4px; flex: 1 1 auto; min-width: 0; }
.buybar__name { overflow: hidden; font-size: 13px; color: var(--ink-2); white-space: nowrap; text-overflow: ellipsis; }
.buybar__price { display: flex; align-items: baseline; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; }
.buybar__price .price { font-size: 20px; }
.buybar__price .usd { overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.buybar__btn { flex: none; min-height: 46px; padding: 0 22px; border-radius: 999px; }
body.has-buybar { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
@keyframes buybar-in { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: no-preference) {
  .buybar:not([hidden]) { animation: buybar-in .22s ease-out; }
}

/* ---------- Plan card (logo, badge, key figures, detail lines) ---------- */
.product__logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 18%; background: #fff; }
.pc {
  --pc-soft: color-mix(in srgb, var(--ink) 6%, var(--card));
  display: flex; flex-direction: column; gap: 14px; width: min(460px, 100%); margin-inline: auto; padding: 22px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow-2);
}
.pc__head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pc__head > div { min-width: 0; }
.pc__logo { flex: none; width: 60px; height: 60px; padding: 6px; border-radius: 14px; background: #fff; object-fit: contain; }
.pc__logo--art { display: grid; place-items: center; padding: 0; background: hsl(var(--h) var(--art-s) var(--art-l)); color: hsl(var(--h) var(--art-fg-s) var(--art-fg-l)); }
.pc__logo--art .art { width: 56%; height: 56%; }
.pc__title { font: 700 1.1rem/1.25 var(--font-display); letter-spacing: -.01em; text-wrap: balance; overflow-wrap: anywhere; }
.pc__title a { text-decoration: none; color: inherit; }
.pc__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
#pd-title.pc__title { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); }
.pc__badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 11px; border-radius: 999px; background: hsl(0 60% 94%); color: hsl(0 55% 38%); font-size: 12px; font-weight: 600; }
.pc__badge .i { width: 13px; height: 13px; }
.pc__stats { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 84px; padding: 12px 4px; border-radius: 14px; background: var(--pc-soft); }
.pc__stat { display: flex; flex: 1 1 0; min-width: 78px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 4px 10px; text-align: center; }
.pc__stat + .pc__stat { border-left: 1px solid var(--line); }
.pc__stat strong { font: 800 1.5rem/1.05 var(--font-display); letter-spacing: -.02em; color: var(--brand); overflow-wrap: anywhere; }
.pc__stat strong.is-long { font-size: 1.05rem; line-height: 1.15; }
.pc__stat span { font: 600 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.pc__stat--price .product__price { align-items: center; text-align: center; }
.pc__stat--price .pd__price { flex-direction: column; align-items: center; gap: 5px; margin: 0; }
.pc__stat--price .price { font-size: 1.25rem; color: var(--brand); }
.pc__stat--price .price__from { color: var(--ink-3); }
.pc__stat--price .usd { font-size: 12px; }
.pc__info { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pc__info li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 11px; background: var(--pc-soft); color: var(--ink-2); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.pc__info .i { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.pc__buy { min-height: 52px; border-radius: 14px; }
.pc.is-soldout .pc__logo, .pc.is-soldout .pc__stats { opacity: .55; }
/* The same card inside the shop's product list, sized like the other tiles: the price moves down next to Buy
   and only the first two detail lines show (the product page has them all). */
.pc--tile { width: 100%; height: 100%; margin: 0; gap: 12px; padding: 14px; border-radius: 18px; box-shadow: none; min-width: 0; }
.pc--tile .pc__head { align-items: flex-start; gap: 12px; }
.pc__logo-link { display: block; flex: none; }
.pc--tile .pc__logo { width: 46px; height: 46px; padding: 5px; border-radius: 12px; }
.pc--tile .pc__title {
  font-size: 15px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.pc--tile .pc__badge { margin-top: 5px; padding: 3px 9px; font-size: 11px; }
.pc--tile .pc__stats { min-height: 0; padding: 8px 2px; border-radius: 12px; }
.pc--tile .pc__stat { min-width: 0; gap: 4px; padding: 2px 6px; }
.pc--tile .pc__stat strong { font-size: 1.1rem; }
.pc--tile .pc__stat strong.is-long { font-size: .85rem; }
.pc--tile .pc__stat span { font-size: 9.5px; letter-spacing: .06em; }
.pc--tile .pc__info li { gap: 7px; padding: 7px 9px; border-radius: 10px; font-size: 12.5px; }
.pc--tile .pc__info li:nth-child(n+3) { display: none; }
.pc--tile .pc__info .i { width: 15px; height: 15px; }
.pc--tile .product__seller { font-size: 13px; }
.pc__foot {
  display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line);
}
.pc__foot .price { font-size: 19px; }
.pc--tile .pc__buy { min-height: 40px; border-radius: 12px; }
/* "4.5 (12 reviews)" moves under the stars as a whole instead of breaking in the middle */
.grid .rating { flex-wrap: wrap; row-gap: 2px; }
.grid .rating > span:not(.stars) { white-space: nowrap; }

/* ---------- Tile tilt ---------- */
/* app.js sets --tilt-x/--tilt-y while a mouse is over a tile (mouse only, not with reduced motion). It eases back
   slowly when the pointer leaves. */
.grid > .product, .grid > .pc--tile, .seller-chip { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.is-tilting {
  transform: perspective(700px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-3px);
  transition-duration: .15s;
}

/* ---------- Loading skeleton ---------- */
/* Grey shapes in place of tiles and chips while the catalogue loads. A soft light sweeps across them. */
.sk {
  display: block; position: relative; overflow: hidden;
  border-radius: 8px; background: var(--line);
}
.sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, hsl(0 0% 100% / .45), transparent);
  transform: translateX(-100%);
}
:root[data-theme="dark"] .sk::after { background: linear-gradient(90deg, transparent, hsl(0 0% 100% / .06), transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sk::after { background: linear-gradient(90deg, transparent, hsl(0 0% 100% / .06), transparent); }
}
@media (prefers-reduced-motion: no-preference) {
  .sk::after { animation: sk-sweep 1.4s ease-in-out infinite; }
}
@keyframes sk-sweep { to { transform: translateX(100%); } }
.sk--art { aspect-ratio: 4 / 3; border-radius: 18px; }
.sk--line { height: 10px; border-radius: 999px; }
.sk--title { height: 16px; width: 85%; margin-block: 4px 2px; border-radius: 999px; }
.sk--price { height: 19px; width: 50%; border-radius: 999px; }
.sk--btn { height: 40px; border-radius: 12px; }
.sk--chip { display: inline-block; height: 40px; border-radius: 999px; }
.sk--logo { flex: none; width: 72px; height: 72px; border-radius: 50%; }
.sk-tile .product__info { gap: 8px; }
.sk-store { display: flex; align-items: center; gap: 20px; margin-bottom: 36px; }
.sk-store__text { display: grid; gap: 10px; }
/* Product page while it loads */
.sk--back { width: 110px; height: 14px; margin-bottom: 24px; }
.sk--pd { border-radius: var(--radius-l); }
.sk-pd { gap: 14px; }
.sk--h1 { height: 30px; width: 80%; border-radius: 999px; }
.sk--pd-price { height: 26px; width: 35%; }
.sk--row { height: 52px; border-radius: 14px; }
.sk--pd-btn { height: 52px; border-radius: 999px; }
@container grid (max-width: 600px) {
  .sk--art { border-radius: 14px; }
  .sk--title { height: 14px; }
  .sk--price { height: 16px; }
  .sk--btn { height: 34px; border-radius: 10px; }
}

/* ---------- Small product tiles ---------- */
/* Tiles of about 140 to 190px (a narrow window, a tablet): the extras go, the name, price and button stay. */
@container grid (max-width: 600px) {
  .product { gap: 9px; }
  .product__art { border-radius: 14px; }
  .product__art .art { width: 40%; height: 40%; }
  .product__art .badge { top: 7px; left: 7px; padding: 3px 6px; font-size: 9px; }
  .product__art .badge--soldout { top: auto; bottom: 7px; left: 7px; }
  .product__cat { font-size: 9px; }
  .product__name { font-size: 14px; }
  .product__seller { overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
  .grid .rating { gap: 4px; font-size: 11px; }
  .grid .stars .i { width: 12px; height: 12px; }
  .product__buy, .pc__foot { gap: 7px; padding-top: 8px; }
  .product__buy .price, .pc__foot .price { font-size: 16px; line-height: 1.1; }
  .product__buy .price__cur, .pc__foot .price__cur { margin-right: 3px; font-size: 11px; }
  .product__buy .price__from, .pc__foot .price__from { font-size: 9.5px; }
  .product__buy .usd, .pc__foot .usd { font-size: 10.5px; line-height: 1.2; }
  .product__buy .product__price, .pc__foot .product__price { gap: 4px; }
  .product__buy .btn, .pc--tile .pc__buy { min-height: 34px; padding: 0 8px; border-radius: 10px; font-size: 13px; }

  .pc--tile { gap: 9px; padding: 11px; border-radius: 16px; }
  .pc--tile .pc__head { gap: 9px; }
  .pc--tile .pc__logo { width: 38px; height: 38px; padding: 4px; border-radius: 10px; }
  .pc--tile .pc__title { font-size: 14px; }
  .pc--tile .pc__badge { gap: 4px; margin-top: 4px; padding: 2px 7px; font-size: 10px; }
  .pc--tile .pc__badge .i { width: 11px; height: 11px; }
  .pc--tile .pc__stats { padding: 6px 0; border-radius: 10px; }
  .pc--tile .pc__stat { padding: 0 4px; }
  .pc--tile .pc__stat strong { font-size: .95rem; }
  .pc--tile .pc__stat strong.is-long { font-size: .75rem; }
  .pc--tile .pc__stat span { font-size: 8.5px; letter-spacing: .04em; }
  .pc--tile .pc__info { display: none; }
}
/* Phones: tiles of about 100 to 140px, three a row */
@container grid (max-width: 440px) {
  .product { gap: 7px; }
  .product__art { border-radius: 12px; }
  .product__art .art { width: 44%; height: 44%; }
  .product__art .badge { top: 5px; left: 5px; padding: 3px 4px; font-size: 8px; letter-spacing: .04em; }
  .product__art .badge--soldout { top: auto; bottom: 5px; left: 5px; }
  .product.is-soldout .product__art .badge:not(.badge--soldout) { display: none; }
  .product__cat { display: none; }
  .product__name, .pc--tile .pc__title { margin-top: 0; font-size: 12.5px; line-height: 1.2; }
  .product__seller { font-size: 11px; }
  .rating > span:not(.stars) { display: none; }
  .grid .stars .i { width: 10px; height: 10px; }
  .product__info > :nth-last-child(2), .product__info > :nth-last-child(3):has(+ .product__seller) { margin-bottom: 6px; }
  /* Shorter tiles (owner: they looked stretched): no store name here (it only fit as "by Nadula v...",
     the product page shows it) and the plan badge stays on one line */
  .grid .product__seller { display: none; }
  .product__buy, .pc__foot { gap: 6px; padding-top: 7px; }
  .product__buy .price, .pc__foot .price { font-size: 14px; line-height: 1.15; }
  .product__buy .price__cur, .pc__foot .price__cur { font-size: 10px; }
  .product__buy .usd, .pc__foot .usd { font-size: 9.5px; }
  .product__buy .btn, .pc--tile .pc__buy { min-height: 30px; padding: 0 6px; border-radius: 9px; font-size: 12px; }

  .pc--tile { gap: 6px; padding: 8px; border-radius: 14px; }
  .pc--tile .pc__head { flex-direction: column; gap: 6px; }
  .pc--tile .pc__head > div { width: 100%; }
  /* block, so no empty line-height space under the logo and the stars */
  .pc--tile .pc__logo { display: block; width: 34px; height: 34px; border-radius: 9px; }
  .pc--tile .rating--link { display: flex; }
  .pc--tile .pc__badge {
    display: block; width: fit-content; max-width: 100%; overflow: hidden;
    padding: 2px 6px; font-size: 9px; white-space: nowrap; text-overflow: ellipsis;
  }
  .pc--tile .pc__badge .i { display: none; }
  /* Key figures turn into short lines ("30 DAYS") instead of side by side columns */
  .pc--tile .pc__stats { flex-direction: column; padding: 2px 7px; }
  /* A long value ("Unlimited") pushes its label under it instead of breaking in the middle of the word */
  .pc--tile .pc__stat { flex: none; flex-flow: row wrap; align-items: baseline; justify-content: flex-start; gap: 1px 4px; padding: 4px 0; text-align: left; }
  .pc--tile .pc__stat + .pc__stat { border-left: 0; border-top: 1px solid var(--line); }
  .pc--tile .pc__stat strong, .pc--tile .pc__stat strong.is-long { font-size: .8rem; }
  .pc--tile .pc__stat span { font-size: 8px; }
}

/* ---------- Social icons on a store page, contact buttons on a product page ---------- */
.social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.social__btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1.5px solid var(--line); border-radius: 50%; background: #fff; color: #222; }
.social__btn:hover, .social__btn:focus-visible { border-color: var(--ink); transform: translateY(-1px); }
.social__btn .i { width: 20px; height: 20px; }
.social__icon { width: 22px; height: 22px; display: block; }
.contact { display: grid; gap: 10px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.contact__title { font-size: 14px; font-weight: 600; }
.contact__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.contact__buttons .btn { gap: 10px; }
.contact__buttons .social__icon { width: 20px; height: 20px; padding: 0; background: transparent; }
/* Dark mode (and the always dark "midnight" store header): see-through buttons instead of white circles */
:root[data-theme="dark"] .social__btn, .store-head--midnight .social__btn { background: hsl(0 0% 100% / .07); color: var(--ink); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .social__btn { background: hsl(0 0% 100% / .07); color: var(--ink); }
}

/* ---------- Saved products: the heart on tiles, on the product page and in the header ---------- */
.product, .pc--tile { position: relative; }
.save-btn {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 1px solid hsl(0 0% 100% / .7); border-radius: 50%;
  background: hsl(0 0% 100% / .8); color: #333;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px hsl(0 0% 0% / .12);
  cursor: pointer; transition: transform .15s ease, color .15s ease;
}
.save-btn .i { width: 18px; height: 18px; stroke-width: 2.1; }
.save-btn:hover { transform: scale(1.08); }
.save-btn[aria-pressed="true"], .save-pd[aria-pressed="true"] { color: hsl(350 78% 52%); }
.save-btn[aria-pressed="true"] .i, .save-pd[aria-pressed="true"] .i { fill: currentColor; }
.save-btn.is-pop .i { animation: save-pop .35s ease; }
@keyframes save-pop { 45% { transform: scale(1.35); } }
:root[data-theme="dark"] .save-btn { border-color: hsl(0 0% 100% / .14); background: hsl(225 14% 14% / .72); color: #eee; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .save-btn { border-color: hsl(0 0% 100% / .14); background: hsl(225 14% 14% / .72); color: #eee; }
}
:root[data-theme="dark"] .save-btn[aria-pressed="true"] { color: hsl(350 85% 64%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .save-btn[aria-pressed="true"] { color: hsl(350 85% 64%); }
}
/* Plan tiles: the heart sits in the top right corner, so the name keeps clear of it */
.pc--tile .pc__head { padding-right: 30px; }
@container grid (max-width: 600px) {
  .pc--tile .pc__head { padding-right: 0; }
  .save-btn { top: 6px; right: 6px; width: 30px; height: 30px; }
  .save-btn .i { width: 16px; height: 16px; }
}
@container grid (max-width: 440px) {
  .save-btn { top: 4px; right: 4px; width: 26px; height: 26px; }
  .save-btn .i { width: 14px; height: 14px; }
}
.save-pd { gap: 8px; }
.save-pd .i { width: 18px; height: 18px; }
.save-pd[aria-pressed="true"] { border-color: currentColor; }
.saved-link__count {
  position: absolute; top: -5px; right: -6px; min-width: 20px; padding: 0 5px;
  font-size: 11px; line-height: 18px; text-align: center;
}
.saved-note { margin: -8px 0 20px; }
.saved-gone { margin-top: 24px; }

/* ---------- Verified badge ---------- */
.vbadge { display: inline-grid; place-items: center; width: 1.05em; height: 1.05em; margin-left: .3em; vertical-align: -.14em; color: hsl(207 85% 55%); }
.vbadge svg { width: 100%; height: 100%; }
.vbadge--lg { width: .62em; height: .62em; margin-left: .22em; vertical-align: .04em; }
.seller-chip__name .vbadge { width: 15px; height: 15px; margin-left: 5px; vertical-align: -3px; }

/* ---------- Online / Away ---------- */
.presence-wrap { display: grid; gap: 6px; justify-items: start; margin-top: 10px; }
.presence { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.presence i, .presence-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; }
.presence--on { background: hsl(150 55% 90%); color: hsl(150 45% 24%); }
.presence--on i { background: hsl(150 65% 40%); box-shadow: 0 0 0 3px hsl(150 65% 40% / .25); }
.presence--off { background: hsl(40 12% 90%); color: hsl(40 8% 32%); }
.presence--off i { background: hsl(40 6% 55%); }
:root[data-theme="dark"] .presence--on { background: hsl(150 30% 18%); color: hsl(150 55% 74%); }
:root[data-theme="dark"] .presence--off { background: hsl(220 8% 20%); color: hsl(220 8% 74%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .presence--on { background: hsl(150 30% 18%); color: hsl(150 55% 74%); }
  :root:not([data-theme="light"]) .presence--off { background: hsl(220 8% 20%); color: hsl(220 8% 74%); }
}
.presence-dot { width: 8px; height: 8px; margin-right: 6px; background: hsl(150 65% 45%); vertical-align: middle; }
.hours { font-size: 13px; color: var(--ink-2); }
.hours summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.hours ul { display: grid; gap: 4px; margin: 8px 0 4px; padding: 0; list-style: none; min-width: 230px; }
.hours li { display: flex; justify-content: space-between; gap: 18px; }
.hours p { margin: 0; font-size: 12px; color: var(--ink-3); }

/* ---------- Sellers of the chosen category ---------- */
.sellers-strip { margin-bottom: 28px; }
.sellers-strip__title { margin-bottom: 12px; font: 500 12px/1 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.sellers-strip__list { display: flex; flex-wrap: wrap; gap: 10px; }
.seller-chip {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px 18px 8px 8px; border: 1.5px solid var(--line);
  border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none;
}
.seller-chip:hover, .seller-chip:focus-visible { border-color: var(--ink); }
.seller-chip__logo { display: grid; place-items: center; flex: none; width: 40px; height: 40px; overflow: hidden; border-radius: 50%; background: hsl(var(--h) var(--art-s) var(--art-l)); color: hsl(var(--h) var(--art-fg-s) var(--art-fg-l)); font: 700 14px/1 var(--font-display); }
.seller-chip__logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.seller-chip__text { display: grid; min-width: 0; }
.seller-chip__name { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.seller-chip__count { font-size: 12px; color: var(--ink-2); }
.empty { display: grid; justify-items: start; gap: 12px; padding: 48px 0; color: var(--ink-2); }
.empty__title { font: 700 24px/1.1 var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.empty:has(> .empty__icon) { justify-items: center; padding: 56px 16px; text-align: center; }
.empty:has(> .empty__icon) > p:not(.empty__title) { max-width: 46ch; }
.empty__icon {
  display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 4px; border-radius: 50%;
  background: hsl(var(--h) var(--art-s) var(--art-l)); color: hsl(var(--h) var(--art-fg-s) var(--art-fg-l));
}
.empty__icon .i { width: 32px; height: 32px; }
.rate { max-width: 70ch; padding-bottom: 64px; font: 400 13px/1.6 var(--font-mono); color: var(--ink-3); }

/* ---------- Seller store page ---------- */
/* The seller picks the style (sellers.theme) and colour (--h) in the dashboard, Your store, Store look */
.store-head { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(16px, 2.5vw, 28px); background: hsl(var(--h) var(--tone-s) var(--tone-l)); }
.store-head::before, .store-head::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.store-head::before { width: 46%; aspect-ratio: 1; left: -8%; top: -60%; background: hsl(var(--h) 85% 62% / var(--blob-a, .45)); }
.store-head::after { width: 40%; aspect-ratio: 1; right: -6%; bottom: -70%; background: hsl(calc(var(--h) + 50) 85% 64% / var(--blob-a, .4)); }
.store-head--glass { --blob-a: .5; }
.store-head--aurora { background: linear-gradient(120deg, hsl(var(--h) 80% 86%), hsl(calc(var(--h) + 60) 80% 86%) 55%, hsl(calc(var(--h) + 120) 75% 88%)); --blob-a: .55; }
.store-head--plain::before, .store-head--plain::after { display: none; }
/* Midnight: always dark, whatever the site theme */
.store-head--midnight {
  color-scheme: dark;
  --paper: #0A0912; --card: #14121F; --ink: #F1EEFC; --ink-2: #B6AFCB; --ink-3: #948DA8; --line: #29253C; --ink-line: rgb(241 238 252 / .3);
  --art-s: 34%; --art-l: 21%; --art-fg-s: 78%; --art-fg-l: 78%; --blob-a: .55;
  background: hsl(var(--h) 45% 8%); color: var(--ink);
}
.store-panel { padding: clamp(14px, 2vw, 20px); border-radius: calc(var(--radius) + 8px); }
.store-head--glass .store-panel, .store-head--aurora .store-panel, .store-head--midnight .store-panel {
  border: 1px solid hsl(0 0% 100% / .55);
  background: linear-gradient(135deg, hsl(0 0% 100% / .62), hsl(0 0% 100% / .32));
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 18px 40px -24px hsl(var(--h) 60% 30% / .45);
}
.store-head--midnight .store-panel { border-color: hsl(0 0% 100% / .12); background: linear-gradient(135deg, hsl(0 0% 100% / .1), hsl(0 0% 100% / .03)); box-shadow: 0 18px 40px -24px rgb(0 0 0 / .8); }
.store-head--plain .store-panel { padding: 0; }
:root[data-theme="dark"] .store-head--glass .store-panel, :root[data-theme="dark"] .store-head--aurora .store-panel { border-color: hsl(0 0% 100% / .12); background: linear-gradient(135deg, hsl(0 0% 100% / .1), hsl(0 0% 100% / .03)); }
:root[data-theme="dark"] .store-head--glass, :root[data-theme="dark"] .store-head--aurora { --blob-a: .3; }
:root[data-theme="dark"] .store-head--aurora { background: linear-gradient(120deg, hsl(var(--h) 45% 16%), hsl(calc(var(--h) + 60) 45% 15%) 55%, hsl(calc(var(--h) + 120) 40% 14%)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .store-head--glass .store-panel, :root:not([data-theme="light"]) .store-head--aurora .store-panel { border-color: hsl(0 0% 100% / .12); background: linear-gradient(135deg, hsl(0 0% 100% / .1), hsl(0 0% 100% / .03)); }
  :root:not([data-theme="light"]) .store-head--glass, :root:not([data-theme="light"]) .store-head--aurora { --blob-a: .3; }
  :root:not([data-theme="light"]) .store-head--aurora { background: linear-gradient(120deg, hsl(var(--h) 45% 16%), hsl(calc(var(--h) + 60) 45% 15%) 55%, hsl(calc(var(--h) + 120) 40% 14%)); }
}
.store-head .back { margin-bottom: 12px; }
.store-head__text { flex: 1 1 260px; min-width: 0; }
.store-head__line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.store-head__line:empty { display: none; }
.store-head__line .presence-wrap, .store-head__line .social { margin-top: 0; }
.store-head__line .social__btn { width: 34px; height: 34px; }
.store-head__line .social__btn .i, .store-head__line .social__icon { width: 18px; height: 18px; }
.store-head .own-store { margin-top: 16px; padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.store-head--glass .own-store, .store-head--aurora .own-store { border-top-color: hsl(var(--h) 30% 50% / .2); }
.back {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px;
  font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none;
}
.back:hover { color: var(--ink); }
.back .i { width: 18px; height: 18px; }
.store-head__row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.store-avatar {
  display: grid; place-items: center; flex: none; width: 76px; height: 76px; border-radius: 22px;
  background: hsl(var(--h) var(--art-s) var(--art-l));
  color: hsl(var(--h) var(--art-fg-s) var(--art-fg-l));
  font: 800 32px/1 var(--font-display); letter-spacing: -.03em;
}
.store-avatar--img { overflow: hidden; background: #fff; }
.store-avatar--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-title { font: 800 clamp(1.6rem, 1.1rem + 2vw, 2.4rem)/1.05 var(--font-display); letter-spacing: -.035em; text-wrap: balance; }
.store-about { max-width: 60ch; margin-top: 6px; color: var(--ink-2); }
.store-meta { margin-top: 10px; font: 500 12px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
/* Only the store's own seller sees this bar */
.own-store { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 24px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.own-store__fee { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.own-store__fee--due { color: var(--danger); }
.own-store__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Buy dialog ---------- */
html:has(dialog[open]) { overflow: hidden; }
dialog { padding: 0; border: 0; background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgb(8 12 16 / .55); }
.modal {
  width: min(760px, calc(100% - 32px)); max-width: none; margin: auto; overflow: hidden;
  border-radius: 24px; box-shadow: var(--shadow-2);
}
.modal .dlg { position: relative; max-height: min(90vh, 800px); max-height: min(90dvh, 800px); overflow: auto; }
.dlg__x { position: absolute; top: 14px; right: 14px; z-index: 2; }

/* Photo viewer: a product photo opens full screen; a tap zooms in where it was tapped, moving the pointer pans */
.pd__main img { cursor: zoom-in; }
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0;
  background: rgb(8 7 16 / .94); color: #fff; overflow: hidden;
}
.lightbox::backdrop { background: rgb(8 7 16 / .6); }
/* Glass: the shop shows through, blurred, behind the photo; buttons and the counter are frosted pills.
   Browsers without backdrop-filter keep the solid colours above. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lightbox {
    background: rgb(8 7 16 / .62);
    -webkit-backdrop-filter: blur(28px) saturate(150%); backdrop-filter: blur(28px) saturate(150%);
  }
  .lightbox::backdrop { background: transparent; }
  .lightbox .lightbox__btn, .lightbox .lightbox__bar {
    border: 1px solid rgb(255 255 255 / .22);
    background: linear-gradient(160deg, rgb(255 255 255 / .2), rgb(255 255 255 / .06));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .28), 0 8px 24px rgb(0 0 0 / .25);
    -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
  }
  .lightbox .lightbox__btn:hover { border-color: rgb(255 255 255 / .55); background: rgb(255 255 255 / .24); }
  .lightbox .lightbox__bar {
    left: 50%; right: auto; translate: -50% 0; width: max-content; max-width: calc(100% - 32px);
    padding: 9px 16px; border-radius: 999px; color: rgb(255 255 255 / .85);
  }
}
#lb-count:empty { display: none; }
.lightbox__stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 64px 16px 56px; overflow: hidden; }
.lightbox__stage img {
  max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; cursor: zoom-in; user-select: none;
  transition: transform .25s ease; -webkit-user-drag: none;
}
.lightbox.is-zoomed .lightbox__stage { touch-action: none; }
.lightbox.is-zoomed .lightbox__stage img { transform: scale(2.5); cursor: zoom-out; border-radius: 0; transition: transform .25s ease, transform-origin .05s linear; }
.lightbox__btn {
  position: absolute; z-index: 2; border-color: rgb(255 255 255 / .22); background: rgb(20 18 36 / .7); color: #fff;
}
.lightbox__btn:hover { border-color: #fff; }
.lightbox__x { top: 14px; right: 14px; }
.lightbox__prev, .lightbox__next { top: 50%; translate: 0 -50%; }
.lightbox__prev { left: 14px; }
.lightbox__next { right: 14px; }
.lightbox__next .i { transform: scaleX(-1); }
.lightbox__btn[hidden] { display: none; }
.lightbox__bar {
  position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 14px;
  font: 500 12px/1 var(--font-mono); letter-spacing: .06em; color: rgb(255 255 255 / .7); pointer-events: none;
}
.lightbox.is-zoomed .lightbox__prev, .lightbox.is-zoomed .lightbox__next { display: none; }
.buy { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.buy__art {
  display: grid; place-items: center; min-height: 300px;
  background: hsl(var(--h) var(--art-s) var(--art-l));
  color: hsl(var(--h) var(--art-fg-s) var(--art-fg-l));
}
.buy__art .art { width: 46%; height: 46%; }
.buy__info { display: flex; flex-direction: column; gap: 12px; padding: 40px 32px 32px; }
.buy__desc { color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.buy__title {font: 800 clamp(1.5rem, 1.2rem + 1.2vw, 2rem)/1.08 var(--font-display); letter-spacing: -.03em; text-wrap: balance; }
.buy__price { flex-direction: row; align-items: baseline; gap: 12px; margin-top: 4px; }
.buy__price .price { font-size: 30px; }
.buy__list { display: grid; gap: 8px; margin: 6px 0 10px; }
.buy__list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; }
.buy__list .i { width: 18px; height: 18px; margin-top: 3px; color: var(--brand); }

/* ---------- Checkout step inside the buy dialog ---------- */
.pay { display: flex; flex-direction: column; gap: 16px; padding: 40px clamp(24px, 5vw, 44px) 34px; }
.pay__paypal { min-height: 120px; }
.pay__bank { display: grid; gap: 10px; margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.pay__bank div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.pay__bank dt { font-size: 13px; color: var(--ink-2); }
.pay__bank dd { margin: 0; font: 500 14px/1.3 var(--font-mono); overflow-wrap: anywhere; user-select: all; }

/* ---------- My orders ---------- */
.orders { display: grid; gap: 14px; max-width: 760px; }
.order { display: grid; gap: 10px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--card); }
.order__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.order__name { font: 700 18px/1.25 var(--font-display); letter-spacing: -.01em; }
.order__meta { font-size: 14px; color: var(--ink-2); }
.order__label { margin-bottom: 6px; font: 500 12px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.order__delivery pre { margin: 0; padding: 14px 16px; border-radius: var(--radius); background: var(--paper); font: 400 14px/1.5 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.order__copy { margin-top: 10px; }
.order__download { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.order__delivery pre ~ .order__download { margin-top: 10px; }
.order__file { font-size: 14px; color: var(--ink-3); overflow-wrap: anywhere; }
.order__status {
  display: inline-flex; padding: 3px 10px; border-radius: 999px;
  font: 500 11px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase;
}
.order__status--paid { background: hsl(150 55% 90%); color: hsl(150 45% 26%); }
.order__status--awaiting_review { background: hsl(38 90% 92%); color: hsl(30 70% 32%); }
.order__status--rejected { background: hsl(0 70% 93%); color: hsl(0 55% 38%); }
:root[data-theme="dark"] .order__status--paid { background: hsl(150 30% 18%); color: hsl(150 55% 72%); }
:root[data-theme="dark"] .order__status--awaiting_review { background: hsl(38 45% 20%); color: hsl(40 85% 76%); }
:root[data-theme="dark"] .order__status--rejected { background: hsl(0 35% 20%); color: hsl(0 75% 78%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .order__status--paid { background: hsl(150 30% 18%); color: hsl(150 55% 72%); }
  :root:not([data-theme="light"]) .order__status--awaiting_review { background: hsl(38 45% 20%); color: hsl(40 85% 76%); }
  :root:not([data-theme="light"]) .order__status--rejected { background: hsl(0 35% 20%); color: hsl(0 75% 78%); }
}

/* ---------- Log in and sign up: roomy and welcoming, not a cramped little popup ---------- */
.modal--auth { width: min(560px, calc(100% - 32px)); }
.modal--auth .dlg { max-height: min(96vh, 1000px); max-height: min(96dvh, 1000px); }
.auth { position: relative; display: grid; gap: 22px; padding: 40px clamp(28px, 5vw, 48px) 34px; }
.auth__head { display: flex; align-items: flex-start; gap: 16px; padding-right: 44px; }
.auth__head .eyebrow { margin-bottom: 6px; }
.auth__icon {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px; margin-top: 2px; border-radius: 13px;
  background: hsl(var(--h) var(--art-s) var(--art-l));
  color: hsl(var(--h) var(--art-fg-s) var(--art-fg-l));
}
.auth__title { font: 800 clamp(1.7rem, 1.4rem + 1vw, 2.1rem)/1.12 var(--font-display); letter-spacing: -.03em; text-wrap: balance; }
.auth__sub { margin-top: 8px; color: var(--ink-2); font-size: 15px; line-height: 1.5; text-wrap: pretty; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); }
.tab { min-height: 42px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.tab[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.auth__form { display: grid; gap: 18px; }
.auth__form .btn--block { min-height: 52px; font-size: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--card); font-family: inherit; font-size: 15px;
}
.field select { cursor: pointer; }
.field textarea { min-height: 0; resize: vertical; line-height: 1.5; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field__hint { font-size: 13px; color: var(--ink-2); }
.field__error { font-size: 13px; font-weight: 600; color: var(--danger); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
@media (max-width: 640px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
.addr { display: flex; align-items: stretch; }
.addr__prefix {
  display: flex; align-items: center; padding: 0 12px; border: 1.5px solid var(--line); border-right: 0;
  border-radius: 12px 0 0 12px; background: var(--paper); font: 400 14px/1 var(--font-mono); color: var(--ink-2);
}
.addr input { border-radius: 0 12px 12px 0; }
.pw { position: relative; }
.pw input { padding-right: 76px; }
.pw__toggle {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%); padding: 8px 10px;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 600;
}
.pw__toggle:hover { color: var(--ink); }
.auth__hint { font-size: 14px; color: var(--ink-2); }
/* Cloudflare Turnstile "Verify you are human" box (js/captcha.js) */
.captcha { min-height: 65px; }
button.is-locked { opacity: .55; cursor: not-allowed; }
.auth__or { display: flex; align-items: center; gap: 12px; margin: -4px 0; font-size: 13px; color: var(--ink-2); }
.auth__or::before, .auth__or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth__row { display: flex; justify-content: flex-end; margin-top: -6px; }
.auth__switch { padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.auth__done { display: grid; justify-items: start; gap: 14px; }
.auth__done h3 { font: 800 1.4rem/1.1 var(--font-display); letter-spacing: -.02em; }
.auth__badge { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); }

/* Dialog motion: open = fade + small rise (keyframes, works everywhere); close = fade out.
   The close fade needs `overlay` to keep the closing dialog in the top layer, so it only
   runs where that is supported (Chromium); other browsers close at once as before. */
dialog:not([open]), dialog:not([open])::backdrop { pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .modal[open] { animation: modal-in .2s cubic-bezier(.2, .8, .2, 1); }
  .lightbox[open], dialog[open]::backdrop { animation: fade-in .2s ease; }
  @supports (overlay: auto) {
    dialog, dialog::backdrop {
      transition: opacity .18s ease, transform .18s ease, overlay .18s allow-discrete, display .18s allow-discrete;
    }
    dialog:not([open]), dialog:not([open])::backdrop { opacity: 0; }
    .modal:not([open]) { transform: translateY(8px) scale(.98); }
  }
}
@keyframes modal-in { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Footer ---------- */
.footer { margin-top: auto; padding-block: 48px 28px; background: var(--footer-bg); color: var(--footer-ink); }
.footer .brand { color: var(--footer-ink); }
.footer__top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px; }
.footer__blurb { max-width: 34ch; margin-top: 16px; color: var(--footer-ink-2); }
.footer__up { color: var(--footer-ink); font-size: 15px; text-underline-offset: 3px; }
.footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--footer-line); color: var(--footer-ink-2); font-size: 13px;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer__links a { color: var(--footer-ink-2); text-underline-offset: 3px; }
.footer__links a:hover { color: var(--footer-ink); }
.footer__about { max-width: 36ch; }
.footer__mail { display: inline-block; margin-top: 12px; color: var(--footer-ink); font-size: 14px; text-underline-offset: 3px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, minmax(120px, auto)); gap: 24px clamp(32px, 6vw, 80px); }
.footer__head { margin-bottom: 14px; font: 500 12px/1.2 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--footer-ink-2); }
.footer__col ul { display: grid; gap: 10px; }
.footer__col a { color: var(--footer-ink); font-size: 15px; text-decoration: none; }
.footer__col a:hover, .footer a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }
.footer__links a[aria-current="page"] { color: var(--footer-ink); }
.footer__links .footer__up { font-size: inherit; color: var(--footer-ink); }
@media (max-width: 640px) {
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
}

/* 6. Shop home: how buying works in three steps, then a banner for sellers */
.how { --h: 234; border-top: 1px solid var(--line); }
.how__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px clamp(24px, 4vw, 48px); margin: 28px 0 0; padding: 0; list-style: none; }
.how__step { display: grid; align-content: start; gap: 8px; min-width: 0; }
.how__num {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 6px; border-radius: 50%;
  background: hsl(var(--h) var(--art-s) var(--art-l)); color: hsl(var(--h) var(--art-fg-s) var(--art-fg-l));
  font: 700 18px/1 var(--font-display);
}
.how__title { font: 700 20px/1.15 var(--font-display); letter-spacing: -.02em; }
.how__step p { max-width: 38ch; color: var(--ink-2); }
@media (max-width: 760px) {
  .how__steps { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .how__step { grid-template-columns: 42px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; }
  .how__num { grid-row: span 2; margin: 0; }
}
.sell-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px;
  margin-top: clamp(32px, 5vw, 52px); padding: clamp(22px, 3.5vw, 36px);
  border: 1px solid var(--footer-line); border-radius: var(--radius-l); background: var(--footer-bg); color: var(--footer-ink);
}
.sell-cta__text { flex: 1 1 320px; min-width: 0; }
.sell-cta__title { font: 700 clamp(1.35rem, 1.1rem + 1vw, 1.8rem)/1.1 var(--font-display); letter-spacing: -.02em; }
.sell-cta__text p { max-width: 54ch; margin-top: 8px; color: var(--footer-ink-2); }
.sell-cta__btn { background: var(--footer-ink); color: var(--footer-bg); }
.sell-cta__btn:hover { background: #fff; color: var(--footer-bg); }
.sell-cta__btn .i { width: 18px; height: 18px; }

/* The slim footer on the dashboards and legal pages has no top part */
.footer--slim { padding-block: 0 24px; }
.footer--slim .footer__base { margin-top: 0; border-top: 0; }

/* "By ... you agree to our Terms" line under sign up, log in and checkout buttons */
.legal-note { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); text-align: center; }
.legal-note a { color: inherit; text-underline-offset: 2px; }
.legal-note a:hover { color: var(--ink); }

/* "I agree to the Terms" tick box above the checkout button */
.field .agree { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 400; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.field .agree input { flex: none; width: 18px; height: 18px; min-height: 0; margin: 1px 0 0; padding: 0; accent-color: var(--ink); cursor: pointer; }
.field .agree input[aria-invalid="true"] { outline: 2px solid var(--danger); outline-offset: 2px; }
.field .agree a { color: var(--ink); text-underline-offset: 2px; }

/* ---------- Legal pages (terms.html, privacy.html) ---------- */
.legal { max-width: 760px; padding-block: clamp(32px, 5vw, 56px) 72px; }
.legal h1 { font: 800 clamp(2rem, 5vw, 2.8rem)/1.05 var(--font-display); letter-spacing: -.03em; }
.legal__date { margin-top: 10px; font: 500 13px/1.4 var(--font-mono); color: var(--ink-2); }
.legal__intro { margin-top: 22px; font-size: 17px; }
.legal h2 { margin-top: 36px; font: 700 1.3rem/1.2 var(--font-display); letter-spacing: -.01em; }
.legal p, .legal ul { margin-top: 12px; }
.legal ul { padding-left: 1.3em; list-style: disc; }
.legal li + li { margin-top: 6px; }
.legal a { text-underline-offset: 3px; }

/* FAQ: each question opens and closes on tap */
.faq { margin-top: 14px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 500 22px/1 var(--font-mono); color: var(--ink-2); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 18px; color: var(--ink-2); }

/* 404 page */
.notfound { text-align: center; padding-block: clamp(56px, 10vw, 110px); }
.notfound__code { font: 800 clamp(4rem, 16vw, 7rem)/1 var(--font-display); letter-spacing: -.04em; color: var(--ink-2); }
.notfound h1 { margin-top: 8px; }
.notfound__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .grid { --gap-x: 10px; row-gap: 22px; }
  .price { font-size: 19px; }
  .store-avatar { width: 60px; height: 60px; border-radius: 18px; font-size: 22px; }
  .buy { grid-template-columns: minmax(0, 1fr); }
  .buy__art { min-height: 170px; }
  .buy__info { padding: 28px 20px 24px; }
  .auth { padding: 28px 20px 24px; }
  .modal { width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .modal .dlg { max-height: 100vh; max-height: 100dvh; height: 100%; }
  .select, .select select { width: 100%; }
}

/* Small phones: tighten the header so the name, currency, theme toggle and Log in all fit on one line */
@media (max-width: 420px) {
  .site-header__row { gap: 6px; }
  .brand__mark { width: 28px; height: 28px; }
  .brand { gap: 6px; }
  .brand__word { font-size: 19px; }
  .site-header__actions { gap: 4px; }
  .icon-btn { width: 40px; height: 40px; }
  .login__btn { min-height: 40px; padding: 0 10px; gap: 6px; }
  .login__btn > .i:first-child { display: none; }
  .cur__btn { height: 40px; padding: 0 8px 0 11px; gap: 4px; font-size: 13px; }
}
/* Dashboards on phones: a short "Shop" link and an icon-only Log out keep the header on one row */
.narrow-only { display: none; }
@media (max-width: 560px) {
  .site-header .narrow-only { display: inline; }
  .site-header .wide-only { display: none; }
  .btn--logout { width: 40px; padding: 0; justify-content: center; }
  .btn--logout span { display: none; }
}

/* Small phones: brand, currency, saved, theme and log in must fit one row */
@media (max-width: 400px) {
  .site-header__row { gap: 4px; }
  .site-header__actions { gap: 3px; }
  .brand { gap: 5px; }
  .brand__mark { width: 26px; height: 26px; }
  .brand__word { font-size: 17px; }
  .icon-btn { width: 36px; height: 36px; }
  .login__btn { min-height: 36px; padding: 0 9px; }
  .cur__btn { height: 36px; padding: 0 6px 0 9px; font-size: 12.5px; }
  /* Dashboards: the "Seller"/"Admin" tag next to the logo makes way for the buttons */
  .brand .admin-tag { display: none; }
  .btn--logout { width: 36px; min-height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ---------- Ratings and reviews ---------- */
.stars { position: relative; display: inline-flex; flex: none; vertical-align: middle; --star: hsl(42 95% 50%); }
.stars__base, .stars__fill { display: flex; gap: 1px; }
.stars__base { color: var(--ink-line); }
.stars__fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--star); }
.stars .i { width: 15px; height: 15px; fill: currentColor; stroke: currentColor; stroke-width: 1; }
.rating { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.rating--big .stars .i { width: 20px; height: 20px; }
.rating--big { font-size: 14px; }

.reviews { display: grid; gap: 16px; margin-top: 40px; max-width: 760px; }
.reviews__head { display: grid; gap: 6px; }
.reviews__title { font: 700 22px/1.2 var(--font-display); letter-spacing: -.01em; }
.review-list { display: grid; gap: 12px; }
.review { display: grid; gap: 8px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.review__who { font-size: 13px; color: var(--ink-2); }
.review__delete { margin-left: auto; font-size: 13px; }
.review__text { font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }

.order__review { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.order__review .order__label { margin-bottom: 0; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; margin: 0; padding: 0; border: 0; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { padding: 2px; color: var(--ink-line); cursor: pointer; }
.star-input label .i { width: 30px; height: 30px; fill: currentColor; stroke: currentColor; stroke-width: 1; }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: hsl(42 95% 50%); }
.star-input input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 1px; border-radius: 6px; }
.review-form textarea,
.review-form select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--card); color: inherit; font: inherit; font-size: 15px; line-height: 1.5; resize: vertical;
}
.review-form__actions { display: flex; align-items: center; gap: 16px; }
.order__report-btn { justify-self: start; margin-top: 10px; color: var(--ink-2); font-size: 13px; }
.order__report { margin-top: 12px; }
.rating--link { display: inline-flex; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.rating--link:hover span { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Narrow phones (360px): a smaller name; below that only the logo mark, so the header never scrolls sideways */
@media (max-width: 374px) {
  .brand__mark { width: 26px; height: 26px; }
  .brand__word { font-size: 16px; }
}
@media (max-width: 339px) {
  .brand__word { display: none; }
}

/* ---------- Spotlight popup: a promoted product when the shop opens (js/app.js showSpotlight) ---------- */
.modal.modal--spot { width: min(840px, calc(100% - 32px)); height: fit-content; max-height: calc(100% - 32px); border-radius: 22px; }
.modal.modal--spot .dlg { height: auto; max-height: min(92vh, 860px); max-height: min(92dvh, 860px); }
.spot { display: grid; grid-template-columns: 1fr 1fr; }
.spot__media { position: relative; display: block; min-height: 440px; overflow: hidden; background: hsl(var(--h) var(--art-s) var(--art-l)); }
.spot { cursor: pointer; }
.spot__blur { position: absolute; inset: -24px; background: center / cover no-repeat; filter: blur(22px) brightness(.7); }
.spot__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.spot__art { position: absolute; inset: 0; display: grid; place-items: center; color: hsl(var(--h) var(--art-fg-s) var(--art-fg-l)); }
.spot__art .art { width: 120px; height: 120px; }
.spot__logo { width: 120px; height: 120px; object-fit: contain; border-radius: 24px; }
.spot__initials { font: 800 clamp(3.4rem, 9vw, 5.5rem)/1 var(--font-display); letter-spacing: -.03em; }
.spot__info { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 64px 40px 44px; min-width: 0; }
.spot__label { font: 500 12px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.spot__name { margin: 12px 0 0; font: 800 clamp(1.7rem, 3.4vw, 2.3rem)/1.08 var(--font-display); letter-spacing: -.025em; text-transform: uppercase; overflow-wrap: anywhere; }
.spot__rule { display: block; width: 120px; height: 2px; margin: 18px auto 20px; border-radius: 2px; background: var(--ink-line); }
.spot__message { max-width: 30ch; font-size: 1.2rem; line-height: 1.4; color: var(--ink-2); }
.spot__product { margin-top: 12px; font-weight: 600; }
.spot__price { margin-top: 16px; font: 500 13px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.spot__cta { width: 100%; max-width: 300px; margin-top: 26px; padding-block: 14px; font-size: 1.02rem; }
@media (max-width: 640px) {
  .modal.modal--spot { width: min(440px, calc(100% - 24px)); }
  .spot { grid-template-columns: 1fr; }
  .spot__media { min-height: 0; }
  .spot__media--art { aspect-ratio: 16 / 9; }
  .spot__poster { position: relative; display: block; height: auto; max-height: 46vh; max-height: 46dvh; }
  .spot__info { padding: 24px 22px 26px; }
  .spot__name { font-size: 1.6rem; }
  .spot__rule { margin: 14px auto 14px; }
  .spot__message { font-size: 1.05rem; }
  .spot__cta { max-width: none; margin-top: 20px; }
}

/* ---------- Ads panel in the seller and admin dashboards: glass package boxes over coloured blobs ---------- */
.spot-glass {
  --glass: rgb(255 255 255 / .38); --glass-hi: rgb(255 255 255 / .6); --glass-line: rgb(255 255 255 / .65);
  --glass-shadow: 0 12px 32px -14px rgb(40 24 110 / .38);
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(16px, 3vw, 24px); border-radius: var(--radius-l);
  background:
    radial-gradient(38% 50% at 52% 46%, hsl(320 90% 70% / .55), transparent 72%),
    linear-gradient(135deg, hsl(252 85% 95%), hsl(198 85% 93%));
}
.spot-glass::before, .spot-glass::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.spot-glass::before { width: 240px; height: 240px; left: -50px; top: -70px; background: linear-gradient(140deg, #7C5CFF, #C44BFF); }
.spot-glass::after { width: 280px; height: 280px; right: -70px; bottom: -110px; background: linear-gradient(140deg, #1FC8E8, #4C3FE0); }
:root[data-theme="dark"] .spot-glass {
  --glass: rgb(22 18 42 / .42); --glass-hi: rgb(30 26 58 / .62); --glass-line: rgb(255 255 255 / .16);
  --glass-shadow: 0 14px 34px -14px rgb(0 0 0 / .7);
  background:
    radial-gradient(38% 50% at 52% 46%, hsl(320 80% 50% / .45), transparent 72%),
    linear-gradient(135deg, hsl(252 40% 14%), hsl(210 45% 12%));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .spot-glass {
    --glass: rgb(22 18 42 / .42); --glass-hi: rgb(30 26 58 / .62); --glass-line: rgb(255 255 255 / .16);
    --glass-shadow: 0 14px 34px -14px rgb(0 0 0 / .7);
    background:
      radial-gradient(38% 50% at 52% 46%, hsl(320 80% 50% / .45), transparent 72%),
      linear-gradient(135deg, hsl(252 40% 14%), hsl(210 45% 12%));
  }
}
.spot-glass .glass, .spot-pack, .spot-qty, .spot-total, .spot-packs__empty {
  border: 1px solid var(--glass-line); background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgb(255 255 255 / .35);
}
.spot-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.spot-pack {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 124px;
  padding: 18px 18px 14px; border-radius: 18px; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.spot-pack:hover { transform: translateY(-2px); background: var(--glass-hi); }
.spot-pack[aria-checked="true"] { background: var(--glass-hi); box-shadow: 0 0 0 2px var(--brand), var(--glass-shadow); }
.spot-pack__check {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .15s ease;
}
.spot-pack__check .i { width: 14px; height: 14px; stroke-width: 3; }
.spot-pack[aria-checked="true"] .spot-pack__check { opacity: 1; transform: none; }
.spot-pack__time { padding-right: 26px; font: 800 1.4rem/1.1 var(--font-display); letter-spacing: -.02em; }
.spot-pack__price { font-size: 1.05rem; font-weight: 600; }
.spot-pack__note { margin-top: auto; padding-top: 8px; font-size: 12px; color: var(--ink-2); }
.spot-packs__empty { grid-column: 1 / -1; padding: 18px; border-radius: 16px; color: var(--ink-2); font-size: 14px; }
.spot-qty { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; padding: 10px 16px; border-radius: 18px; }
.spot-qty__label { font-size: 14px; font-weight: 600; }
.spot-qty__stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.spot-qty__stepper button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.spot-qty__stepper button:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.spot-qty__stepper button:disabled { opacity: .3; cursor: default; }
.spot-qty__stepper .i { width: 18px; height: 18px; }
.spot-qty__stepper output { min-width: 30px; text-align: center; font: 700 17px/1 var(--font-display); }
.spot-qty__max { font-size: 13px; color: var(--ink-2); }
.spot-total {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  margin-top: 14px; padding: 14px 18px; border-radius: 18px; background: var(--glass-hi); font-size: 15px;
}
.spot-total:empty { display: none; }
.spot-total__price { font: 800 1.6rem/1 var(--font-display); letter-spacing: -.02em; }
.spot-total__sum { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.spot-total__own { font-size: 12.5px; color: var(--ink-2); }

/* The rest of the seller's Ads page */
.spot-sub { margin: 28px 0 12px; font: 700 1.05rem/1.3 var(--font-display); letter-spacing: -.01em; }
.spot-contact {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  margin-top: 16px; padding: 12px 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2);
}
.spot-contact .btn { gap: 8px; }
.spot-contact .i { width: 18px; height: 18px; }
.spot-steps { display: flex; gap: 8px; margin: 0 0 4px; padding: 0; list-style: none; }
.spot-steps li {
  display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; padding-bottom: 10px;
  border-bottom: 2px solid var(--line); font-size: 14px; color: var(--ink-3);
}
.spot-steps li span { display: grid; flex: none; place-items: center; width: 24px; height: 24px; border: 1.5px solid currentColor; border-radius: 50%; font: 600 12px/1 var(--font-mono); }
.spot-steps li[aria-current="step"] { border-bottom-color: var(--ink); color: var(--ink); font-weight: 600; }
.spot-steps li.is-done { border-bottom-color: var(--brand); color: var(--ink-2); }
.spot-steps li.is-done span { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.spot-buy { max-width: 640px; }
.spot-step { display: grid; gap: 18px; }
.spot-label { font-size: 13px; font-weight: 600; }
.spot-poster { display: flex; align-items: center; gap: 16px; }
.spot-poster__img {
  display: grid; flex: none; place-items: center; width: 112px; height: 112px; overflow: hidden;
  border: 1.5px dashed var(--ink-line); border-radius: 14px; background: var(--paper); color: var(--ink-3);
}
.spot-poster__img img { width: 100%; height: 100%; object-fit: contain; }
.spot-poster__text { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.spot-poster__text .field__hint { flex-basis: 100%; }
.spot-poster__text label.btn { cursor: pointer; }
.spot-poster input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.spot-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.spot-thumb { overflow: hidden; }
.spot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.spot-thumb .i { width: 20px; height: 20px; }
@media (max-width: 480px) {
  .spot-steps li { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; }
  .spot-poster { align-items: flex-start; }
  .spot-poster__img { width: 88px; height: 88px; }
}
