/* ==========================================================================
   ARAL — app stylesheet  ·  "workshop catalogue"
   Sections: base · layout · header · buttons · forms · hero · sections ·
   cards · shop · product · cart · checkout · order · account · page ·
   overlays · utilities
   ========================================================================== */

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

/* no transition or animation may run before the theme has painted once */
html:not(.theme-ready) *, html:not(.theme-ready) *::before, html:not(.theme-ready) *::after {
  transition: none !important;
  animation: none !important;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); font-weight: 700; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

::selection { background: var(--accent); color: var(--accent-ink); }

/* numbers, prices, specs: mono + isolated so they never flip inside Arabic */
.num, .price, .price--was, .price-off, .line-price, .line-total,
.order-number, .kpi strong, .pdp-price, .spec-table td, .count, .total-amount {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' 1;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: var(--s3) var(--s4);
  z-index: 100;
}
.skip-link:focus { inset-inline-start: var(--s4); top: var(--s2); }

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

.row { display: flex; align-items: center; gap: var(--s3); }
.spread { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.muted { color: var(--steel); }
main { display: block; }

/* ------------------------------------------------------- announce/header --- */
.announce {
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-xs);
  letter-spacing: .02em;
  line-height: var(--announce-h);
  text-align: center;
}
.announce .wrap { display: block; }
.announce span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: var(--border);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--s4);
  justify-content: space-between;
}

.brand { flex: 0 0 auto; }
.brand img { width: auto; height: 26px; aspect-ratio: 900 / 620; }
/* light/dark logo pair: ink on paper, white on dark */
.theme-toggle .i-sun { display: none; }
html[data-theme='dark'] .theme-toggle .i-sun { display: block; }
html[data-theme='dark'] .theme-toggle .i-moon { display: none; }

/* monochrome logo: ink on paper, inverted to white on dark */
html[data-theme='dark'] .brand img,
html[data-theme='dark'] .mobile-menu .brand img { filter: invert(1) brightness(1.08); }
@media (min-width: 768px) { .brand img { height: 30px; } }

.main-nav {
  display: none;
  gap: var(--s5);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.main-nav a { position: relative; padding-block: var(--s2); color: var(--ink-2); }
.main-nav a:hover, .main-nav a[aria-current='page'] { color: var(--ink); }
.main-nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

.header-tools { display: flex; align-items: center; gap: var(--s1); }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn svg {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
svg[fill='currentColor'] { fill: currentColor; stroke: none; }

.badge-count {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-end: 6px;
  min-width: 17px;
  height: 17px;
  padding-inline: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  border-radius: var(--radius-pill);
}
.badge-count[data-on='0'] { display: none; }

.lang-switch {
  display: inline-flex;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11px;
}
.lang-switch button {
  border: 0;
  background: none;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--steel);
}
.lang-switch button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }

.burger { display: inline-flex; }

@media (min-width: 992px) {
  .main-nav { display: flex; }
  .burger { display: none; }
  .lang-switch { display: inline-flex; }
}

/* mobile menu: full-height drawer from the inline start side */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--paper);
  padding: var(--s4) var(--gutter) var(--s6);
  display: none;
  flex-direction: column;
  gap: var(--s4);
  overflow-y: auto;
}
.mobile-menu[data-open='1'] { display: flex; }
.mobile-menu nav { display: flex; flex-direction: column; margin-top: var(--s4); }
.mobile-menu nav a {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 7vw, 2rem);
  font-weight: 600;
  padding-block: var(--s3);
  border-bottom: var(--border);
}
.mobile-menu .brand img { height: 26px; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(21, 19, 15, .38);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
.overlay[data-open='1'] { opacity: 1; pointer-events: auto; }

/* ------------------------------------------------------------- buttons --- */
.btn {
  --btn-h: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: var(--btn-h);
  padding-inline: var(--s5);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-align: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent-deep); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--paper-2); border-color: var(--ink); }

.btn--light { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn--light:hover { background: var(--paper-2); }

.btn--sm { --btn-h: 40px; padding-inline: var(--s4); font-size: var(--fs-xs); }
.btn--block { width: 100%; }

.btn--loading { position: relative; color: transparent !important; }
.btn--loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--paper);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--fs-sm);
  font-weight: 600;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  white-space: nowrap;
}
.link-arrow::after { content: '←'; font-family: var(--font-mono); }
html[dir='ltr'] .link-arrow::after { content: '→'; }
.link-arrow:hover { border-color: var(--ink); }

/* --------------------------------------------------------------- forms --- */
.field { display: flex; flex-direction: column; gap: var(--s2); }
.field label, .field > span:first-child {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-2);
}
.input, .select, .textarea, input[type='text'], input[type='email'], input[type='tel'],
input[type='password'], input[type='search'], input[type='number'], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px var(--s4);
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: var(--fs-sm);
  color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea, textarea { min-height: 112px; resize: vertical; line-height: var(--lh-body); }
select { appearance: none; background-image: none; padding-inline-end: var(--s5); }
[aria-invalid='true'] { border-color: var(--danger) !important; }

.field-error { color: var(--danger); font-size: var(--fs-xs); min-height: 1em; margin: 0; }
.field-hint { color: var(--steel); font-size: var(--fs-xs); }
.form-note { color: var(--steel); font-size: var(--fs-xs); }
.form-grid { display: grid; gap: var(--s4); }
.form-grid--2 { grid-template-columns: 1fr; }
.row2 { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid--2, .row2 { grid-template-columns: 1fr 1fr; } }

.field-inline { display: flex; gap: var(--s2); }
.field-inline input { flex: 1 1 auto; }

.req::after { content: ' *'; color: var(--accent); }

/* ---------------------------------------------------------------- hero --- */
.hero { padding-block: var(--s6) var(--s7); border-bottom: var(--border); }
.hero-grid { display: grid; gap: var(--s6); }
@media (min-width: 900px) {
  .hero { padding-block: var(--s8) var(--s8); }
  .hero-grid { grid-template-columns: 1.05fr .95fr; align-items: center; gap: var(--s8); }
}

.hero-index { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.hero-index .n { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--steel); }
.hero-index .bar { width: 28px; height: 1px; background: var(--line-strong); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--steel);
  text-transform: none;
}

.hero h1 { margin-bottom: var(--s4); white-space: pre-line; }
.hero-sub { color: var(--ink-2); font-size: var(--fs-sm); max-width: 46ch; margin-bottom: var(--s5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s6); }

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
  padding-top: var(--s5);
  border-top: var(--border);
}
.hero-meta div { display: flex; flex-direction: column; gap: 2px; }
.hero-meta strong {
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  font-weight: 500;
  line-height: 1.1;
}
.hero-meta span { font-size: 11px; color: var(--steel); line-height: 1.4; }

.hero-media { position: relative; }
.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--paper-2);
}
@media (min-width: 900px) { .hero-media img { aspect-ratio: 5 / 4; } }
.hero-media .frame {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(247, 245, 240, .5);
  border-radius: var(--radius);
  pointer-events: none;
}
.hero-note {
  position: absolute;
  inset-block-end: var(--s4);
  inset-inline-start: var(--s4);
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius);
}

/* ------------------------------------------------------------ sections --- */
.section { padding-block: var(--s7); border-top: var(--border); }
.section--tight { padding-block: var(--s6); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: var(--s5);
  flex-wrap: wrap;
}
.section-head h2 { margin-top: var(--s2); }
.week-offer {
  display: grid; grid-template-columns: 1fr; gap: var(--s4);
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: 10px; align-items: center; overflow: hidden;
}
@media (min-width: 720px) { .week-offer { grid-template-columns: 1.1fr .9fr; padding: 12px; gap: var(--s5); } }
.week-offer-media { position: relative; border-radius: 18px; overflow: hidden; background: var(--paper-2); aspect-ratio: 4 / 3; display: block; }
.week-offer-media .badge-flag { inset-inline-start: 8px; inset-block-start: 8px; inset-inline-end: auto; }
.week-offer-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: inherit; /* the photo's own square white edge must follow the curve */
}
.week-offer-body { padding: 0 var(--s3) var(--s3); }
.week-offer-body { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.week-offer-body h3 { font-size: var(--fs-lg); margin: 0; }
.week-offer-price { display: flex; align-items: baseline; gap: .5rem; }
.week-offer-price .now { font-size: var(--fs-lg); font-weight: 700; }
.week-offer-price .was { color: var(--steel); text-decoration: line-through; font-size: var(--fs-sm); }
.week-offer-note { font-size: var(--fs-sm); color: var(--ink-2); }
.reviews-summary { display: inline-flex; align-items: center; gap: .45rem; font-size: var(--fs-sm); color: var(--ink-2); }
.reviews-score { font-weight: 700; color: var(--ink); font-size: var(--fs-lg); }
.reviews-stars, .review-card-stars { color: var(--accent); letter-spacing: 1px; }
.reviews-grid { display: grid; grid-template-columns: 1fr; gap: var(--s3); }
@media (min-width: 720px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); gap: var(--s4); } }
.review-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: var(--s4); display: flex; flex-direction: column; gap: .5rem;
}
.review-card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.review-card-name { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.review-card-body { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.6; margin: 0; }
.review-card-product { font-size: 11px; color: var(--steel); text-decoration: underline; text-underline-offset: 3px; align-self: flex-start; }
.section-head--center { justify-content: center; text-align: center; }
.section-head--featured h2 {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
  line-height: 1.15;
}
.section-head--featured h2::after {
  content: '';
  display: block;
  width: 38px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  margin: 0.55rem auto 0;
}
.section-head--featured .eyebrow { color: var(--accent-deep); }
html[data-theme='dark'] .section-head--featured .eyebrow { color: var(--accent); }
.section-head--center > div { align-items: center; }
.section-head--minor h2 { font-size: var(--fs-md); font-weight: 600; color: var(--ink-2); margin-top: .1rem; }
.section-head--minor .eyebrow { font-size: 10px; letter-spacing: .12em; }
.section--minor { padding-block: var(--s6); }
.lede { color: var(--ink-2); font-size: var(--fs-sm); max-width: 60ch; }

/* ---------------------------------------------------------- categories --- */
.cat-mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (min-width: 900px) { .cat-mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); } }

.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--s2);
  min-height: 148px;
  padding: var(--s4);
  background: var(--paper-2);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.cat-tile:hover { border-color: var(--ink); transform: translateY(-2px); }
.cat-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .9;
}
.cat-tile-body { position: relative; z-index: 1; }
.cat-tile h3 { font-size: var(--fs-lg); }
.cat-tile .count { font-size: 11px; color: var(--steel); }
.cat-tile::after {
  content: '←';
  position: absolute;
  inset-block-start: var(--s4);
  inset-inline-end: var(--s4);
  font-family: var(--font-mono);
  color: var(--steel);
}
html[dir='ltr'] .cat-tile::after { content: '→'; }

/* -------------------------------------------------------- product card --- */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); min-width: 0; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* list view (JS toggles data-view on [data-grid]) */
.product-grid[data-view='list'] { display: grid; grid-template-columns: 1fr; gap: 0; overflow: visible; }
.product-grid[data-view='list'] > * { flex: none; }
.product-grid[data-view='list'] .product-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: var(--s4);
  align-items: center;
  padding-block: var(--s4);
  border-bottom: var(--border);
}
.product-grid[data-view='list'] .product-media { aspect-ratio: 1 / 1; }
.product-grid[data-view='list'] .product-body { padding-block: 0; }
.product-grid[data-view='list'] .quick-add {
  position: absolute; inset-inline: var(--s2); inset-block-end: var(--s2);
  opacity: 1; transform: none; max-width: none;
}
.product-grid[data-view='list'] .product-card + .product-card { border-top: 0; }
@media (max-width: 767px) {
  .product-grid[data-view='list'] .product-card { grid-template-columns: 120px minmax(0, 1fr); gap: var(--s3); }
  .product-grid[data-view='list'] .product-name { font-size: var(--fs-sm); }
}

/* mobile: 2-up grid (a horizontal rail clipped cards in RTL) */
@media (max-width: 420px) {
  .product-grid { gap: var(--s3); }
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.product-card:hover { border-color: var(--ink); transform: translateY(-2px); }

.product-media { position: relative; background: var(--paper-2); aspect-ratio: 4 / 5; }
.product-media a { display: block; height: 100%; }
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--s4);
  transition: opacity var(--dur) var(--ease);
}
.product-media img.alt {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.product-card:hover .product-media img.alt { opacity: 1; }
.product-card:hover .product-media img:not(.alt) { opacity: 0; }

.badge-flag {
  position: absolute;
  inset-block-start: var(--s3);
  inset-inline-start: var(--s3);
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius);
}
.badge-flag--deal { background: var(--accent); color: var(--accent-ink); }
.badge-flag--demo { background: var(--paper); color: var(--ink-2); border: var(--border); }

.wish-btn {
  position: absolute;
  inset-block-start: var(--s2);
  inset-inline-end: var(--s2);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  cursor: pointer;
}
.wish-btn svg {
  width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5;
}
.wish-btn[data-on='1'] { color: var(--accent); }
.wish-btn[data-on='1'] svg { fill: var(--accent); stroke: var(--accent); }

.quick-add {
  position: absolute;
  inset-inline: var(--s2);
  inset-block-end: var(--s2);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.product-card:hover .quick-add, .product-card:focus-within .quick-add { opacity: 1; transform: none; }
@media (hover: none) { .quick-add { opacity: 1; transform: none; } }

.product-body { display: flex; flex-direction: column; gap: 2px; padding: var(--s3) var(--s3) var(--s4); }
.product-cat { font-size: 10px; letter-spacing: .04em; color: var(--steel); }
.product-name {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-name a:hover { text-decoration: underline; text-underline-offset: 3px; }

.price-row { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s1); }
.price { font-size: var(--fs-sm); font-weight: 500; }
.price--was { color: var(--steel); font-size: 11px; text-decoration: line-through; }
.price-off { color: var(--accent); font-size: 10px; font-weight: 500; }

.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--steel); }
.rating svg { width: 12px; height: 12px; fill: var(--warn); }
.rating svg.off { fill: var(--line-strong); }

.stock-note { font-size: 10px; color: var(--steel); }
.stock-note--low { color: var(--warn); }

/* sold-out: dim the media, hide buy affordance */
.product-card[data-sold-out='1'] .product-media { opacity: .55; }

/* ------------------------------------------------------------ editorial --- */
.editorial {
  display: grid;
  gap: var(--s5);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 900px) { .editorial { grid-template-columns: 1.1fr .9fr; align-items: stretch; } }
.editorial-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.editorial-body { padding: var(--s6) var(--s5); display: flex; flex-direction: column; gap: var(--s4); align-items: flex-start; }
@media (min-width: 900px) { .editorial-body { padding: var(--s7) var(--s7) var(--s7) 0; justify-content: center; } }
.editorial-body h2 { color: var(--paper); }
.editorial-body p { color: color-mix(in srgb, var(--paper) 78%, transparent); font-size: var(--fs-sm); max-width: 48ch; }

/* --------------------------------------------------------------- values --- */
.values { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .values { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.value {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s4);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper);
}
.value h3 { font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600; }
.value p { font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.65; }
.value .vi { width: 22px; height: 22px; color: var(--ink); }

/* ------------------------------------------------------------------ faq --- */
.faq { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .faq { grid-template-columns: .8fr 1.2fr; gap: var(--s7); align-items: start; } }
.faq-item {
  border-top: var(--border);
  padding-block: var(--s4);
}
.faq-item:last-child { border-bottom: var(--border); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  font-weight: 600;
  font-size: var(--fs-sm);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  color: var(--steel);
  font-size: 16px;
  flex: none;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p { color: var(--ink-2); font-size: var(--fs-sm); margin-top: var(--s3); max-width: 62ch; }

/* ----------------------------------------------------------- newsletter --- */
.newsletter { background: var(--paper-2); border-top: var(--border); padding-block: var(--s7); }
.newsletter-inner { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .newsletter-inner { grid-template-columns: 1fr 1fr; align-items: center; gap: var(--s8); } }
.newsletter h2 { margin-top: var(--s2); margin-bottom: var(--s2); }
.newsletter p { color: var(--ink-2); font-size: var(--fs-sm); }

/* --------------------------------------------------------------- footer --- */
.site-footer {
  background: var(--ink);
  color: color-mix(in srgb, var(--paper) 82%, transparent);
  padding-block: var(--s7) var(--s5);
  font-size: var(--fs-sm);
}
.footer-grid { display: grid; gap: var(--s6); grid-template-columns: 1fr; }
@media (max-width: 767px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s5) var(--s4); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s5); } }
.footer-brand img { height: 26px; width: auto; aspect-ratio: 900 / 620; margin-bottom: var(--s3); }
.footer-brand p { font-size: var(--fs-xs); max-width: 34ch; }
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  color: color-mix(in srgb, var(--paper) 55%, transparent);
  margin-bottom: var(--s3);
}
.footer-links { display: flex; flex-direction: column; gap: var(--s2); }
.footer-links a { color: inherit; }
.footer-links a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid color-mix(in srgb, var(--paper) 16%, transparent);
  font-size: 11px;
}

/* -------------------------------------------------------- cart drawer --- */
.drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  z-index: 70;
  width: min(420px, 100vw);
  background: var(--paper);
  border-inline-start: var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease);
  visibility: hidden;
}
html[dir='rtl'] .drawer { transform: translateX(-100%); }
.drawer[data-open='1'], html[dir='rtl'] .drawer[data-open='1'] { transform: none; visibility: visible; }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s4);
  border-bottom: var(--border);
}
.drawer-head h2 { font-size: var(--fs-lg); display: flex; align-items: center; gap: var(--s2); }
.drawer-head h2 span { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--steel); }
.drawer-body { flex: 1 1 auto; overflow-y: auto; padding: var(--s4); display: flex; flex-direction: column; gap: var(--s4); }
.drawer-foot { border-top: var(--border); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); background: var(--paper-2); }

.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: var(--s3); align-items: start; }
.cart-line img { width: 64px; height: 80px; object-fit: contain; background: var(--paper-2); border-radius: var(--radius); }
.cart-line .name { font-size: var(--fs-xs); font-weight: 600; line-height: 1.45; }
.cart-line .price { font-size: var(--fs-xs); }
.cart-line button.remove, .remove {
  border: 0;
  background: none;
  color: var(--steel);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.remove:hover { color: var(--danger); }

/* quantity stepper */
.qty, [data-qty] {
  display: inline-flex;
  align-items: center;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.qty button, [data-qty] button {
  width: 36px;
  height: 36px;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--font-mono);
  color: var(--ink);
}
.qty button:hover, [data-qty] button:hover { background: var(--paper-2); }
.qty input, [data-qty] input {
  width: 40px;
  min-height: 36px;
  border: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  background: none;
}

/* free-shipping progress */
.ship-bar { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--ink-2); }
.ship-bar .track { height: 4px; background: var(--paper-3); border-radius: var(--radius-pill); overflow: hidden; }
.ship-bar .fill { height: 100%; background: var(--accent); transition: width var(--dur) var(--ease); }

/* totals */
.totals { display: flex; flex-direction: column; gap: var(--s2); font-size: var(--fs-sm); }
.row-line, .result-line { display: flex; justify-content: space-between; gap: var(--s4); }
.row-line--discount { color: var(--ok); }
.row-line--total { font-weight: 600; font-size: var(--fs-base); border-top: var(--border); padding-top: var(--s3); margin-top: var(--s2); }
.line-price, .line-total { font-family: var(--font-mono); }

/* --------------------------------------------------------------- toast --- */
.toast-host {
  position: fixed;
  inset-block-end: var(--s5);
  inset-inline: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  pointer-events: none;
  padding-inline: var(--gutter);
}
.toast {
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-xs);
  font-weight: 500;
  padding: 10px var(--s4);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  animation: toast-in var(--dur) var(--ease);
  max-width: 92vw;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------------- shop --- */
.shop-layout { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); padding-block: var(--s6) var(--s7); min-width: 0; }
.shop-layout > * { min-width: 0; }
@media (min-width: 992px) { .shop-layout { grid-template-columns: minmax(220px, 240px) minmax(0, 1fr); gap: var(--s7); align-items: start; } }

.shop-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding-block: var(--s3);
  border-bottom: var(--border);
  margin-bottom: var(--s4);
  flex-wrap: wrap;
}
.toolbar-right { display: flex; align-items: center; gap: var(--s2); margin-inline-start: auto; }
.filters-toggle { display: inline-flex; }
@media (min-width: 992px) { .filters-toggle { display: none; } }

.filters { display: none; }
.filters[data-open='1'] { display: block; }
@media (min-width: 992px) {
  .filters { display: block; position: sticky; top: calc(var(--header-h) + var(--s4)); min-width: 220px; width: 100%; }
}
@media (max-width: 991px) {
  .filters[data-open='1'] {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 65;
    max-height: 82vh;
    overflow-y: auto;
    background: var(--paper);
    border-top: var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: var(--s4) var(--gutter) var(--s6);
    box-shadow: var(--shadow-2);
  }
}
.filter-group { padding-block: var(--s4); border-bottom: var(--border); }
.filter-group h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--steel);
  margin-bottom: var(--s3);
}
.filter-list { display: flex; flex-direction: column; gap: var(--s2); }
.filter-list label { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); cursor: pointer; }
.filter-list input[type='checkbox'], .filter-list input[type='radio'] { width: 16px; height: 16px; accent-color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: var(--border);
  border-radius: var(--radius-pill);
  background: var(--paper);
  font-size: 11px;
  cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed='true'], .chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.sort-select { max-width: 190px; min-height: 40px; font-size: var(--fs-xs); }
.view-toggle { display: none; border: var(--border); border-radius: var(--radius); overflow: hidden; }
.view-toggle button { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink-2); }
.view-toggle button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.view-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
@media (min-width: 992px) { .view-toggle { display: inline-flex; } }

.pagination { display: flex; gap: var(--s1); justify-content: center; margin-top: var(--s6); }
.pagination button {
  min-width: 40px;
  height: 40px;
  border: var(--border);
  background: var(--paper);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  cursor: pointer;
}
.pagination button[aria-current='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
  text-align: center;
  padding: var(--s8) var(--s4);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-2);
}
.empty-state h3 { font-size: var(--fs-lg); }
.empty-state p { font-size: var(--fs-sm); color: var(--steel); }

/* skeletons */
.skeleton-card { border: var(--border); border-radius: var(--radius); overflow: hidden; }
.skeleton-line, .skeleton {
  background: linear-gradient(90deg, var(--paper-2) 25%, var(--paper-3) 37%, var(--paper-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius);
}
.skeleton-line { height: 12px; margin: var(--s3); }
.skeleton-card .skeleton { aspect-ratio: 4 / 5; border-radius: 0; }
.skeleton-card .skeleton-line:first-of-type { width: 70%; }
.skeleton-card .skeleton-line:last-of-type { width: 40%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton-line, .skeleton { animation: none; } }

/* ------------------------------------------------------------- product --- */
.pdp { display: grid; gap: var(--s6); padding-block: var(--s5) var(--s7); }
@media (min-width: 900px) { .pdp { grid-template-columns: 1.05fr .95fr; gap: var(--s8); align-items: start; } }

.gallery { display: flex; flex-direction: column; gap: var(--s3); }
.stage {
  position: relative;
  background: var(--paper-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.stage img { width: 100%; height: 100%; object-fit: contain; padding: var(--s5); }
.zoom-hint {
  position: absolute;
  inset-block-end: var(--s3);
  inset-inline-end: var(--s3);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: var(--radius);
  pointer-events: none;
}
.thumbs { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 90px;
  padding: 4px;
  background: var(--paper-2);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb[aria-current='true'] { border-color: var(--ink); }

.pdp-info { display: flex; flex-direction: column; gap: var(--s3); }
.pdp-title { font-size: var(--fs-h2); }
.pdp-short { color: var(--ink-2); font-size: var(--fs-sm); }
.pdp-price { display: flex; align-items: baseline; gap: var(--s3); font-size: var(--fs-xl); }
.pdp-meta { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; font-size: var(--fs-xs); color: var(--steel); }

.opt-group { display: flex; flex-direction: column; gap: var(--s2); }
.opt-label { font-size: var(--fs-xs); font-weight: 600; }
.opt-values { display: flex; flex-wrap: wrap; gap: var(--s2); }
.opt {
  padding: 8px 12px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: var(--fs-xs);
  cursor: pointer;
}
.opt[aria-pressed='true'] { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.buy-row { display: flex; gap: var(--s3); align-items: stretch; margin-top: var(--s2); }
.buy-row .btn { flex: 1 1 auto; }
.buy-row .qty { flex: none; }

.trust-box {
  display: grid;
  gap: var(--s2);
  padding: var(--s4);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper-2);
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.trust-box li { display: flex; gap: var(--s2); align-items: flex-start; }
.trust-box li::before { content: '✓'; color: var(--ok); font-family: var(--font-mono); }

/* sticky mobile buy bar */
.buy-bar {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--gutter) calc(var(--s3) + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter: blur(8px);
  border-top: var(--border);
  transform: translateY(110%);
  transition: transform var(--dur) var(--ease);
}
.buy-bar[data-show='1'] { transform: none; }
body.has-buybar { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.buy-bar .price { font-size: var(--fs-base); }
@media (min-width: 900px) { .buy-bar { display: none; } }

.tabs { display: flex; gap: var(--s4); border-bottom: var(--border); margin-bottom: var(--s4); }
.tabs button {
  border: 0;
  background: none;
  padding: var(--s3) 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--steel);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tabs button[aria-selected='true'] { color: var(--ink); border-color: var(--accent); }
.tab-panel[hidden] { display: none; }
.tab-panel { font-size: var(--fs-sm); color: var(--ink-2); }

.spec-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.spec-table tr { border-bottom: var(--border); }
.spec-table th, .spec-table td { padding: var(--s3) 0; text-align: start; vertical-align: top; }
.spec-table th { font-weight: 500; color: var(--steel); width: 45%; }

.review-block { padding-block: var(--s4); border-bottom: var(--border); }
.review-head { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-xs); color: var(--steel); }
.review-block p { margin-top: var(--s2); font-size: var(--fs-sm); }
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 14px; height: 14px; fill: var(--warn); }
.stars svg.off { fill: var(--line-strong); }

/* ----------------------------------------------------------------- cart --- */
.cart-layout { display: grid; gap: var(--s6); padding-block: var(--s6); grid-template-columns: 1fr; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: 1.4fr .6fr; align-items: start; gap: var(--s7); } }
.cart-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: var(--s4);
  align-items: center;
  padding-block: var(--s4);
  border-bottom: var(--border);
}
.cart-row img { width: 80px; height: 100px; object-fit: contain; background: var(--paper-2); border-radius: var(--radius); }
.cart-table-head {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--steel);
  border-bottom: var(--border);
  padding-bottom: var(--s2);
}
@media (min-width: 700px) { .cart-table-head { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s4); } }
@media (max-width: 699px) {
  .cart-row { grid-template-columns: 1fr auto; gap: var(--s3); align-items: start; }
  .cart-row .prod { grid-column: 1 / -1; }
  .cart-row .prod img { width: 64px; height: 80px; }
  .cart-row .qty { justify-self: start; }
  .cart-row .line-total { justify-self: end; white-space: nowrap; text-align: end; }
}
.summary-card {
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper-2);
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
@media (min-width: 900px) { .summary-card { position: sticky; top: calc(var(--header-h) + var(--s4)); } }

/* ------------------------------------------------------------- checkout --- */
.checkout-layout { display: grid; gap: var(--s6); padding-block: var(--s5) var(--s8); grid-template-columns: 1fr; }
@media (min-width: 900px) { .checkout-layout { grid-template-columns: 1.25fr .75fr; gap: var(--s8); align-items: start; } }
.checkout-steps { display: flex; gap: var(--s3); font-family: var(--font-mono); font-size: 11px; color: var(--steel); margin-bottom: var(--s4); }
.checkout-steps span[aria-current='true'] { color: var(--ink); }
.pay-option {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s4);
  border: var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.pay-option[aria-checked='true'], .pay-option.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pay-option input { accent-color: var(--accent); width: 18px; height: 18px; }

/* ---------------------------------------------------------------- order --- */
.success-wrap { padding-block: var(--s8); display: flex; justify-content: center; }
.success-card {
  width: 100%;
  max-width: 640px;
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  text-align: center;
  align-items: center;
}
.success-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ok);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-size: 24px;
}
.order-number { font-size: var(--fs-xl); }
.order-card { border: var(--border); border-radius: var(--radius); padding: var(--s4); text-align: start; width: 100%; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--paper-2);
  font-size: 11px;
  font-weight: 600;
}
.status-pill[data-status='delivered'] { background: color-mix(in srgb, var(--ok) 14%, var(--paper)); color: var(--ok); }
.status-pill[data-status='canceled'] { background: color-mix(in srgb, var(--danger) 12%, var(--paper)); color: var(--danger); }

/* -------------------------------------------------------------- account --- */
.account-layout { display: grid; gap: var(--s6); padding-block: var(--s6); grid-template-columns: 1fr; }
@media (min-width: 900px) { .account-layout { grid-template-columns: 220px 1fr; gap: var(--s7); align-items: start; } }
.account-nav { display: flex; gap: var(--s2); overflow-x: auto; border-bottom: var(--border); padding-bottom: var(--s2); }
@media (min-width: 900px) { .account-nav { flex-direction: column; border-bottom: 0; } }
.account-nav button, .account-nav a {
  border: 0;
  background: none;
  padding: var(--s2) var(--s3);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: var(--radius);
  white-space: nowrap;
  text-align: start;
}
.account-nav [aria-current='true'] { background: var(--paper-2); color: var(--ink); font-weight: 600; }

.auth-card {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.auth-tabs { display: flex; gap: var(--s4); border-bottom: var(--border); }
.auth-tabs button {
  border: 0;
  background: none;
  padding: var(--s2) 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--steel);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.auth-tabs button[aria-selected='true'] { color: var(--ink); border-color: var(--accent); }

/* ----------------------------------------------------------- page / 404 --- */
.page-prose, [data-page-body] { max-width: 720px; font-size: var(--fs-sm); color: var(--ink-2); }
[data-page-body] h2 { margin-top: var(--s6); margin-bottom: var(--s3); color: var(--ink); font-size: var(--fs-h3); }
[data-page-body] h3 { margin-top: var(--s5); margin-bottom: var(--s2); color: var(--ink); }
[data-page-body] p { margin-bottom: var(--s3); }
[data-page-body] ul { list-style: disc; padding-inline-start: var(--s5); margin-bottom: var(--s3); }
[data-page-body] a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.page-shell { padding-block: var(--s7) var(--s8); }

.notfound { padding-block: var(--s9); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.notfound .code { font-family: var(--font-mono); font-size: var(--fs-h1); color: var(--accent); }

/* ------------------------------------------------------------ overlays --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--s4);
}
.modal[data-open='1'] { display: flex; }
.modal-bg { position: absolute; inset: 0; background: rgba(21, 19, 15, .45); }
.modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: var(--s5);
  box-shadow: var(--shadow-2);
}
.modal-card h2 { font-size: var(--fs-h3); margin-bottom: var(--s3); }

/* ------------------------------------------------------------ utilities --- */
/* Only hide reveal blocks when JS is actually running (html.js), so a script
   error can never leave the page blank. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  will-change: opacity, transform;
  transition: opacity 520ms cubic-bezier(.22,.61,.36,1), transform 520ms cubic-bezier(.22,.61,.36,1);
}
html.js [data-reveal].is-in,
html.js [data-reveal][data-shown='1'] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

[hidden] { display: none !important; }
.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;
}
.table-wrap { overflow-x: auto; }
.hr { height: 1px; background: var(--line); border: 0; margin-block: var(--s5); }

/* inline skeleton for a number that arrives after load */
.sk-num { display: inline-block; width: 2.6em; height: 1.05em; vertical-align: -0.15em; }

/* ------------------------------------------------- shop toolbar extras --- */
.search-box {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex: 1 1 220px;
  max-width: 380px;
  padding-inline: var(--s3);
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
}
.search-box svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: var(--steel);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.search-box input { border: 0; background: none; min-height: 44px; padding-inline: 0; }
.search-box input:focus { box-shadow: none; }

.result-line { font-family: var(--font-mono); font-size: 11px; color: var(--steel); white-space: nowrap; }
.price-slider { position: relative; width: 100%; max-width: 100%; height: 34px; margin: 4px 0 10px; }
.price-slider .ps-track {
  position: absolute; inset-inline: 0; top: 15px; height: 4px;
  border-radius: 999px; background: var(--line);
}
.price-slider .ps-fill {
  position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--accent);
  inset-inline-start: 0; width: 100%;
}
.price-slider input[type='range'] {
  position: absolute; inset-inline: 0; top: 6px; width: 100%; height: 22px; margin: 0;
  background: transparent; -webkit-appearance: none; appearance: none; pointer-events: none;
}
.price-slider input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto;
  width: 22px; height: 22px; border-radius: 50%; background: var(--paper);
  border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.18); cursor: pointer;
}
.price-slider input[type='range']::-moz-range-thumb {
  pointer-events: auto; width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--accent); cursor: pointer;
}
.price-slider input[type='range']::-webkit-slider-runnable-track { background: transparent; height: 22px; }
.price-slider input[type='range']::-moz-range-track { background: transparent; height: 22px; }

.range-row { display: flex; align-items: center; gap: var(--s2); }
.range-row input { min-height: 40px; padding: 8px var(--s3); font-family: var(--font-mono); font-size: var(--fs-xs); }
.range-row span { color: var(--steel); }

[data-mobile-filter-head] { display: none; }
@media (max-width: 991px) {
  [data-mobile-filter-head] { display: flex !important; margin-bottom: var(--s3); }
}

/* breadcrumb links */
.eyebrow a { color: var(--steel); }
.eyebrow a:hover { color: var(--ink); }

/* panels used by cart/checkout/account pages */
.panel {
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  padding: var(--s5);
}
.panel h2 { font-size: var(--fs-h3); margin-bottom: var(--s3); }

/* ---------------------------------------------- product page corrections --- */
/* DOM order is thumbs → stage; the stage is the hero image, so show it first */
.gallery { flex-direction: column; }
.gallery .stage { order: 1; }
.gallery .thumbs { order: 2; }
@media (min-width: 900px) { .gallery .thumbs { margin-top: var(--s1); } }

/* trust lines under the buy buttons */
.pdp-meta {
  display: grid;
  gap: var(--s2);
  padding: var(--s4);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper-2);
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.pdp-meta .line { display: flex; align-items: center; gap: var(--s2); line-height: 1.5; }
.pdp-meta .line svg, .trust-box svg, .value svg, .site-footer svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* variant swatch dot */
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line-strong); margin-inline-end: 6px; vertical-align: -1px; }

/* select: draw our own chevron */
.select, .sort-select, select {
  background-image: linear-gradient(45deg, transparent 50%, var(--steel) 50%), linear-gradient(135deg, var(--steel) 50%, transparent 50%);
  background-position: calc(0% + 14px) calc(50% + 2px), calc(0% + 19px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-inline-start: var(--s6);
}
html[dir='ltr'] .select, html[dir='ltr'] .sort-select, html[dir='ltr'] select {
  background-position: calc(100% - 19px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px);
  padding-inline-start: var(--s4);
  padding-inline-end: var(--s6);
}

/* cart page rows keep their image column aligned on small screens */
@media (max-width: 640px) {
  .cart-row { grid-template-columns: 64px 1fr; grid-template-areas: 'img body' '. actions'; }
  .cart-row img { grid-area: img; width: 64px; height: 80px; }
}

/* narrow phones: keep the header on one line without horizontal scroll */
@media (max-width: 480px) {
  .header-tools { gap: 0; }
  .icon-btn { width: 38px; height: 38px; }
  .icon-btn svg { width: 19px; height: 19px; }
  .lang-switch button { padding-inline: 7px; }
  .site-header .wrap { padding-inline: 12px; }
}
