/* ==========================================================================
   Store Skopje - the single stylesheet for the whole storefront.

   The templates carry no inline style attribute and no inline event handler, so
   the content-security policy stays at style-src 'self' and script-src 'self'.
   Every rule therefore lives here, which is also why the pages look related
   rather than styled one at a time.
   ========================================================================== */

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

:root {
  --brand-700: #1f2f8f;
  --brand-600: #2b3fd1;
  --brand-500: #4859e8;
  --brand-100: #e6eaff;
  --brand-50: #f0f2ff;

  --accent-600: #b8700a;
  --accent-500: #f5a524;
  --accent-50: #fff5e4;

  --ok-600: #0f6b4a;
  --ok-50: #e7f7ef;
  --warn-600: #9a5505;
  --warn-50: #fff3e0;
  --danger-600: #a02330;
  --danger-50: #fdecee;

  --ink-900: #101430;
  --ink-700: #343b5e;
  --ink-600: #4d5578;
  --ink-500: #6e7699;
  --ink-400: #9aa1bd;

  --line: #e3e6f2;
  --line-strong: #cdd3e8;
  --surface: #ffffff;
  --bg: #f5f6fb;
  --bg-alt: #eef0f9;

  --r-xs: 6px;
  --r-sm: 9px;
  --r: 13px;
  --r-lg: 18px;
  --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(16, 20, 48, .06), 0 1px 3px rgba(16, 20, 48, .04);
  --sh-2: 0 4px 14px rgba(16, 20, 48, .08);
  --sh-3: 0 18px 44px rgba(16, 20, 48, .13);

  --sp: clamp(16px, 2.6vw, 30px);
  --shell: 1220px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-900);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { margin: 0 0 .45em; line-height: 1.22; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.5rem, 2.6vw, 2.15rem); }
h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 650; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--sp); }
.page { padding: clamp(18px, 2.6vw, 34px) 0 clamp(40px, 6vw, 72px); }
.pad { padding: clamp(20px, 3vw, 40px) 0; }
.muted { color: var(--ink-500); }
.small { font-size: .86rem; }
.nowrap { white-space: nowrap; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  background: var(--brand-600); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- header -- */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}

.topbar__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink-900); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand__mark { color: #fff; background: var(--brand-600); border-radius: 11px; padding: 5px; display: grid; place-items: center; flex: none; }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__text strong { font-size: 1.06rem; letter-spacing: -.01em; white-space: nowrap; }
.brand__text small { color: var(--ink-500); font-size: .72rem; white-space: nowrap; }

.searchbar { display: flex; gap: 8px; min-width: 0; }
.searchbar input {
  flex: 1 1 auto; min-width: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font: inherit;
  background: var(--bg);
}
.searchbar input:focus { background: #fff; border-color: var(--brand-500); outline: none; box-shadow: 0 0 0 3px var(--brand-100); }

.topbar__actions { display: flex; align-items: center; gap: 6px; }
.toplink {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 11px; border-radius: var(--r-sm);
  color: var(--ink-700); font-size: .88rem; font-weight: 550;
  background: none; border: 0; cursor: pointer; font-family: inherit;
  position: relative; white-space: nowrap;
}
.toplink:hover { background: var(--bg-alt); text-decoration: none; }
.toplink--cart { color: var(--brand-700); }
.toplink--menu { display: none; }
.count {
  background: var(--accent-500); color: #3a2400;
  font-style: normal; font-weight: 700; font-size: .72rem;
  min-width: 20px; text-align: center;
  border-radius: var(--r-pill); padding: 1px 6px;
}

.catnav { background: var(--surface); border-bottom: 1px solid var(--line); }
.catnav__inner { display: flex; gap: 4px; overflow-x: auto; padding-top: 6px; padding-bottom: 6px; scrollbar-width: thin; }
.catnav__link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: var(--r-pill);
  color: var(--ink-600); font-size: .85rem; white-space: nowrap;
}
.catnav__link:hover { background: var(--bg-alt); color: var(--ink-900); text-decoration: none; }
.catnav__link.is-active { background: var(--brand-50); color: var(--brand-700); }

/* --------------------------------------------------------------- layout -- */

.stack > * + * { margin-top: 16px; }
.cluster { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(16px, 2.2vw, 24px);
  box-shadow: var(--sh-1);
}
.card--tight { padding: 16px; border-radius: var(--r); }
.card__head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.card__title { margin: 0; font-size: 1.02rem; }

.section { margin-top: clamp(26px, 4vw, 48px); }
.section__head { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }

.grid { display: grid; gap: clamp(12px, 1.8vw, 20px); }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.grid--thirds { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 32px); align-items: start; }
.grid--halves { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* -------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r-sm);
  border: 1.5px solid transparent;
  font: inherit; font-weight: 600; font-size: .92rem;
  cursor: pointer; text-align: center;
  background: var(--bg-alt); color: var(--ink-900);
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand-600); color: #fff; }
.btn--primary:hover { background: var(--brand-700); }
.btn--accent { background: var(--accent-500); color: #40270a; }
.btn--accent:hover { background: #e79a19; }
.btn--ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink-700); }
.btn--ghost:hover { background: var(--bg-alt); }
.btn--danger { background: var(--surface); border-color: #f0c8cd; color: var(--danger-600); }
.btn--danger:hover { background: var(--danger-50); }
.btn--sm { padding: 7px 12px; font-size: .84rem; }
.btn--lg { padding: 14px 22px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; }
.btn__text { display: inline; }

/* ---------------------------------------------------------------- forms -- */

.field { margin-bottom: 16px; min-width: 0; }
.field--error .input { border-color: #e7a9b1; background: var(--danger-50); }
.field__label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--ink-700); }
.req { color: var(--danger-600); }
.input {
  width: 100%;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font: inherit; font-size: .95rem;
  background: var(--surface); color: var(--ink-900);
}
.input:focus { border-color: var(--brand-500); outline: none; box-shadow: 0 0 0 3px var(--brand-100); }
.textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.select { appearance: none; background-image: none; padding-right: 34px; cursor: pointer; }
.field__help { margin: 6px 0 0; font-size: .8rem; color: var(--ink-500); }
.field__error { margin: 6px 0 0; font-size: .82rem; color: var(--danger-600); font-weight: 550; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }

.radio-card {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1.5px solid var(--line-strong); border-radius: var(--r);
  padding: 13px 15px; margin-bottom: 10px; cursor: pointer; background: var(--surface);
}
.radio-card:hover { border-color: var(--brand-500); }
.radio-card input { margin-top: 3px; flex: none; accent-color: var(--brand-600); }
.radio-card__body { min-width: 0; }
.radio-card__title { font-weight: 650; display: block; }
.radio-card__meta { display: block; color: var(--ink-500); font-size: .84rem; }
.radio-card:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); }

/* --------------------------------------------------------------- alerts -- */

.alerts { display: grid; gap: 8px; margin-bottom: 18px; }
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--line); border-left-width: 4px;
  border-radius: var(--r-sm); padding: 11px 14px; background: var(--surface);
  font-size: .9rem; box-shadow: var(--sh-1);
}
.alert__icon { flex: none; margin-top: 1px; }
.alert--ok { border-left-color: var(--ok-600); background: var(--ok-50); }
.alert--ok .alert__icon { color: var(--ok-600); }
.alert--error { border-left-color: var(--danger-600); background: var(--danger-50); }
.alert--error .alert__icon { color: var(--danger-600); }
.alert--warn { border-left-color: var(--accent-600); background: var(--warn-50); }
.alert--warn .alert__icon { color: var(--warn-600); }
.alert--info { border-left-color: var(--brand-600); background: var(--brand-50); }
.alert--info .alert__icon { color: var(--brand-700); }
.alert__text { min-width: 0; }

/* ---------------------------------------------------------------- pills -- */

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: .75rem; font-weight: 650; white-space: nowrap;
  background: var(--bg-alt); color: var(--ink-600);
}
.pill--in { background: var(--ok-50); color: var(--ok-600); }
.pill--low { background: var(--warn-50); color: var(--warn-600); }
.pill--out { background: var(--danger-50); color: var(--danger-600); }
.pill--info { background: var(--brand-50); color: var(--brand-700); }
.pill--brand { background: var(--brand-600); color: #fff; }
.pill--ok { background: var(--ok-50); color: var(--ok-600); }
.pill--warn { background: var(--accent-50); color: var(--accent-600); }

/* --------------------------------------------------------------- hero ---- */

.hero {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  color: #fff; border-radius: var(--r-lg);
  padding: clamp(22px, 4vw, 46px);
  box-shadow: var(--sh-3);
}
.hero h1 { color: #fff; max-width: 20ch; }
.hero p { color: #d8dcff; max-width: 58ch; }
.hero__points { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 24px; }
.hero__point { display: flex; gap: 10px; align-items: flex-start; background: rgba(255, 255, 255, .12); border-radius: var(--r); padding: 12px 14px; }
.hero__point strong { display: block; font-size: .92rem; }
.hero__point span { font-size: .82rem; color: #d8dcff; }
.hero__point .icon { flex: none; margin-top: 2px; color: #fff; }

/* ----------------------------------------------------------- categories -- */

.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cattile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; display: flex; flex-direction: column; gap: 6px;
  color: var(--ink-900); box-shadow: var(--sh-1);
}
.cattile:hover { border-color: var(--brand-500); text-decoration: none; transform: translateY(-1px); }
.cattile__icon { color: var(--brand-600); }
.cattile__name { font-weight: 600; font-size: .9rem; }
.cattile__count { color: var(--ink-500); font-size: .78rem; }

/* -------------------------------------------------------- product card -- */

.pcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--sh-1);
}
.pcard:hover { box-shadow: var(--sh-2); }
.pcard__media { position: relative; display: block; background: var(--bg-alt); aspect-ratio: 4 / 3; overflow: hidden; }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; }
.pcard__placeholder { display: grid; place-items: center; height: 100%; color: var(--ink-400); }
.pcard__flag {
  position: absolute; left: 10px; top: 10px;
  background: rgba(16, 20, 48, .85); color: #fff;
  font-size: .72rem; font-weight: 650; padding: 3px 9px; border-radius: var(--r-pill);
}
.pcard__body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.pcard__cat { margin: 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-400); font-weight: 650; }
.pcard__title { margin: 0; font-size: .95rem; font-weight: 600; line-height: 1.35; }
.pcard__title a { color: var(--ink-900); }
.pcard__price { margin: 0; font-size: 1.08rem; font-weight: 700; color: var(--brand-700); }
.pcard__seller { margin: 0; display: flex; align-items: center; gap: 6px; color: var(--ink-500); font-size: .8rem; }
.pcard__body .btn { margin-top: auto; }

/* --------------------------------------------------------------- search -- */

.filters { position: sticky; top: 132px; }
.filters__group { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 16px; }
.filters__group:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.filters__title { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); margin-bottom: 10px; font-weight: 700; }
.filters__list { display: grid; gap: 2px; }
.filters__link { display: block; padding: 6px 10px; border-radius: var(--r-xs); color: var(--ink-600); font-size: .88rem; }
.filters__link:hover { background: var(--bg-alt); text-decoration: none; }
.filters__link.is-active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 14px; margin-bottom: 18px; box-shadow: var(--sh-1);
}
.toolbar form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar .input { width: auto; min-width: 150px; padding: 8px 11px; font-size: .88rem; }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 26px; }
.pager__info { color: var(--ink-500); font-size: .88rem; }

/* -------------------------------------------------------- product page -- */

.pdetail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(18px, 3vw, 40px); align-items: start; }

.gallery { display: grid; gap: 12px; }
.gallery__stage {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; aspect-ratio: 4 / 3; display: grid; place-items: center;
}
.gallery__stage img { width: 100%; height: 100%; object-fit: contain; }
.gallery__placeholder { color: var(--ink-400); }
.gallery__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.gallery__thumb { display: block; border: 1.5px solid var(--line); border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 1; background: var(--surface); }
.gallery__thumb:hover { border-color: var(--brand-500); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__video { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #000; }
.gallery__video video { width: 100%; max-height: 420px; }

.buybox { position: sticky; top: 132px; display: grid; gap: 14px; }
.buybox__price { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 750; color: var(--brand-700); margin: 0; }
.buybox__title { margin: 0; font-size: clamp(1.15rem, 1.9vw, 1.5rem); }
.stock-note { font-size: .86rem; font-weight: 600; }
.stock-note--in { color: var(--ok-600); }
.stock-note--low { color: var(--warn-600); }
.stock-note--out { color: var(--danger-600); }

.stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; }
.stepper button { border: 0; background: var(--bg-alt); width: 42px; font-size: 1.1rem; cursor: pointer; color: var(--ink-700); }
.stepper button:hover { background: var(--line); }
.stepper input { border: 0; width: 66px; text-align: center; font: inherit; padding: 10px 0; background: var(--surface); }
.stepper input:focus { outline: none; }

.seller-chip { display: flex; gap: 11px; align-items: center; padding: 12px 14px; background: var(--bg-alt); border-radius: var(--r); }
.seller-chip__mark { flex: none; width: 40px; height: 40px; border-radius: 11px; background: var(--brand-600); color: #fff; display: grid; place-items: center; font-weight: 700; }
.seller-chip__body { min-width: 0; }
.seller-chip__name { font-weight: 650; display: block; }
.seller-chip__meta { color: var(--ink-500); font-size: .8rem; }

.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.spec { background: var(--bg); border-radius: var(--r-sm); padding: 11px 13px; }
.spec dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); font-weight: 700; margin: 0 0 3px; }
.spec dd { margin: 0; font-size: .9rem; font-weight: 550; }

/* ---------------------------------------------------------------- cart --- */

.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line__media { width: 64px; height: 64px; border-radius: var(--r-sm); overflow: hidden; background: var(--bg-alt); display: grid; place-items: center; color: var(--ink-400); }
.line__media img { width: 100%; height: 100%; object-fit: cover; }
.line__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.line__title { font-weight: 600; color: var(--ink-900); overflow-wrap: anywhere; }
.line__qty, .line__total { font-weight: 650; white-space: nowrap; }

.line--cart { grid-template-columns: 64px minmax(0, 1fr) auto auto auto; }

.osum { display: grid; gap: 8px; font-size: .92rem; }
.osum__row { display: flex; justify-content: space-between; gap: 16px; }
.osum__row--total { border-top: 1px solid var(--line); padding-top: 10px; font-size: 1.1rem; font-weight: 750; color: var(--brand-700); }

.cartgroup { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 4px 16px 12px; margin-bottom: 14px; }
.cartgroup__head { display: flex; gap: 10px; align-items: center; padding: 12px 0 6px; font-size: .88rem; color: var(--ink-600); }

.checkout-summary { position: sticky; top: 132px; }

/* --------------------------------------------------------------- empty --- */

.empty { text-align: center; padding: clamp(28px, 5vw, 58px) 20px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty--page { border-style: solid; }
.empty__icon { display: inline-grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); margin-bottom: 14px; }
.empty__code { font-size: 2.6rem; font-weight: 750; color: var(--brand-700); margin: 0 0 4px; line-height: 1; }
.empty__title { margin: 0 0 8px; }
.empty__text { color: var(--ink-500); max-width: 52ch; margin: 0 auto 16px; }
.empty .cluster { justify-content: center; }

/* --------------------------------------------------------------- stats --- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px; box-shadow: var(--sh-1); }
.stat__label { font-size: .78rem; color: var(--ink-500); text-transform: uppercase; letter-spacing: .04em; font-weight: 650; }
.stat__value { font-size: 1.5rem; font-weight: 730; color: var(--ink-900); margin-top: 4px; }
.stat__hint { font-size: .8rem; color: var(--ink-500); }

/* --------------------------------------------------------------- table --- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .89rem; min-width: 560px; }
.table th, .table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: var(--bg-alt); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-600); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table a { font-weight: 550; }

/* ---------------------------------------------------------------- tabs --- */

.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs__link { padding: 10px 14px; color: var(--ink-600); font-size: .9rem; font-weight: 550; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs__link:hover { color: var(--ink-900); text-decoration: none; }
.tabs__link.is-active { color: var(--brand-700); border-bottom-color: var(--brand-600); }

/* --------------------------------------------------------------- media --- */

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.media-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.media-tile__stage { aspect-ratio: 4 / 3; background: var(--bg-alt); display: grid; place-items: center; overflow: hidden; }
.media-tile__stage img { width: 100%; height: 100%; object-fit: cover; }
.media-tile__body { padding: 10px 12px 12px; display: grid; gap: 8px; }
.media-tile__name { font-size: .78rem; color: var(--ink-500); overflow-wrap: anywhere; }

.banner { display: flex; gap: 12px; align-items: flex-start; background: var(--accent-50); border: 1px solid #f2dcb4; border-radius: var(--r); padding: 13px 15px; font-size: .88rem; }
.banner .icon { flex: none; color: var(--accent-600); margin-top: 2px; }

.note { background: var(--bg-alt); border-radius: var(--r-sm); padding: 11px 13px; font-size: .86rem; color: var(--ink-600); }

.upload-form { border: 1.5px dashed var(--line-strong); border-radius: var(--r); padding: 16px; background: var(--bg); }
.upload-form .input { padding: 9px 11px; }

/* --------------------------------------------------------------- footer -- */

.footer { background: var(--ink-900); color: #cdd2ea; margin-top: clamp(36px, 6vw, 76px); }
.footer__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 26px; padding-top: clamp(28px, 4vw, 46px); padding-bottom: 26px; }
.footer__col { display: grid; gap: 7px; align-content: start; }
.footer__col strong { color: #fff; font-size: .92rem; margin-bottom: 2px; }
.footer__brand { font-size: 1.08rem; }
.footer a { color: #cdd2ea; font-size: .88rem; }
.footer a:hover { color: #fff; }
.footer .muted { color: #98a0c4; font-size: .88rem; }
.footer__base { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; border-top: 1px solid #262c50; padding-top: 16px; padding-bottom: 24px; font-size: .82rem; }

.prose { white-space: pre-line; color: var(--ink-700); }

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 1080px) {
  .grid--split, .pdetail { grid-template-columns: minmax(0, 1fr); }
  .filters, .buybox, .checkout-summary { position: static; }
  .filters { margin-bottom: 22px; }
}

@media (max-width: 860px) {
  .topbar__inner { grid-template-columns: minmax(0, 1fr) auto; row-gap: 10px; }
  .brand { grid-column: 1; }
  .topbar__actions { grid-column: 2; }
  .searchbar { grid-column: 1 / -1; order: 3; }
  .toplink--menu { display: inline-flex; }
  .toplink span:not(.count) { display: none; }
  .toplink--cart span:not(.count) { display: none; }
  body:not(.nav-open) .catnav { display: none; }
  .catnav__inner { flex-wrap: wrap; }
  .line, .line--cart { grid-template-columns: 56px minmax(0, 1fr); row-gap: 8px; }
  .line__media { width: 56px; height: 56px; }
  .line__qty, .line__total { grid-column: 2; }
}

@media (max-width: 640px) {
  .btn__text { display: none; }
  .btn--block .btn__text, .btn--lg .btn__text { display: inline; }
  .searchbar .btn { padding-inline: 14px; }
  .table { min-width: 0; }
  .stack-table thead { display: none; }
  .stack-table, .stack-table tbody, .stack-table tr, .stack-table td { display: block; width: 100%; }
  .stack-table tr { border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 12px; padding: 6px 12px; background: var(--surface); }
  .stack-table td { display: flex; justify-content: space-between; gap: 14px; border: 0; padding: 7px 0; }
  .stack-table td::before { content: attr(data-label); color: var(--ink-500); font-size: .78rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .stat__value { font-size: 1.25rem; }
}

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

@media print {
  .topbar, .catnav, .footer, .btn { display: none; }
}
