/* سیلای — storefront and admin styles. The page is RTL, so spacing uses
   logical properties (inline-start is the right-hand side).

   The look follows the brand's logo: deep crimson with champagne
   lettering, on white. Photos sit on a cool stone gray with square
   corners; only controls are rounded, a little. */

@font-face {
  font-family: "Estedad";
  src: url("../fonts/Estedad-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f3f1;   /* stone: behind product photos and panels */
  --ink: #1c1617;
  --ink-2: #4d4547;
  --muted: #847b7d;
  --line: #e8e6e3;
  --brand: #710012;       /* the logo's crimson */
  --brand-dark: #5a000e;
  --brand-soft: #f8ecee;
  --brand-tint: #e9c9cf;
  --champagne: #cfc3a1;   /* the logo's lettering */
  --champagne-soft: #f6f2e8;
  --sale: #c8102e;
  --ok: #1f7a46;
  --ok-soft: #e5f3ea;
  --warn: #8f5208;
  --warn-soft: #fbf0df;
  --err: #b3261e;
  --err-soft: #fbe9e7;
  --info: #2a4a8a;
  --info-soft: #e8eefb;
  --star: #d99a1e;
  --hero-from: #f3f3f1;
  --hero-to: #f3f3f1;
  --radius: 10px;         /* panels */
  --radius-sm: 6px;       /* controls */
  --shadow: 0 1px 2px rgb(28 22 23 / 6%), 0 12px 32px rgb(28 22 23 / 10%);
  --header-h: 124px;
  --gap: 20px;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Estedad, Tahoma, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* full-bleed sections reach the window's edges */
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--brand); }
h1, h2, h3 { line-height: 1.45; }
p { margin: 0 0 12px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--brand-tint); }

.container { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: 24px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link { position: absolute; inset-inline-start: 16px; top: -100px; z-index: 200; background: var(--surface); padding: 8px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.center { text-align: center; }
td .muted.small, td del.small { display: block; }
.ltr-right { text-align: right; }

.icon {
  width: 20px; height: 20px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: middle;
}
.icon-fill { fill: currentColor; stroke: none; }

/* A section that spans the window, out of the page's centered column. */
.bleed { margin-inline: calc(50% - 50vw); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 650; font-size: 0.9375rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-outline { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: var(--champagne-soft); color: var(--brand-dark); }
.btn-champagne { background: var(--champagne); color: var(--brand-dark); }
.btn-champagne:hover { background: #ddd3b6; color: var(--brand-dark); }
.btn-line-light { border-color: rgb(255 255 255 / 45%); color: #fff; }
.btn-line-light:hover { border-color: #fff; background: rgb(255 255 255 / 8%); color: #fff; }
.btn-lg { height: 54px; padding: 0 30px; font-size: 1rem; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 0.8438rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Form controls ---------- */

input:not([type=radio], [type=checkbox], [type=file]), select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px;
  border: 1px solid #dcd9d5; border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(28 22 23 / 8%); }
input[type=radio], input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
[aria-invalid=true] { border-color: var(--err) !important; }
::placeholder { color: #aaa2a3; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
legend { font-weight: 700; font-size: 0.9062rem; padding: 0; margin-bottom: 8px; }
.field { display: block; margin-bottom: 16px; }
.field-inline { margin: 8px 0 0; max-width: 260px; }
.input-sm { max-width: 180px; }
.label { display: block; font-weight: 600; font-size: 0.875rem; margin-bottom: 6px; }
.hint { display: block; font-size: 0.7812rem; color: var(--muted); margin-top: 4px; }
.field-error { color: var(--err); font-size: 0.8125rem; margin: 4px 0 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.choice { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 0.875rem; cursor: pointer; }

/* ---------- Header ---------- */

.topbar { background: var(--brand); color: #fff; font-size: 0.8125rem; text-align: center; padding: 7px 16px; letter-spacing: 0; }
.topbar a { color: inherit; text-underline-offset: 3px; }
.header-sentinel { height: 0; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.site-header.stuck { box-shadow: 0 6px 24px rgb(28 22 23 / 8%); }
.header-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 32px; padding-block: 14px 10px; }
.menu-toggle { display: none; }
.logo { font-weight: 850; font-size: 2rem; color: var(--brand); text-decoration: none; line-height: 1.1; letter-spacing: -0.01em; }
.logo:hover { color: var(--brand-dark); }
.search { position: relative; display: flex; width: 100%; max-width: 560px; }
.search input {
  height: 46px; min-height: 46px; padding-inline: 46px 16px;
  border: 1px solid transparent; background: var(--surface-2);
}
.search input:focus { background: #fff; border-color: var(--ink); box-shadow: none; }
.search button {
  position: absolute; inset-inline-start: 4px; top: 50%; translate: 0 -50%;
  width: 38px; height: 38px; border: 0; border-radius: var(--radius-sm);
  display: grid; place-items: center; background: none; color: var(--ink-2); cursor: pointer;
}
.search button:hover { color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-link {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px;
  border-radius: var(--radius-sm); text-decoration: none; font-size: 0.875rem; white-space: nowrap;
}
.header-link:first-child { border: 1px solid var(--line); }
.header-link:hover { background: var(--surface-2); color: var(--ink); }
.cart-link .badge { position: absolute; top: 2px; inset-inline-start: 22px; }
.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 0.6875rem; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.badge[hidden] { display: none; }
.badge.bump { animation: bump .4s ease-out; }
@keyframes bump { 40% { transform: scale(1.35); } }

.main-nav > ul { list-style: none; display: flex; gap: 4px; margin: 0 auto; }
.main-nav a {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px 12px;
  text-decoration: none; font-size: 0.9062rem; font-weight: 550; color: var(--ink-2);
  box-shadow: inset 0 -2px 0 transparent; transition: box-shadow .15s, color .15s;
}
.main-nav > ul > li > a:hover { color: var(--ink); box-shadow: inset 0 -2px 0 var(--brand); }
.main-nav .icon { width: 18px; height: 18px; }
.main-nav .nav-sale { color: var(--sale); font-weight: 750; }
.main-nav .nav-end { margin-inline-start: auto; }
.has-sub { position: relative; }
.has-sub > a::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  rotate: 45deg; opacity: .5;
}
.sub {
  display: none; position: absolute; inset-inline-start: 0; top: 100%; z-index: 60;
  min-width: 220px; list-style: none; margin: 0; padding: 8px 0;
  background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--brand); box-shadow: var(--shadow);
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub { display: block; }
.sub a { padding: 8px 18px; box-shadow: none !important; }
.sub a:hover { background: var(--surface-2); color: var(--brand); }

main.container { padding-block: 28px 16px; }
.bleed-top { margin-top: -28px; }

/* ---------- Section headings ---------- */

.section { margin-block: 56px; }
.section-head { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.section-head h2 { font-size: 1.375rem; font-weight: 800; margin: 0; white-space: nowrap; }
/* A hairline runs from the heading to the "see all" link. */
.section-head h2::after { content: none; }
.section > .section-head::after { content: ""; order: 1; flex: 1; height: 1px; background: var(--line); }
.section > .section-head > a { order: 2; }
.section-head a:not(.btn) { color: var(--ink-2); font-size: 0.875rem; text-decoration: none; font-weight: 600; white-space: nowrap; }
.section-head a:not(.btn):hover { color: var(--brand); }
.section-head .page-title { margin: 0; }
.section-head-tight { margin-bottom: 12px; }
.eyebrow { color: var(--brand); font-weight: 700; font-size: 0.8438rem; margin: 0 0 8px; }

/* ---------- Home: hero ---------- */

/* The built-in slides, shown until the admin adds banners at the top:
   text on one side, three product drawings on the other. */
.hero-slide {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 40px;
  min-height: 440px; padding: 40px clamp(24px, 6.5cqi, 88px);
}
.hero-dark { background: #1f1a1b; color: #fff; }
.hero-brand { background: var(--brand); color: #fff; }
.hero-light { background: var(--champagne-soft); color: var(--ink); }
.hero h1, .hero-title {
  font-size: clamp(1.75rem, 3.6cqi, 3.25rem); font-weight: 850; line-height: 1.3; margin: 0 0 16px;
  color: var(--champagne); letter-spacing: -0.015em;
}
.hero-light .hero-title { color: var(--brand); }
.lead { font-size: 1.0625rem; color: rgb(255 255 255 / 82%); margin: 0 0 28px; max-width: 40ch; }
.hero-light .lead { color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.hero-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--surface-2); border-radius: var(--radius-sm); }
.hero-img-1 { margin-bottom: 48px; }
.hero-img-3 { margin-bottom: 24px; }

/* ---------- Home: kinds ---------- */

.kind-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.kind-strip a { display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; font-size: 0.8438rem; font-weight: 600; text-align: center; line-height: 1.5; }
.kind-strip img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  background: var(--surface-2); outline: 1px solid transparent; outline-offset: 3px; transition: outline-color .15s;
}
.kind-strip a:hover img { outline-color: var(--brand); }

/* ---------- Home: sale band and perks ---------- */

.promo {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 36px;
  margin-block: 56px; padding: 28px 40px; background: var(--champagne-soft); border-block: 1px solid #e7dfc9;
}
.promo-figure { margin: 0; font-size: clamp(3.5rem, 8vw, 6rem); font-weight: 900; line-height: 1; color: var(--brand); letter-spacing: -0.04em; }
.promo-figure small { font-size: .45em; font-weight: 800; margin-inline-start: 4px; }
.promo h2 { font-size: clamp(1.125rem, 2.2vw, 1.5rem); font-weight: 800; margin: 0 0 4px; }
.promo p { margin: 0; color: var(--ink-2); }

.perks {
  display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 64px;
  border-block: 1px solid var(--line);
}
.perk { display: flex; gap: 14px; align-items: center; padding: 22px 20px; }
.perk + .perk { border-inline-start: 1px solid var(--line); }
.perk .icon { width: 30px; height: 30px; color: var(--brand); stroke-width: 1.4; }
.perk b { display: block; font-size: 0.9062rem; line-height: 1.6; }
.perk span { font-size: 0.8125rem; color: var(--muted); }

/* ---------- Product cards ---------- */

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px var(--gap); }
.listing .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; min-width: 0; }
.card-link { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: inherit; }
.card-link:hover { color: inherit; }
.card-media { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.tag { display: inline-block; padding: 0 8px; font-size: 0.6875rem; font-weight: 700; white-space: nowrap; line-height: 22px; }
.card-media .tag { position: absolute; top: 10px; inset-inline-start: 10px; }
.tag-sale { background: var(--sale); color: #fff; }
.tag-new { background: var(--ink); color: #fff; }
.soldout {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgb(255 255 255 / 55%); color: var(--ink); font-weight: 800; font-size: 0.9375rem;
}
.card-title {
  margin: 12px 0 6px; font-size: 0.9062rem; font-weight: 700; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-kind { font-weight: 450; color: var(--ink-2); }
.card .price { margin-top: auto; }
.price-out { margin: auto 0 0; color: var(--muted); font-weight: 700; font-size: 0.875rem; text-align: end; }
.card-colors { display: flex; align-items: center; gap: 6px; min-height: 26px; margin-top: 8px; }
.card-count { margin-inline-start: auto; font-size: 0.75rem; color: var(--muted); }
.sw {
  width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 14%);
  outline: 1px solid transparent; outline-offset: 2px; transition: outline-color .15s;
}
.sw:hover { outline-color: var(--muted); }
.sw[aria-pressed=true] { outline-color: var(--ink); }
.dots { display: flex; gap: 4px; }
.dots i, .dot {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px;
  background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 14%);
}
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8125rem; }
.rating .icon { width: 15px; height: 15px; color: var(--star); }

/* Prices: the old price and discount above, the price to pay below. */
.price { display: flex; flex-direction: column; align-items: flex-end; gap: 0; margin: 0; line-height: 1.6; }
.price .was { display: flex; align-items: center; gap: 6px; }
.price .off {
  display: inline-block; padding: 0 6px; border-radius: 3px; background: var(--sale); color: #fff;
  font-size: 0.75rem; font-weight: 800; line-height: 20px;
}
.price del { color: var(--muted); font-size: 0.8125rem; }
.price strong { font-size: 1.0625rem; font-weight: 800; letter-spacing: -0.01em; }
.currency { font-size: 0.75rem; color: var(--ink-2); }

/* ---------- Listing ---------- */

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.8125rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a::after { content: "/"; margin-inline-start: 6px; color: #c9c3c4; }
.listing-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.listing-head h1 { margin: 0; font-size: 1.75rem; font-weight: 850; }
.listing-head p { margin: 0; }
.listing-head .listing-intro { margin: 6px 0 4px; max-width: 62ch; color: var(--ink-2); font-size: 0.9375rem; }
.filter-toggle { display: none; flex: none; }
.listing { display: grid; grid-template-columns: 250px 1fr; gap: 36px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 12px); }
.filters .field { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; display: inline-flex; cursor: pointer; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.swatch i {
  display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--c);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 16%);
  outline: 1.5px solid transparent; outline-offset: 2px; transition: outline-color .15s;
}
.swatch:hover i { outline-color: var(--muted); }
.swatch input:checked + i { outline-color: var(--ink); }
.swatch input:focus-visible + i, .swatch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.swatch-all span { display: grid; place-items: center; height: 28px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.7812rem; }
.swatch-all input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.swatches-lg .swatch i { width: 36px; height: 36px; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.switch { margin-bottom: 8px; }
.filter-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }

.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 40px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: 0.875rem;
}
.pagination [aria-current=page] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination .gap { border: 0; background: none; min-width: 20px; padding: 0; }

.empty { text-align: center; padding: 64px 16px; background: var(--surface-2); }
.empty > .icon { width: 48px; height: 48px; color: var(--muted); stroke-width: 1.25; margin: 0 auto 8px; display: block; }
.empty h1, .empty h2 { font-size: 1.25rem; margin: 0 0 6px; }
.empty p { margin: 0 0 20px; }
.empty .hero-actions { justify-content: center; }
.empty-sm { padding: 32px 16px; background: none; }
.error-page { padding-block: 88px; }
.error-code { font-size: 5.5rem; font-weight: 900; color: var(--brand); line-height: 1; margin: 0 0 12px; letter-spacing: -0.04em; }

/* ---------- Product page ---------- */

.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.gallery { position: sticky; top: calc(var(--header-h) + 12px); display: flex; flex-direction: column; gap: 12px; }
.gallery-main { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-2); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main .tag { position: absolute; top: 14px; inset-inline-start: 14px; }
.thumbs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumb { flex: none; width: 76px; padding: 0; border: 0; outline: 1.5px solid transparent; outline-offset: -1.5px; background: var(--surface-2); cursor: pointer; }
.thumb[aria-current=true] { outline-color: var(--ink); }
.product-info h1 { font-size: 1.875rem; font-weight: 850; margin: 0 0 4px; line-height: 1.4; }
.product-summary { font-size: 1rem; color: var(--ink-2); margin: 8px 0 0; }
.price-box {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px;
  margin: 20px 0 24px; padding: 18px 0; border-block: 1px solid var(--line);
}
.price-box .price { align-items: flex-start; }
.price-box .price strong { font-size: 1.75rem; }
.price-box .price del { font-size: 0.9375rem; }
.save { color: var(--ok); font-weight: 650; font-size: 0.8125rem; background: var(--ok-soft); padding: 2px 10px; border-radius: 3px; }
.buy legend { display: flex; align-items: baseline; gap: 12px; }
.buy legend b { font-weight: 500; }
.buy legend a { color: var(--brand); font-weight: 500; }
.buy fieldset.needs legend { color: var(--err); }
.buy fieldset.needs { animation: shake .35s; }
@keyframes shake { 25% { translate: 6px 0; } 75% { translate: -6px 0; } }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.size { position: relative; }
.size input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.size span {
  display: grid; place-items: center; min-width: 52px; height: 44px; padding: 0 10px;
  border: 1px solid #dcd9d5; border-radius: var(--radius-sm); background: var(--surface);
  font-weight: 650; transition: background-color .15s, border-color .15s, color .15s;
}
.size:hover span { border-color: var(--ink); }
.size input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.size input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Colors and sizes sold out: struck through, not pickable. */
.size.is-out span { color: var(--muted); background: repeating-linear-gradient(135deg, transparent 0 6px, var(--surface-2) 6px 7px); text-decoration: line-through; }
.size.is-out:hover span { border-color: var(--line); }
.size.is-out input, .swatch.is-out input { cursor: not-allowed; }
.swatch.is-out i { opacity: .35; background-image: linear-gradient(135deg, transparent 46%, var(--ink) 47% 53%, transparent 54%); }
.price .from { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.buy-row { display: flex; gap: 12px; }
.buy-row .btn { flex: 1; }
.qty select { width: 88px; height: 54px; text-align: center; }
.stock-low { color: var(--warn); font-weight: 600; font-size: 0.875rem; margin: 10px 0 0; }
.stock-out { color: var(--err); font-weight: 700; background: var(--err-soft); padding: 12px 16px; border-radius: var(--radius-sm); }
.mini-perks {
  list-style: none; display: grid; gap: 10px; margin: 24px 0 0; padding: 20px 0 0;
  border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-2);
}
.mini-perks li { display: flex; align-items: center; gap: 10px; }
.mini-perks .icon, .summary .icon { color: var(--brand); }

.product-details {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; margin-top: 64px; padding-top: 40px;
  border-top: 1px solid var(--line);
}
.product-details h2 { font-size: 1.25rem; margin: 0 0 12px; }
.checklist { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; }
.checklist li { display: flex; align-items: center; gap: 8px; }
.checklist .icon { width: 18px; height: 18px; color: var(--ok); }
.specs { margin: 0; }
.specs div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs div:last-child { border-bottom: 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 500; }

/* ---------- Cart & checkout ---------- */

.page-title { font-size: 1.75rem; font-weight: 850; margin: 0 0 20px; }
.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 36px; align-items: start; }
.cart-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cart-line { display: grid; grid-template-columns: 96px 1fr auto auto; align-items: center; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-thumb img { width: 96px; aspect-ratio: 4 / 5; object-fit: cover; background: var(--surface-2); }
.cart-line-title { font-weight: 700; font-size: 1rem; text-decoration: none; }
.cart-line-info p { margin: 2px 0; }
.cart-line-actions { display: flex; align-items: center; gap: 4px; }
.cart-line-actions form { margin: 0; }
.cart-line-actions select { width: 78px; }
.cart-line-total { margin: 0; min-width: 130px; text-align: end; font-weight: 800; }

.summary {
  position: sticky; top: calc(var(--header-h) + 12px); padding: 24px;
  background: var(--surface-2);
}
.summary h2 { font-size: 1.125rem; margin: 0 0 14px; }
.summary > .muted { margin: 12px 0 0; }
.totals { margin: 16px 0; }
.totals div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.totals dt { color: var(--ink-2); }
.totals dd { margin: 0; font-weight: 600; }
.totals .save { background: none; padding: 5px 0; border-radius: 0; font-size: inherit; }
.totals .save dt, .totals .save dd { color: var(--ok); }
.total-row { border-top: 1px solid #dcd9d5; margin-top: 6px; padding-top: 12px !important; font-size: 1.0625rem; }
.total-row dd { font-weight: 850; }
.ship-progress p { margin: 0 0 6px; }
.bar { height: 6px; background: #e3e1dd; border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.ship-free { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 0.875rem; }
.ship-free .icon { color: var(--ok); }
.mini-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mini-lines li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; }
.mini-lines img { width: 56px; aspect-ratio: 4 / 5; object-fit: cover; background: #fff; }
.mini-lines p { margin: 0; line-height: 1.6; }

.card-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.card-panel h2 { font-size: 1.125rem; margin: 0 0 16px; }
.form h2:not(:first-child) { margin-top: 28px; }
.pay-options { display: grid; gap: 10px; margin-bottom: 22px; }
.pay-option {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.pay-option:has(input:checked) { border-color: var(--ink); }
.pay-option input { accent-color: var(--brand); }
.pay-option .pay-logo { width: 44px; height: 44px; border-radius: 11px; }
.pay-option .pay-logo img { width: 32px; height: 32px; }
.pay-again form + form { margin-top: 10px; text-align: center; }
/* Payment gateways: a logo plate, tiles on the overview, one page per gateway. */
.pay-logo {
  flex: none; display: grid; place-items: center; width: 64px; height: 64px;
  border-radius: 16px; background: #fff; border: 1px solid var(--line); overflow: hidden;
}
.pay-logo img { width: 46px; height: 46px; object-fit: contain; }
.pay-logo-lg { width: 88px; height: 88px; border-radius: 22px; }
.pay-logo-lg img { width: 64px; height: 64px; }
.pay-logo-cod { color: var(--brand); }
.pay-logo-cod .icon { width: 30px; height: 30px; }
.pay-lead { max-width: 64ch; }
.pay-cod-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 20px 0 28px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.pay-cod-text { display: grid; gap: 2px; flex: 1 1 220px; }
.pay-cod-row .choice { margin: 0; }
.pay-tiles { list-style: none; margin: 0 0 36px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.pay-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; padding: 26px 16px 20px;
  text-align: center; color: inherit; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s;
}
.pay-tile:hover { border-color: var(--ink); }
.pay-tile:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pay-tile .pay-logo { margin-bottom: 10px; }
.pay-tile-name { font-size: 1.0625rem; }
.pay-tile-kind { color: var(--muted); font-size: 0.8125rem; }
.pay-state { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.pay-state::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #b7b3ad; }
.pay-state-on { color: var(--ok); }
.pay-state-on::before { background: var(--ok); }
.pay-state-warn { color: var(--warn); }
.pay-state-warn::before { background: var(--warn); }
.pay-state-bad { color: var(--err); }
.pay-state-bad::before { background: var(--err); }
.pay-notes { max-width: 72ch; color: var(--muted); }
.pay-notes h2 { font-size: 1rem; color: var(--ink); margin: 0 0 8px; }
.pay-notes ul { margin: 0; padding-inline-start: 20px; line-height: 2; }
.pay-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 18px; color: var(--muted); text-decoration: none; }
.pay-back:hover { color: var(--ink); }
.pay-back .icon { width: 16px; height: 16px; }
.pay-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.pay-head > div { flex: 1 1 200px; }
.pay-head .page-title { margin: 0 0 2px; }
.pay-head p { margin: 0; }
.pay-head .pay-state { margin: 0; }
.pay-form, .pay-callback, .pay-head { max-width: 760px; }
.pay-form .card-panel .choice + .choice { margin-top: 10px; }
.pay-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 8px; }
.pay-callback { margin-top: 28px; }
.pay-check { max-width: 760px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.pay-check-time { opacity: .75; font-size: 0.8125rem; }
.pay-check { margin: 0 0 20px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 0.875rem; line-height: 1.7; }
.pay-check.is-ok { background: var(--ok-soft); color: var(--ok); }
.pay-check.is-bad { background: var(--err-soft); color: var(--err); }
.pay-check.is-warn { background: var(--warn-soft); color: var(--warn); }
.saved-mark { color: var(--ok); font-weight: 600; font-size: 0.8125rem; }
.pay-attempts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; font-size: 0.875rem; }
.pay-attempts li { padding-top: 10px; border-top: 1px solid var(--line); }
.pay-option > span { display: flex; flex-direction: column; line-height: 1.6; }
.pay-option .icon { width: 28px; height: 28px; color: var(--brand); }

.notice { margin: 0 0 16px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--warn-soft); color: #6b4310; }
.notice-soft { background: var(--surface-2); color: var(--ink-2); }
.notice-error { background: var(--err-soft); color: var(--err); }
.notice a { color: var(--brand); font-weight: 600; }

.narrow { max-width: 440px; margin: 32px auto; }
.narrow h1 { display: flex; align-items: center; gap: 10px; font-size: 1.375rem; margin: 0 0 8px; }
.narrow h1 .icon { width: 26px; height: 26px; color: var(--brand); }

/* ---------- Orders ---------- */

.order-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.order-head h1 { font-size: 1.625rem; font-weight: 850; margin: 0; }
.order-head p { margin: 0; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.status { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 0.7812rem; font-weight: 700; white-space: nowrap; }
.status-new { background: var(--info-soft); color: var(--info); }
.status-awaiting_payment { background: var(--warn-soft); color: var(--warn); }
.status-processing { background: var(--warn-soft); color: var(--warn); }
.status-shipped { background: #e4f1f6; color: #1d5d7a; }
.status-delivered { background: var(--ok-soft); color: var(--ok); }
.status-cancelled { background: var(--err-soft); color: var(--err); }

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 28px; padding: 0; }
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 0.8438rem; color: var(--muted); }
.steps li + li::before {
  content: ""; position: absolute; top: 16px; inset-inline-start: -50%; width: 100%; height: 2px; background: var(--line);
}
.steps li.done::before { background: var(--ok); }
.step-dot {
  position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
}
.step-dot .icon { width: 16px; height: 16px; stroke-width: 2.5; opacity: 0; }
.steps li.done { color: var(--ink); font-weight: 600; }
.steps li.done .step-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.done .step-dot .icon { opacity: 1; }
.steps li.current .step-dot { box-shadow: 0 0 0 5px var(--ok-soft); }

.order-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.order-layout aside p, .order-layout section p { margin: 0 0 6px; }
.order-layout aside h2:not(:first-child) { margin-top: 22px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th { text-align: start; font-weight: 600; font-size: 0.7812rem; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot td { padding: 6px 8px; border: 0; }
.table tfoot tr:first-child td { border-top: 1px solid var(--line); padding-top: 12px; }
.table tfoot .total-row td { font-size: 1rem; font-weight: 800; border-top: 1px solid var(--line); padding-top: 12px; }
.items-table th:last-child, .items-table td:last-child { text-align: end; white-space: nowrap; }
.items-table a { text-decoration: none; font-weight: 600; }
.size-table { max-width: 380px; margin-top: 12px; }
.account-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.account-head .page-title { margin: 0; }
.account-head p { margin: 0; text-align: right; }

/* ---------- Help and information pages ---------- */

.prose { max-width: 780px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.toc a { padding: 5px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); text-decoration: none; font-size: 0.875rem; }
.toc a:hover { border-color: var(--ink); color: var(--ink); }
.prose section {
  margin-bottom: 8px; padding: 22px 0; scroll-margin-top: calc(var(--header-h) + 12px);
  border-bottom: 1px solid var(--line);
}
.prose h2 { font-size: 1.1875rem; margin: 0 0 8px; }
.prose a { color: var(--brand); }
.info-page { max-width: 760px; }
.info-page h2 { margin: 28px 0 8px; font-size: 1.25rem; }
.info-page p, .info-page li { color: var(--ink-2); }

/* ---------- Footer ---------- */

.site-footer { margin-top: 80px; padding: 56px 0 24px; background: var(--surface-2); color: var(--ink-2); }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.site-footer .logo { color: var(--brand); margin: 0 0 10px; font-size: 1.75rem; }
.site-footer .muted { color: var(--muted); }
.footer-brand > .muted { max-width: 38ch; font-size: 0.875rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-grid h2 { font-size: 0.9375rem; color: var(--ink); margin: 0 0 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.875rem; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid #e0ddd9; font-size: 0.8125rem; }
.socials { display: flex !important; gap: 8px !important; margin-top: 16px !important; }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #d6d2ce; }
.socials a:hover { border-color: var(--brand); }
.socials .icon { width: 18px; height: 18px; }
.enamad { display: inline-block; margin-top: 14px; padding: 4px; border-radius: var(--radius-sm); background: #fff; }
.enamad img { display: block; width: 88px; height: auto; }

/* ---------- Toasts and popup ---------- */

.toasts {
  position: fixed; bottom: 20px; inset-inline: 16px; z-index: 100;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto; max-width: 480px; padding: 12px 18px; border-radius: var(--radius-sm);
  background: var(--ink); color: #fff; font-size: 0.9062rem; box-shadow: 0 10px 30px rgb(0 0 0 / 20%);
  animation: toast-in .25s ease-out; transition: opacity .3s, translate .3s;
}
.toast-error { background: var(--err); }
.toast a { color: #fff; font-weight: 700; }
.toast.hide { opacity: 0; translate: 0 8px; }
@keyframes toast-in { from { opacity: 0; translate: 0 8px; } }

.popup {
  width: min(440px, calc(100% - 32px)); padding: 28px; border: 0; border-radius: var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgb(0 0 0 / 25%); text-align: center;
}
.popup::backdrop { background: rgb(20 14 15 / 55%); }
.popup h2 { margin: 0 0 8px; font-size: 1.25rem; outline: none; }
.popup p { margin: 0 0 16px; color: var(--ink-2); white-space: pre-line; }
.popup-close { position: absolute; inset-inline-end: 8px; top: 8px; }
.popup-image { display: block; width: 100%; max-height: 260px; object-fit: cover; margin-bottom: 16px; }

/* ---------- Banners (set in the admin) ---------- */

.banners { display: grid; gap: var(--gap); margin-block: 32px; }
.bleed > .banners { margin-block: 0 8px; }
/* Sliders loop: site.js copies a slide onto each end and jumps back from
   the copy. At the top of the page (.bleed) the current slide sits in the
   page's column with its neighbours peeking in at the sides; elsewhere
   each slide fills the width. Sizes are in cqi, the slider's width. */
.slider { --slide-w: 100cqi; --slide-gap: 12px; --slide-radius: var(--radius); position: relative; container-type: inline-size; }
.bleed .slider { --slide-w: min(1272px, 100cqi - 112px); --slide-gap: 16px; --slide-radius: 16px; padding-top: 20px; }
.slider-view { position: relative; }
.slides {
  display: flex; gap: var(--slide-gap); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  padding-inline: calc((100cqi - var(--slide-w)) / 2);
}
.slides::-webkit-scrollbar { display: none; }
.slide {
  display: flex; flex: 0 0 var(--slide-w); scroll-snap-align: center; scroll-snap-stop: always;
  border-radius: var(--slide-radius); overflow: hidden; transition: opacity .4s;
}
/* The neighbours are dimmed, so the eye stays on the current slide. */
.slider.is-ready .slide:not(.is-current) { opacity: .45; }
.slider.is-jumping .slide { transition: none; }
/* Slides can differ in height on phones, where some have a phone picture
   and some don't; each fills the tallest, cropping its picture to fit. */
.slide > * { flex: 1; min-width: 0; }

/* Arrows on the current slide's edges, for mouse users. */
.slider-arrow {
  position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px;
  margin-top: -22px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 92%); color: var(--ink);
  box-shadow: 0 2px 12px rgb(28 22 23 / 18%); cursor: pointer; opacity: 0; transition: opacity .2s, color .15s, scale .15s;
}
/* Room for the arrows beside a banner's text. */
.slide .banner-text { padding-inline: clamp(16px, 6.5cqi, 88px); }
.slider-prev { inset-inline-start: calc((100cqi - var(--slide-w)) / 2 + 16px); }
.slider-next { inset-inline-end: calc((100cqi - var(--slide-w)) / 2 + 16px); }
.slider-view:hover .slider-arrow, .slider-arrow:focus-visible { opacity: 1; }
.slider-arrow:hover { color: var(--brand); }
.slider-arrow:active { scale: .94; }
@media (hover: none) { .slider-arrow { display: none; } }

/* Dots under the slider. The current one is a bar that fills up until the
   next slide comes; pausing stops it. */
.slider-nav { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 10px; }
.slider-dots { display: flex; flex-wrap: wrap; justify-content: center; }
.slider-dots button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; transition: width .3s; }
.slider-dots span { position: relative; display: block; width: 7px; height: 7px; border-radius: 999px; background: #d4d0cc; overflow: hidden; transition: width .3s, background .2s; }
.slider-dots button:hover span { background: #b3aeaa; }
.slider-dots button[aria-current=true] { width: 40px; }
.slider-dots button[aria-current=true] span { width: 28px; background: var(--brand-tint); }
.slider-dots span::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--brand); transform-origin: right; scale: 0 1; }
.slider-dots button[aria-current=true] span::after { scale: 1 1; }
.slider.is-playing .slider-dots button[aria-current=true] span::after { animation: slide-timer var(--slide-time, 6s) linear; }
.slider.is-paused .slider-dots button[aria-current=true] span::after { animation-play-state: paused; }
@keyframes slide-timer { from { scale: 0 1; } }
.slider-pause {
  display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--muted); cursor: pointer;
}
.slider-pause:hover { color: var(--ink); background: var(--surface-2); }
.slider-pause .icon { width: 16px; height: 16px; }
.slider-pause .i-play, .slider-pause[aria-pressed=true] .i-pause { display: none; }
.slider-pause[aria-pressed=true] .i-play { display: inline; fill: currentColor; }
.banner-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.banner-grid > .w-half { grid-column: span 6; }
.banner-grid > .w-third { grid-column: span 4; }
.banner-grid > .w-quarter { grid-column: span 3; }

.banner { position: relative; display: block; overflow: hidden; background: var(--surface-2); color: inherit; text-decoration: none; }
.banner picture, .banner img { display: block; width: 100%; height: 100%; }
.banner img { object-fit: cover; transition: transform .6s; }
a.banner:hover img { transform: scale(1.015); }
/* Proportions; the admin recommends picture sizes that match them. */
.w-full.h-short { aspect-ratio: 4 / 1; }
.w-full.h-medium { aspect-ratio: 3 / 1; }
.w-full.h-tall { aspect-ratio: 12 / 5; }
.w-half.h-short { aspect-ratio: 2 / 1; }
.w-half.h-medium { aspect-ratio: 3 / 2; }
.w-half.h-tall { aspect-ratio: 1 / 1; }
.w-third.h-short { aspect-ratio: 4 / 3; }
.w-third.h-medium { aspect-ratio: 1 / 1; }
.w-third.h-tall { aspect-ratio: 4 / 5; }
.w-quarter.h-short { aspect-ratio: 4 / 3; }
.w-quarter.h-medium { aspect-ratio: 1 / 1; }
.w-quarter.h-tall { aspect-ratio: 4 / 5; }
/* A banner with its title under the picture, e.g. a category tile. */
.banner-card { display: flex; flex-direction: column; gap: 10px; color: inherit; text-decoration: none; }
.banner-caption { display: grid; gap: 2px; text-align: center; }
.banner-caption b { font-weight: 700; }
.banner-caption span { color: var(--muted); font-size: 0.875rem; }
a.banner-card:hover img { transform: scale(1.02); }

.banner-text {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start; gap: 6px; padding: clamp(16px, 5vw, 72px);
}
.banner-text p { margin: 0; max-width: 36ch; }
.banner-title { font-size: clamp(1.375rem, 3vw, 2.75rem); font-weight: 850; line-height: 1.35; letter-spacing: -0.01em; }
.w-half .banner-title, .w-third .banner-title, .w-quarter .banner-title { font-size: clamp(1.125rem, 2vw, 1.625rem); }
.banner-text .btn { margin-top: 10px; }
.banner-text.align-center { align-items: center; text-align: center; }
.banner-text.align-end { align-items: flex-end; text-align: end; }
/* A soft shade behind the text keeps it readable on any picture. In RTL
   the start side is on the right. */
.text-light { color: #fff; text-shadow: 0 1px 12px rgb(0 0 0 / 30%); }
.text-light.align-start { background: linear-gradient(to left, rgb(0 0 0 / 45%), rgb(0 0 0 / 0%) 70%); }
.text-light.align-center { background: rgb(0 0 0 / 28%); }
.text-light.align-end { background: linear-gradient(to right, rgb(0 0 0 / 45%), rgb(0 0 0 / 0%) 70%); }
.text-dark { color: var(--ink); }
.text-dark.align-start { background: linear-gradient(to left, rgb(255 255 255 / 75%), rgb(255 255 255 / 0%) 70%); }
.text-dark.align-center { background: rgb(255 255 255 / 45%); }
.text-dark.align-end { background: linear-gradient(to right, rgb(255 255 255 / 75%), rgb(255 255 255 / 0%) 70%); }

/* ---------- Home page builder sections ---------- */

/* Top strip: several messages, optionally scrolling. */
.topbar > a, .topbar > div { display: block; }
.topbar-sep { opacity: .7; }
.topbar-scroll { padding-inline: 0; overflow: hidden; }
.marquee { overflow: hidden; }
.marquee-track { display: inline-flex; white-space: nowrap; animation: marquee 30s linear infinite; }
.marquee-track span { padding-inline: 32px; }
.marquee-track span::after { content: "•"; margin-inline-start: 64px; opacity: .6; }
.topbar-scroll:hover .marquee-track { animation-play-state: paused; }
/* The track holds the messages twice; moving it by half loops seamlessly.
   In RTL the text enters from the left. */
@keyframes marquee { to { transform: translateX(50%); } }

/* Logo picture */
.logo-img { display: inline-flex; align-items: center; }
.logo-img img { display: block; width: auto; }
.logo-small img { height: 36px; }
.logo-medium img { height: 52px; }
.logo-large img { height: 72px; }

/* Product rows that scroll sideways */
.product-row { position: relative; }
.row-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * var(--gap)) / 5); gap: var(--gap);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  padding-bottom: 4px;
}
.row-track::-webkit-scrollbar { display: none; }
.row-item { scroll-snap-align: start; min-width: 0; display: flex; }
.row-item .card { flex: 1; }
.row-arrow {
  position: absolute; top: 34%; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: #fff; color: var(--ink);
  box-shadow: 0 2px 10px rgb(28 22 23 / 16%); cursor: pointer; transition: opacity .2s;
}
.row-arrow:hover { color: var(--brand); }
.row-arrow[disabled] { opacity: 0; pointer-events: none; }
.row-prev { inset-inline-start: -14px; }
.row-next { inset-inline-end: -14px; }
@media (hover: none) { .row-arrow { display: none; } }

/* The special offer: a rounded crimson panel with a countdown, and the
   products on white cards. The gradient runs from a brighter shade of the
   offer's color behind the heading (the start side) to a deep one, with a
   soft champagne glow; white text stays readable on all of it. */
.offer {
  --o: var(--offer, var(--brand));
  margin-block: 56px; border-radius: 20px; color: #fff; overflow: hidden;
  background:
    radial-gradient(circle at 92% 30%, rgb(207 195 161 / 22%), transparent 32%),
    linear-gradient(to left, color-mix(in oklab, var(--o), #e8455f 30%), var(--o) 38%, color-mix(in oklab, var(--o), #000 42%));
  box-shadow: 0 18px 40px -24px color-mix(in oklab, var(--o), transparent 20%);
}
.offer-inner {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: center;
  padding: 28px 28px 28px 32px;
}
.offer-head { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.offer-head h2 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2.125rem); font-weight: 900; line-height: 1.3; color: var(--champagne); }
.offer-sub { margin: -6px 0 0; color: rgb(255 255 255 / 80%); font-size: 0.875rem; }
.countdown { display: flex; gap: 6px; }
.countdown > span { display: flex; flex-direction: column; align-items: center; min-width: 50px; }
.countdown b {
  display: block; width: 100%; padding: 4px 0; border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font-size: 1.375rem; font-weight: 800; line-height: 1.5;
 
}
.countdown small { margin-top: 4px; font-size: 0.6875rem; color: rgb(255 255 255 / 75%); }
.offer-more { display: inline-flex; align-items: center; gap: 4px; color: #fff; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.offer-more:hover { color: var(--champagne); }
.offer-more .icon { width: 16px; height: 16px; }
.offer .card, .product-panel .card { background: #fff; color: var(--ink); padding: 10px 10px 8px; }
.offer .card { border-radius: 14px; box-shadow: 0 6px 18px -10px rgb(0 0 0 / 45%); }
.offer .card-media { border-radius: 9px; }
.countdown b { box-shadow: 0 2px 8px -2px rgb(0 0 0 / 30%); }
.offer .row-track, .product-panel .row-track { grid-auto-columns: calc((100% - 3 * 12px) / 4); gap: 12px; }
.offer .row-prev { inset-inline-start: -14px; }
.offer .row-next { inset-inline-end: -14px; }

/* A product row on a colored panel */
.product-panel {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: center;
  padding: 28px; background: var(--panel);
}
.panel-head { display: grid; gap: 16px; text-align: center; color: #fff; }
.panel-head h2 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2.125rem); font-weight: 900; line-height: 1.35; }
.panel-head a { color: #fff; font-weight: 600; text-decoration: none; }
.panel-head a:hover { text-decoration: underline; }

/* A single product shown large */
.spotlight {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; align-items: center;
  padding: clamp(24px, 4vw, 48px); background: var(--spot, var(--surface-2));
}
.spot-text h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 2.8vw, 2.5rem); font-weight: 900; line-height: 1.35; }
.spot-text h2 a { color: inherit; text-decoration: none; }
.spot-desc { margin: 0 0 16px; color: var(--ink-2); }
.spot-text .price { align-items: flex-start; margin-bottom: 20px; }
.spot-images { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.spot-images img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--surface); }
.spot-color { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; font-size: 0.8125rem; }
.spotlight-light { color: #fff; }
.spotlight-light .spot-desc, .spotlight-light .price, .spotlight-light .price del, .spotlight-light .currency { color: rgb(255 255 255 / 85%); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 15%); }

/* ---------- Admin ---------- */

/* The admin shell (menu, top bar, page header) lives in admin.css. */
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--brand); }
.admin-login .card-panel { width: 100%; max-width: 380px; border: 0; padding: 32px; }
.admin-login .logo { display: block; font-size: 2rem; margin: 0 0 4px; }
.admin-login h1 { font-size: 1.125rem; margin: 0 0 20px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat {
  display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
a.stat:hover { border-color: var(--brand); color: inherit; }
.stat-label { font-size: 0.8438rem; font-weight: 600; color: var(--ink-2); }
.stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1.4; }
.admin-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.admin-cols .card-panel .section-head h2 { font-size: 1.125rem; }

.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.tabs a { padding: 4px 12px; border-radius: 6px; text-decoration: none; font-size: 0.8438rem; color: var(--ink-2); }
.tabs a span { margin-inline-start: 4px; font-size: 0.75rem; color: var(--muted); }
.tabs a[aria-current=page] { background: var(--ink); color: #fff; }
.tabs a[aria-current=page] span { color: #cfc6c8; }
.search-sm { max-width: 300px; }
.search-sm input { height: 40px; min-height: 40px; background: #fff; border-color: var(--line); }
.search-sm button { width: 32px; height: 32px; }
.row-link { cursor: pointer; }
.row-link:hover td { background: #faf9f8; }
.row-link a { font-weight: 700; text-decoration: none; }
.thumb-sm { width: 44px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: var(--surface-2); }
.stock-badge { display: inline-block; min-width: 34px; padding: 1px 8px; border-radius: 4px; text-align: center; font-size: 0.7812rem; font-weight: 700; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.stock-badge.low { background: var(--warn-soft); color: var(--warn); }
.stock-badge.out { background: var(--err-soft); color: var(--err); }
.low-stock { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.low-stock li { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; }
.low-stock img { width: 40px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: var(--surface-2); }
.low-stock a { text-decoration: none; font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.timeline li { display: flex; align-items: center; gap: 12px; font-size: 0.875rem; }

.product-form .card-panel h2 { margin-bottom: 18px; }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 12px; }
.check-grid-sm { grid-template-columns: repeat(4, 1fr); }
.image-grid { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.image-grid li {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-bottom: 8px;
  background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden;
}
.image-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.image-grid .tag { position: absolute; top: 8px; inset-inline-start: 8px; }
.image-grid select { width: calc(100% - 16px); padding: 4px 8px; font-size: 0.8125rem; }
/* The variants table: one row per color and size. */
.variants-table td, .variants-table th { padding: 6px 8px; white-space: nowrap; }
.variants-table input { width: 100%; min-width: 72px; padding: 6px 8px; }
.variants-table td:nth-child(n+3) input { min-width: 96px; }
.variants-table tr.is-zero td:first-child { color: var(--muted); }
.variants-table tr.has-error input { border-color: var(--err); }
.variants-table .row-error td { padding-top: 0; border-top: 0; }
#variants > .btn { margin-top: 12px; }
.image-grid .icon-btn { position: absolute; top: 6px; inset-inline-end: 6px; background: rgb(255 255 255 / 92%); }
.upload { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.upload .hint { width: 100%; margin: 0; }
input[type=file] { font-size: 0.875rem; max-width: 100%; }

/* Admin: banners and appearance */
form.inline { display: inline; }
.nowrap { white-space: nowrap; }
.icon-btn[disabled] { opacity: .3; cursor: default; pointer-events: none; }
.banner-thumb { display: block; width: 104px; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 4px; background: var(--surface-2); }
.banners-table td > .small { display: block; }
.banner-preview {
  display: block; width: 100%; max-height: 220px; object-fit: contain; margin-bottom: 8px;
  border-radius: var(--radius-sm); background: var(--surface-2);
}
.banner-preview-m { max-width: 200px; }
.size-guide summary { cursor: pointer; font-weight: 600; font-size: 0.875rem; }
.size-guide .table { margin-top: 8px; }

.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.preset {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; font-size: 0.875rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.preset:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.preset-swatches { display: flex; }
.preset-swatches i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); border: 1px solid rgb(0 0 0 / 15%); }
.preset-swatches i + i { margin-inline-start: -4px; }
.color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.color-grid input[type=color] { padding: 4px; cursor: pointer; }
.font-sizes { display: flex; flex-wrap: wrap; gap: 4px 20px; }

.theme-preview {
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--p-bg); color: var(--p-text); font-size: calc(0.9375rem * var(--p-scale) / 100);
}
.tp-topbar { padding: 4px 8px; background: var(--p-brand); color: #fff; font-size: .85em; text-align: center; }
.tp-body { padding: 16px; }
.tp-body p { margin: 0 0 8px; }
.tp-logo { color: var(--p-brand); font-size: 1.6em; font-weight: 850; }
.tp-sale { padding: 1px 8px; border-radius: 3px; background: var(--p-sale); color: #fff; font-size: .8em; }
.tp-btn { display: inline-block; padding: 6px 16px; border-radius: var(--radius-sm); background: var(--p-brand); color: #fff; font-weight: 600; }

/* Admin: home page builder and site settings */
.sections-table td > .small { display: block; }
.add-section { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.add-section .field { margin: 0; min-width: 240px; }
.type-help { margin: 16px 0 0; padding-inline-start: 18px; }
.feature-rows { display: grid; gap: 8px; margin-bottom: 18px; }
.feature-row { display: grid; grid-template-columns: 130px 1fr 1.6fr; gap: 8px; }
input[type=color].color-sm { width: 80px; padding: 4px; }
.narrow-panel { max-width: 720px; }
.logo-preview { display: block; max-height: 80px; margin-bottom: 8px; padding: 8px; border-radius: var(--radius-sm); background: var(--surface-2); }

/* Link picker: a page of the shop, or any address. */
.link-picker { display: grid; gap: 8px; }
.link-picker [hidden] { display: none; }
.link-picker optgroup { font-weight: 700; color: var(--muted); }
.link-picker option { color: var(--ink); font-weight: 400; }

/* ---------- Admin: banner live preview ---------- */

.pv-panel[hidden] { display: none; }
.banner-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.banner-editor .admin-cols { grid-template-columns: 1fr; gap: 0; }
.pv-panel { position: sticky; top: 16px; margin: 0; }
.pv-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 14px; }
.pv-head h2 { margin: 0 !important; }
.pv-head .hint { flex-basis: 100%; margin: 0; }
.pv-head .notice { padding: 6px 12px; margin: 0; font-size: 0.8125rem; }
.pv-switch { display: flex; margin-inline-start: auto; padding: 3px; border: 1px solid var(--line); border-radius: 8px; }
.pv-switch button {
  display: flex; align-items: center; gap: 6px; padding: 4px 12px; border: 0; border-radius: 6px;
  background: none; color: var(--ink-2); font-size: 0.8125rem; cursor: pointer;
}
.pv-switch .icon { width: 16px; height: 16px; }
.pv-switch [aria-pressed=true] { background: var(--ink); color: #fff; }
.pv-view { margin: 0; min-width: 0; }
[data-pv-views=desktop] .pv-view-phone, [data-pv-views=phone] .pv-view-desktop { display: none; }
.pv-view-phone { max-width: 290px; margin-inline: auto; }
.pv-frame { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pv-view-phone .pv-frame { max-height: calc(100vh - 190px); border: 6px solid var(--ink); border-radius: 26px; }
/* Each stage is a real-size page, scaled down by site.js. */
.pv-stage {
  position: absolute; top: 0; inset-inline-start: 0; width: 1440px; transform-origin: top right;
  container-type: inline-size; pointer-events: none; font-size: 0.9375rem; line-height: 1.85;
}
.pv-stage.pv-phone { width: 390px; }
.pv-site { background: var(--bg); }
.pv-topbar { height: 32px; background: var(--brand); }
.pv-header { border-bottom: 1px solid var(--line); }
.pv-header-row { display: flex; align-items: center; gap: 32px; height: 78px; }
.pv-logo { font-weight: 850; font-size: 2rem; color: var(--brand); }
.pv-search { flex: 1; max-width: 560px; height: 46px; border-radius: var(--radius-sm); background: var(--surface-2); }
.pv-icons { width: 180px; height: 44px; margin-inline-start: auto; border-radius: var(--radius-sm); background: var(--surface-2); }
.pv-container { max-width: 1320px; margin-inline: auto; padding-inline: 24px; }
.pv-main { padding-bottom: 24px; }
.pv-main > .pv-container { padding-top: 28px; }
.pv-bleed .banners { margin-block: 0 8px; }
/* The stage isn't the window, so the shop's phone rules are repeated here. */
.pv-bleed .slider { --slide-w: min(1272px, 100cqi - 112px); --slide-gap: 16px; --slide-radius: 16px; padding-top: 20px; }
.pv-phone .pv-bleed .slider { --slide-w: calc(100cqi - 40px); --slide-gap: 8px; --slide-radius: 12px; padding-top: 12px; }
.pv-stage .slides { overflow: hidden; }
/* The previous slide goes off the start side, leaving its edge in view. */
.pv-peek > .slide:first-child { margin-inline-start: calc(-1 * (var(--slide-w) + var(--slide-gap))); }
.pv-ghost {
  display: grid; place-items: center; height: 72px; border-radius: var(--radius-sm);
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, #fafaf9 10px 20px);
  color: var(--muted); font-size: 1rem;
}
.pv-ghost-tall { height: 140px; margin-top: 32px; }
.pv-stage .banner-text { padding: clamp(16px, 5cqi, 72px); }
.pv-stage .banner-title { font-size: clamp(1.375rem, 3cqi, 2.75rem); }
.pv-stage :is(.w-half, .w-third, .w-quarter) .banner-title { font-size: clamp(1.125rem, 2cqi, 1.625rem); }
.pv-noimg {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, #ecebe8 0 12px, #f3f3f1 12px 24px); color: var(--muted); font-size: 1.125rem;
}
.pv-self { position: relative; outline: 3px solid var(--brand); outline-offset: -3px; }
.pv-badge {
  position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; padding: 2px 10px; border-radius: 4px;
  background: var(--brand); color: #fff; font-size: 0.8125rem; font-weight: 700;
}
/* The phone stage follows the shop's narrow-screen rules. */
.pv-phone .pv-container { padding-inline: 16px; }
.pv-phone .pv-header-row { height: 56px; gap: 12px; }
.pv-phone .pv-logo { font-size: 1.5rem; }
.pv-phone .pv-search { display: none; }
.pv-phone .pv-icons { width: 70px; height: 36px; }
.pv-phone .banners { gap: 12px; margin-block: 20px; }
.pv-phone .banner-grid { gap: 12px; }
.pv-phone .banner-grid > .w-half, .pv-phone .banner-grid > .w-third { grid-column: span 12; }
.pv-phone .banner-grid > .w-quarter { grid-column: span 6; }
.pv-phone .banner.has-mobile.h-short { aspect-ratio: 2 / 1; }
.pv-phone .banner.has-mobile.h-medium { aspect-ratio: 4 / 3; }
.pv-phone .banner.has-mobile.h-tall { aspect-ratio: 1 / 1; }
.pv-phone .banner-text { padding: 16px 20px; }
.pv-phone .pv-ghost { height: 70px; }
@media (max-width: 1200px) {
  .banner-editor { grid-template-columns: 1fr; }
  .pv-panel { position: static; order: -1; }
  .pv-view-phone .pv-frame { max-height: 560px; }
}

/* ---------- Admin: dashboard ---------- */

.dash-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 20px; }
.dash-head .page-title { margin: 0; }
.dash-head p { margin: 0; }
.range { display: flex; padding: 3px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.range a { padding: 5px 14px; border-radius: 6px; text-decoration: none; font-size: 0.8438rem; color: var(--ink-2); white-space: nowrap; }
.range a:hover { color: var(--ink); background: var(--surface-2); }
.range a[aria-current=page] { background: var(--ink); color: #fff; font-weight: 600; }

/* Orders that need the shop's attention */
.pipeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.pipe {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.pipe:hover { border-color: var(--ink); color: inherit; }
.pipe b { font-size: 1.75rem; font-weight: 800; line-height: 1; min-width: 1.4em; text-align: center; color: var(--muted); }
.pipe span { display: flex; flex-direction: column; font-size: 0.875rem; font-weight: 650; line-height: 1.5; }
.pipe small { font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.pipe-active { border-inline-start: 3px solid var(--brand); }
.pipe-active b { color: var(--brand); }

/* Headline figures */
.kpis { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  position: relative; display: flex; flex-direction: column; min-width: 0; padding: 16px 18px 52px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.kpi p { margin: 0; }
.kpi-label { font-size: 0.8125rem; font-weight: 650; color: var(--ink-2); }
.kpi-value { font-size: 1.625rem; font-weight: 800; line-height: 1.5; letter-spacing: -0.01em; }
.kpi-label small { font-weight: 400; color: var(--muted); }
.kpi-value small { font-size: 0.75rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.kpi-hero .kpi-value { font-size: 3rem; line-height: 1.25; margin-block: 4px; }
.kpi-hero { background: var(--brand); border-color: var(--brand); color: #fff; }
.kpi-hero .kpi-label { color: var(--champagne); }
.kpi-hero .kpi-label small { color: rgb(255 255 255 / 60%); }
.kpi-hero .kpi-value small, .kpi-hero .kpi-delta .muted { color: rgb(255 255 255 / 70%); }
.kpi-delta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; font-size: 0.7812rem; font-weight: 650; }
.kpi-delta .icon { width: 15px; height: 15px; stroke-width: 2.4; }
.kpi-delta .muted { font-weight: 400; }
.is-good { color: var(--ok); }
.is-bad { color: var(--err); }
.delta-flat { color: var(--muted); }
.kpi-hero .is-good { color: #9fe0b5; }
.kpi-hero .is-bad { color: #ffb4ab; }
.spark { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 40px; }
.spark path { fill: none; stroke: #c9c3c4; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.kpi-hero .spark path { stroke: var(--champagne); stroke-width: 2; }

.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { min-width: 0; padding: 20px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.panel-wide { grid-column: 1 / -1; }
.panel .panel-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 16px; text-align: start; color: inherit; }
.panel .panel-head h2 { margin: 0; font-size: 1rem; font-weight: 750; line-height: 1.5; }
.panel .panel-head p { margin: 0; }
.panel .panel-head a { color: var(--ink-2); font-size: 0.8125rem; font-weight: 600; }
.panel-foot { margin: 12px 0 0; }
.chart-empty { margin: 0; padding: 28px 16px; text-align: center; color: var(--muted); font-size: 0.875rem; background: var(--surface-2); border-radius: var(--radius-sm); }

/* The sales chart, drawn by the server in a 720×240 box. */
.chart { display: block; width: 100%; height: auto; direction: ltr; overflow: visible; }
.chart .grid-line { stroke: #ecebe8; stroke-width: 1; shape-rendering: crispEdges; }
.chart .tick { fill: var(--muted); font-size: 11px; }
.chart .xlabel { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.chart .bar { fill: #a82639; transition: fill .15s; }
.chart .hit { fill: transparent; }
.chart .col { outline: none; cursor: default; }
.chart .col:hover .bar, .chart .col:focus-visible .bar { fill: var(--brand-dark); }
.chart .col:focus-visible .hit { fill: rgb(113 0 18 / 6%); }
.chart-empty + .chart { display: none; }
.table-view { margin-top: 8px; font-size: 0.8125rem; }
.table-view summary { cursor: pointer; color: var(--muted); width: max-content; }
.table-view .table { margin-top: 8px; }
.chart-tip {
  position: absolute; z-index: 300; max-width: 260px; padding: 7px 11px; border-radius: var(--radius-sm);
  background: var(--ink); color: #fff; font-size: 0.8125rem; line-height: 1.7; white-space: pre-line;
  pointer-events: none; box-shadow: 0 6px 20px rgb(0 0 0 / 18%);
}

/* Funnel */
.funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.funnel li { display: grid; gap: 4px; }
.funnel-text { display: flex; justify-content: space-between; gap: 12px; font-size: 0.875rem; }
.funnel-text b { font-weight: 750; }
.funnel-track { height: 10px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.funnel-track i { display: block; height: 100%; border-radius: 3px; }
.funnel-next { font-size: 0.75rem; color: var(--muted); }

/* Category split: one tall bar cut into parts. */
.split { display: flex; gap: 2px; height: 28px; margin-bottom: 10px; }
.split span {
  display: flex; align-items: center; padding-inline: 8px; border-radius: 4px; min-width: 4px;
  color: #fff; font-size: 0.75rem; font-weight: 700; outline: none;
}
.split span:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 16px; padding: 0; font-size: 0.8125rem; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; }

/* Ranked rows with a bar */
.rank { width: 100%; border-collapse: collapse; font-size: 0.8438rem; }
.rank th { width: 34%; padding: 6px 0; text-align: start; font-weight: 600; line-height: 1.4; }
.rank th small { display: block; font-size: 0.7188rem; font-weight: 400; color: var(--muted); }
.rank td { padding: 6px 0 6px 0; }
.rank td.num { width: 1%; padding-inline-start: 12px; white-space: nowrap; text-align: end; font-weight: 650; }
.rank-bar { display: block; height: 8px; background: var(--surface-2); border-radius: 0 4px 4px 0; }
.rank-bar i { display: block; height: 100%; background: #a82639; border-radius: 0 4px 4px 0; }
.top-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.top-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.top-list img { width: 40px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: var(--surface-2); }
.top-name { display: grid; gap: 4px; min-width: 0; font-size: 0.8438rem; }
.top-name a { text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-num { display: flex; flex-direction: column; align-items: flex-end; font-size: 0.8438rem; line-height: 1.5; }
.top-num b { font-weight: 700; }
.top-num small { color: var(--muted); font-size: 0.75rem; }

/* Sales by province: a map of Iran beside the ranked list. */
.geo { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.geo-map { margin: 0; }
.geo-map svg { display: block; width: 100%; height: auto; }
.geo-map path {
  fill: #e6e4e0; stroke: #fff; stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke;
  transition: fill .15s; cursor: default;
}
.geo-map path.h1 { fill: #f0d4d8; }
.geo-map path.h2 { fill: #dd9aa4; }
.geo-map path.h3 { fill: #b85a68; }
.geo-map path.h4 { fill: #710012; }
.geo-map path:hover { stroke: var(--ink); stroke-width: 1.5; }
.geo-map path:hover:not(.h0) { filter: brightness(0.92); }
.geo-label {
  fill: var(--ink); font-size: 11px; font-weight: 700; text-anchor: middle; dominant-baseline: middle;
  pointer-events: none; paint-order: stroke; stroke: rgb(255 255 255 / 70%); stroke-width: 3px;
}
.geo-label-light { fill: #fff; stroke: rgb(0 0 0 / 25%); }
.geo-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; font-size: 0.75rem; color: var(--ink-2); }
.geo-legend span { display: flex; align-items: center; gap: 5px; }
.geo-legend i { width: 14px; height: 14px; border-radius: 3px; }
.geo-legend i.h0 { background: #e6e4e0; }
.geo-legend small { flex-basis: 100%; }
@media (max-width: 900px) { .geo { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .geo-label { font-size: 17px; } }

/* When orders come in: a week by three-hour blocks. */
.heat-wrap { overflow-x: auto; }
.heat { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 0.75rem; }
.heat th { font-weight: 500; color: var(--muted); white-space: nowrap; }
.heat thead th { text-align: start; padding-bottom: 2px; }
.heat tbody th { text-align: start; padding-inline-end: 6px; }
.heat td { height: 24px; min-width: 26px; border-radius: 3px; outline: none; }
.heat td:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.h0 { background: var(--surface-2); }
.h1 { background: #f0d4d8; }
.h2 { background: #dd9aa4; }
.h3 { background: #b85a68; }
.h4 { background: #710012; }
.heat-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; margin: 10px 0 0; }
.heat-legend i { width: 14px; height: 14px; border-radius: 3px; }

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-hero { grid-column: span 3; }
}

@media (max-width: 1100px) {
  .kind-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .row-track { grid-auto-columns: calc((100% - 3 * var(--gap)) / 4); }
}

@media (max-width: 900px) {
  :root { --header-h: 112px; --gap: 14px; }
  .container { padding-inline: 16px; }
  .header-row { grid-template-columns: auto 1fr auto; gap: 10px 4px; padding-block: 10px; }
  .menu-toggle { display: inline-grid; }
  .logo { font-size: 1.625rem; }
  .search { grid-column: 1 / -1; order: 3; max-width: none; }
  .header-link { padding: 0 10px; }
  .header-link:first-child { border: 0; }
  .header-link > span:not(.badge) { display: none; }
  .main-nav { display: none; border-top: 1px solid var(--line); max-height: calc(100vh - 120px); overflow-y: auto; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; padding-block: 8px; }
  .main-nav a { padding: 10px 4px; box-shadow: none !important; }
  .main-nav .nav-end { margin: 0; }
  .has-sub > a::after { display: none; }
  .sub { display: block; position: static; box-shadow: none; border: 0; padding: 0 16px 6px 0; min-width: 0; background: none; }
  .sub a { padding: 6px 4px; font-size: 0.875rem; }
  .has-sub > a { font-weight: 750; color: var(--ink); }

  .hero-slide { grid-template-columns: 1fr; align-content: start; gap: 24px; min-height: 0; padding-block: 32px; }
  .hero-art { max-width: 420px; }
  .kind-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
  .kind-strip li { flex: 0 0 82px; scroll-snap-align: start; }
  .promo { grid-template-columns: auto 1fr; padding: 24px; }
  .promo .btn { grid-column: 1 / -1; justify-self: start; }
  .perks { grid-template-columns: 1fr 1fr; }
  .perk:nth-child(3) { border-inline-start: 0; }
  .perk:nth-child(n+3) { border-top: 1px solid var(--line); }

  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-toggle { display: inline-flex; }
  .listing { grid-template-columns: 1fr; gap: 16px; }
  .filters { display: none; position: static; }
  .filters.open { display: block; }

  .row-track { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); }
  .offer-inner, .product-panel { grid-template-columns: 1fr; gap: 18px; }
  .offer .row-track, .product-panel .row-track { grid-auto-columns: calc((100% - 2 * 12px) / 3); }
  .spotlight { grid-template-columns: 1fr; }

  .product, .product-details, .cart-layout, .checkout-layout, .order-layout, .admin-cols { grid-template-columns: 1fr; }
  .product { gap: 24px; }
  .gallery, .summary { position: static; }
  .product-details { gap: 24px; }
  .product-info h1 { font-size: 1.5rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }

  .dash-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 600px) {
  body { font-size: 0.9062rem; }
  .topbar { font-size: 0.75rem; }
  .section { margin-block: 40px; }
  .grid, .listing .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .row-track, .offer .row-track, .product-panel .row-track { grid-auto-columns: 44%; }
  .card-title { font-size: 0.8438rem; }
  .price strong { font-size: 0.9688rem; }
  .form-row { grid-template-columns: 1fr; }
  .perks { grid-template-columns: 1fr; }
  .perk + .perk { border-inline-start: 0; border-top: 1px solid var(--line); }
  .perk { padding: 14px 4px; }
  .promo-figure { font-size: 3.5rem; }
  .bleed .slider { --slide-w: calc(100cqi - 40px); --slide-gap: 8px; --slide-radius: 12px; padding-top: 12px; }
  .hero-slide { padding: 24px 20px; }
  .hero .lead { font-size: 0.9375rem; margin-bottom: 20px; }
  .hero-art { gap: 8px; }
  .hero-img-1 { margin-bottom: 28px; }
  .hero-img-3 { margin-bottom: 14px; }
  .offer { border-radius: 16px; margin-block: 40px; }
  .offer-inner { padding: 22px 14px; }
  .offer { background:
    radial-gradient(circle at 50% 0%, rgb(207 195 161 / 20%), transparent 45%),
    linear-gradient(to bottom, color-mix(in oklab, var(--o), #e8455f 26%), var(--o) 40%, color-mix(in oklab, var(--o), #000 40%)); }
  .countdown > span { min-width: 44px; }
  .product-panel { padding: 16px; }
  .spot-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .banners { gap: 12px; margin-block: 20px; }
  .banner-grid { gap: 12px; }
  .banner-grid > .w-half, .banner-grid > .w-third { grid-column: span 12; }
  .banner-grid > .w-quarter { grid-column: span 6; }
  .banner.has-mobile.h-short { aspect-ratio: 2 / 1; }
  .banner.has-mobile.h-medium { aspect-ratio: 4 / 3; }
  .banner.has-mobile.h-tall { aspect-ratio: 1 / 1; }
  .banner-text { padding: 16px 20px; }
  .logo-medium img { height: 40px; }
  .logo-large img { height: 52px; }
  .feature-row { grid-template-columns: 1fr; }
  .color-grid { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 80px 1fr; gap: 6px 12px; align-items: start; }
  .cart-thumb { grid-row: span 3; }
  .cart-thumb img { width: 80px; }
  .cart-line-total { text-align: start; min-width: 0; }
  .card-panel { padding: 18px; }
  .steps, .steps li { font-size: 0.75rem; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 1.375rem; }
  .check-grid-sm { grid-template-columns: repeat(4, 1fr); }
  .toolbar .search-sm { max-width: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi-hero { grid-column: span 2; }
  .kpi-hero .kpi-value { font-size: 2.25rem; }
  .kpi { padding: 14px 14px 46px; }
  .kpi-value { font-size: 1.375rem; }
  .panel { padding: 16px; }
  .range { width: 100%; }
  .chart .tick, .chart .xlabel { font-size: 17px; }
  .range a { flex: 1; text-align: center; padding-inline: 6px; }
}

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

@media print {
  .topbar, .site-header, .site-footer, .admin-nav, .toasts, .no-print { display: none !important; }
  body, body.admin { background: #fff; }
  .admin-shell { display: block; }
  .admin-main { padding: 0; }
  .card-panel { border: 0; padding: 0; }
  .order-layout { grid-template-columns: 1fr 1fr; }
}
