:root {
  --accent: #8A4B1F;
  --paper: #FBF7F1;
  --surface: #FFFFFF;
  --sand: #F3EBDF;
  --line: #E4D8C8;
  --ink: #2A211B;
  --muted: #6B5B4D;
  --sale: #A5382B;
  --bad: #A5382B;
  --good: #2F6B4F;
  --warn: #8A5A00;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  text-align: start;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: start; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: "Noto Naskh Arabic", Vazirmatn, serif; font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 32px; }
.skip { position: absolute; inset-inline-start: 16px; top: -64px; background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 8px; z-index: 30; }
.skip:focus { top: 8px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: var(--paper); border-block-end: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 32px; padding-block: 12px; }
.brand { display: flex; flex-direction: column; align-items: center; line-height: 1.1; min-height: 44px; justify-content: center; flex: none; text-decoration: none; }
.brand b { font-family: "Noto Naskh Arabic", serif; font-size: 30px; font-weight: 700; }
.brand small { font-size: 10px; letter-spacing: .32em; color: var(--muted); direction: ltr; margin-inline-start: .32em; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding-inline: 16px; min-height: 48px; max-width: 620px; }
.search:focus-within { border-color: var(--ink); }
.search svg { flex: none; color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; font-size: 16px; padding: 0; }
.search input::placeholder { color: var(--muted); }
.nav { display: flex; gap: 4px; overflow-x: auto; padding-block-end: 8px; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; padding-inline: 12px; border-radius: 8px; font-size: 15px; color: var(--muted); text-decoration: none; transition: background-color 160ms ease, color 160ms ease; }
.nav a.on { color: var(--ink); font-weight: 600; background: var(--sand); }

/* Stories */
.stories { display: grid; grid-auto-flow: column; grid-auto-columns: 88px; gap: 12px; overflow-x: auto; padding-block: 20px 16px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.story { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; width: 88px; }
.story i { display: block; position: relative; width: 76px; height: 76px; border-radius: 50%; padding: 3px; border: 2px solid var(--accent); transition: transform 160ms var(--ease); }
.story img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; background: var(--sand); }
.story em { position: absolute; inset-block-end: -2px; inset-inline-end: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; }
.story span { font-size: 13px; text-align: center; line-height: 1.5; font-weight: 500; }
.story:active i { transform: scale(.96); }

/* Slider */
.slider { position: relative; aspect-ratio: 1704 / 923; border-radius: 24px; overflow: hidden; background: var(--sand); }
.slide { position: absolute; inset: 0; display: block; opacity: 0; visibility: hidden; overflow: hidden; transition: opacity 500ms var(--ease), visibility 0s linear 500ms; }
.slide.on { opacity: 1; visibility: visible; transition: opacity 500ms var(--ease); }
.slide picture { display: block; width: 100%; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide.on img { animation: settle 6s ease-out both; }
@keyframes settle { from { transform: scale(1.035); } to { transform: none; } }
.ctrl { position: absolute; top: 50%; margin-block-start: -24px; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; transition: transform 160ms var(--ease); z-index: 2; }
.ctrl:active { transform: scale(.94); }
.ctrl.prev { inset-inline-start: 16px; }
.ctrl.next { inset-inline-end: 16px; }
.dots { position: absolute; inset-block-end: 12px; inset-inline-start: 50%; transform: translateX(50%); display: flex; align-items: center; background: #fff; border-radius: 22px; padding-inline: 8px; z-index: 2; }
.dot { width: 32px; height: 44px; display: flex; align-items: center; justify-content: center; }
.dot i { display: block; width: 8px; height: 8px; border-radius: 4px; background: var(--muted); transition: width 240ms var(--ease), background-color 160ms ease; }
.dot.on i { width: 22px; background: var(--ink); }
.pause { width: 36px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.pause .icon-play { display: none; }
.pause.paused .icon-play { display: block; }
.pause.paused .icon-pause { display: none; }

/* Sections and product rows */
.section { padding-block: 48px 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-block-end: 24px; }
.head h2 { font-size: 30px; line-height: 1.4; }
.head p { color: var(--muted); font-size: 15px; }
.more { flex: none; min-height: 44px; display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 15px; text-decoration: none; border-block-end: 1px solid transparent; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(208px, 232px); gap: 16px; overflow-x: auto; padding-block-end: 12px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; width: 100%; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; scroll-snap-align: start; text-decoration: none; transition: border-color 160ms ease, transform 160ms var(--ease); }
.card:active { transform: scale(.985); }
.pic { display: block; position: relative; aspect-ratio: 1; background: #fff; overflow: hidden; }
.pic img { width: 100%; height: 100%; object-fit: contain; transition: transform 240ms var(--ease); }
.tag { position: absolute; top: 8px; inset-inline-start: 8px; background: #fff; color: var(--sale); border-radius: 8px; padding-inline: 8px; font-size: 13px; font-weight: 700; line-height: 24px; }
.info { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 16px; flex: 1; }
.name { font-weight: 600; font-size: 15px; line-height: 1.6; }
.sub { font-size: 13px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.price { margin-block-start: auto; padding-block-start: 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-weight: 700; font-size: 15px; }
.old { font-size: 13px; font-weight: 400; color: var(--muted); text-decoration: line-through; }
.noprice { margin-block-start: auto; padding-block-start: 8px; font-size: 13px; color: var(--muted); }

/* Scent finder */
.finder { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); scroll-margin-top: 140px; }
.finderImg { min-height: 100%; position: relative; background: var(--sand); }
.finderImg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.finderBody { padding: 40px; display: flex; flex-direction: column; gap: 20px; }
.finderBody h2 { font-size: 30px; line-height: 1.4; }
.finderBody > p { color: var(--muted); }
.group { margin-block-end: 16px; }
.group:last-child { margin-block-end: 0; }
.group legend, .groupTitle { display: block; font-size: 14px; font-weight: 600; margin-block-end: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; min-height: 44px; padding-inline: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-size: 15px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none; transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease); }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip:active { transform: scale(.97); }
.chip.on, .chip:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding-inline: 24px; border-radius: 12px; font-weight: 600; text-decoration: none; text-align: center; transition: transform 160ms var(--ease), background-color 160ms ease; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--ink); color: var(--ink); }
.btn.off { background: var(--sand); color: var(--muted); cursor: not-allowed; }
.btn.off:active { transform: none; }
.btn.primary:disabled { background: var(--muted); cursor: progress; }
.btn.full { width: 100%; }

/* Gallery */
.looks { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 272px); gap: 16px; overflow-x: auto; padding-block-end: 12px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.look { display: flex; flex-direction: column; gap: 8px; scroll-snap-align: start; width: 100%; text-decoration: none; }
.lookPic { display: block; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--sand); }
.lookPic img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.look b { font-weight: 600; font-size: 15px; line-height: 1.5; }
.look small { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Video section */
.styleGrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr); gap: 32px; align-items: center; }
.styleText { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.styleText h2 { font-size: 30px; line-height: 1.4; }
.styleText p { color: var(--muted); }
.styleVids { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.styleCard { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.styleCard i { display: block; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: var(--sand); }
.styleCard video { width: 100%; height: 100%; object-fit: cover; }
.styleCard b { font-weight: 600; font-size: 15px; text-align: center; }

/* Placeholder boxes for facts that are still missing */
.needs { border: 1px dashed var(--muted); border-radius: 12px; padding: 16px; }
.needs b { display: block; font-weight: 600; }
.needs span { font-size: 14px; color: var(--muted); }
.needs.filled { border-style: solid; border-color: var(--line); background: var(--surface); }
.fourth { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.footLinks { display: flex; flex-direction: column; align-items: flex-start; }
.keepLines { white-space: pre-line; }

/* Footer */
.foot { margin-block-start: 64px; background: var(--sand); padding-block: 48px 32px; }
.footGrid { display: grid; grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footBrand { font-family: "Noto Naskh Arabic", serif; font-size: 30px; line-height: 1.3; }
.footGrid h3 { font-size: 15px; font-weight: 700; margin-block-end: 12px; }
.footGrid p { font-size: 14px; color: var(--muted); }
.trustSeal { margin-block-start: 8px; }
.trustSeal a { display: inline-block; }
.trustSeal img { display: block; max-inline-size: 110px; block-size: auto; }
.footGrid a { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; font-weight: 500; }
.fine { margin-block-start: 32px; padding-block-start: 16px; border-block-start: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* Shop */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-block: 16px; font-size: 14px; color: var(--muted); }
.crumbs a { min-height: 32px; display: inline-flex; align-items: center; text-decoration: none; }
.crumbs span[aria-current] { color: var(--ink); font-weight: 500; }
.listGrid { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 32px; align-items: start; padding-block-end: 32px; }
.side { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; position: sticky; top: 132px; max-height: calc(100vh - 148px); overflow-y: auto; }
.side summary { display: none; }
.listHead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 16px; }
.listHead h1 { font-size: 30px; line-height: 1.4; }
.listHead p { font-size: 14px; color: var(--muted); }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.sort select { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding-inline: 12px; }
.link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--muted); text-decoration: underline; }
.empty { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.empty h1 { font-size: 30px; }
.pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-block-start: 32px; }
.pages a, .pages span { min-width: 44px; min-height: 44px; padding-inline: 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; }
.pages span[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }

/* Product page */
.pd { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: start; padding-block-end: 16px; }
.stage { background: #fff; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; aspect-ratio: 1; }
.stage img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 12px; }
.thumb { width: 88px; height: 88px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.thumb.on { border-color: var(--ink); box-shadow: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.buy { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 132px; }
.buy h1 { font-size: 36px; line-height: 1.4; }
.insp { color: var(--muted); }
.insp bdi { color: var(--ink); font-weight: 600; }
.sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; }
.size { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 72px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: center; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease); }
.size input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.size:active { transform: scale(.97); }
.size b { font-weight: 600; font-size: 15px; line-height: 1.5; }
.size small { font-size: 13px; color: var(--muted); line-height: 1.5; }
.size:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #fff; }
.size:has(input:checked) small { color: #EFE6DA; }
.size:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.bigprice { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 30px; font-weight: 700; line-height: 1.3; }
.bigprice small { font-size: 16px; font-weight: 500; }
.bigprice .old { font-size: 16px; }
.pct { font-size: 14px; color: var(--sale); font-weight: 700; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding-inline: 8px; line-height: 28px; }
.stock { font-size: 14px; color: var(--muted); }
.ctaBar { display: flex; flex-direction: column; gap: 8px; }
.notice { font-size: 13px; color: var(--muted); line-height: 1.8; border-block-start: 1px solid var(--line); padding-block-start: 12px; }
.detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; padding-block-start: 48px; }
.detail h2 { font-size: 24px; line-height: 1.4; margin-block-end: 16px; }
.detail h2.spaced { margin-block-start: 32px; }
.detail > div > h2:first-child { margin-block-start: 0; }
.note { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding-block: 12px; border-block-end: 1px solid var(--line); }
.note b { font-weight: 600; font-size: 15px; }
.spec { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; padding-block: 8px; border-block-end: 1px solid var(--line); font-size: 15px; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-weight: 500; }
dl { margin: 0; }
.prose { max-width: 68ch; }
.prose p { margin-block-end: 12px; }
.prose h2, .prose h3, .prose h4 { font-family: "Noto Naskh Arabic", Vazirmatn, serif; font-size: 19px; line-height: 1.5; margin-block: 20px 8px; }
.prose ul, .prose ol { margin-block: 0 12px; padding-inline-start: 20px; }

/* Story viewer */
dialog.sv { padding: 0; border: 0; background: transparent; width: 100%; height: 100%; max-width: none; max-height: none; overflow: hidden; }
dialog.sv::backdrop { background: rgba(23, 17, 13, .92); }
dialog.sv[open] .svFrame { animation: pop 250ms var(--ease) both; }
.svInner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 16px; gap: 12px; }
.svFrame { position: relative; display: flex; flex-direction: column; width: min(420px, calc(100vw - 32px)); height: min(calc(100vh - 32px), 780px); background: #17110D; border-radius: 16px; overflow: hidden; }
.svMedia { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.svMedia img, .svMedia video { width: 100%; height: 100%; object-fit: contain; }
.svBar { flex: none; background: #fff; color: var(--ink); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.svBar b { font-weight: 600; }
.svClose { position: absolute; top: 8px; inset-inline-end: 8px; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; z-index: 2; }
.svNav { flex: none; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; z-index: 2; transition: transform 160ms var(--ease); }
.svNav:active { transform: scale(.94); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* Sections rise gently into view where the browser supports it */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 22%; }
  }
}

@media (hover: hover) and (pointer: fine) {
  .card:hover { border-color: var(--muted); }
  .card:hover .pic img { transform: scale(1.03); }
  .look:hover .lookPic img { transform: scale(1.03); }
  .nav a:hover { background: var(--sand); color: var(--ink); }
  .chip:hover { border-color: var(--ink); }
  .size:hover { border-color: var(--ink); }
  .more:hover { border-block-end-color: var(--ink); }
  a.link:hover { color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  .slide.on img, dialog.sv[open] .svFrame { animation: none; }
  *, *::before, *::after { transition-duration: 1ms !important; }
  .card:hover .pic img, .look:hover .lookPic img { transform: none; }
}

@media (max-width: 980px) {
  .finder { grid-template-columns: minmax(0, 1fr); }
  .finderImg { aspect-ratio: 4 / 5; min-height: 0; }
  .finderBody { padding: 24px; }
  .styleGrid { grid-template-columns: minmax(0, 1fr); }
  .listGrid, .pd, .detail { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .side, .buy { position: static; max-height: none; }
  .side { padding: 12px 16px; }
  .side summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; font-weight: 600; cursor: pointer; list-style: none; }
  .side summary::-webkit-details-marker { display: none; }
  .side summary::after { content: ""; width: 8px; height: 8px; border-inline-end: 2px solid var(--muted); border-block-end: 2px solid var(--muted); transform: rotate(45deg); transition: transform 160ms var(--ease); }
  .side[open] summary::after { transform: rotate(-135deg); }
  .side[open] summary { margin-block-end: 12px; }
  .fourth { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  /* Only the slim row with search and cart stays on screen. The menu scrolls away with the page. */
  .top, .top > .wrap { display: contents; }
  .bar { position: sticky; top: 0; z-index: 20; gap: 8px; padding: 8px 16px; background: var(--paper); border-block-end: 1px solid var(--line); }
  .search { flex: 1 1 0; min-width: 0; min-height: 44px; max-width: none; padding-inline: 12px; }
  .brand { align-items: flex-start; }
  .brand b { font-size: 24px; }
  .nav { padding-block: 4px; padding-inline: 16px; border-block-end: 1px solid var(--line); }
  .finder { scroll-margin-top: 72px; }
  .stories { grid-auto-columns: 76px; gap: 8px; padding-block: 12px 8px; }
  .story { width: 76px; }
  .story i { width: 68px; height: 68px; }
  .slider { aspect-ratio: 4 / 5; border-radius: 16px; }
  .ctrl { display: none; }
  .section { padding-block-start: 32px; }
  .head { margin-block-end: 16px; flex-wrap: wrap; }
  .head h2, .finderBody h2, .styleText h2, .listHead h1 { font-size: 24px; }
  .row { grid-auto-columns: minmax(164px, 176px); gap: 12px; }
  .looks { grid-auto-columns: minmax(200px, 220px); gap: 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .info { padding: 8px 12px 12px; }
  .styleVids { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(200px, 220px); overflow-x: auto; padding-block-end: 8px; }
  .buy h1 { font-size: 30px; }
  .bigprice { font-size: 24px; }
  .fourth, .footGrid { grid-template-columns: minmax(0, 1fr); }
  .stage { border-radius: 16px; }
  .svInner { padding: 0; }
  .svFrame { width: 100vw; height: 100dvh; border-radius: 0; }
  .svNav { position: absolute; top: 50%; margin-block-start: -24px; }
  .svNav.prev { inset-inline-start: 8px; }
  .svNav.next { inset-inline-end: 8px; }
}

/* Header cart */
.barEnd { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; flex: none; }
.barLink { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.nav a.navTrack { display: none; }
.cartbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding-inline: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform 160ms var(--ease), border-color 160ms ease; }
.cartbtn:active { transform: scale(.97); }
.cartbtn.bump { transform: scale(1.06); }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding-inline: 6px; border-radius: 11px; background: var(--ink); color: #fff; font-size: 12px; line-height: 1; }

/* Buying pages */
.buyForm { display: flex; flex-direction: column; gap: 16px; }
.pageBody { padding-block-end: 16px; }
.pageTitle { font-size: 30px; line-height: 1.4; margin-block-end: 16px; }
.alert { padding: 12px 16px; margin-block-end: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 15px; }
.alert.good { border-color: var(--good); color: var(--good); }
.alert.bad { border-color: var(--bad); color: var(--bad); }
.alert.warn { border-color: var(--warn); color: var(--warn); }
.alert ul { margin: 4px 0 0; padding-inline-start: 20px; }
.alert p + p { margin-block-start: 4px; }
.alert:focus { outline: none; }
.box, .summary { display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.box h2, .summary h2 { font-size: 20px; line-height: 1.5; }
.summary { position: sticky; top: 132px; }
.sumRow { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.sumRow.muted { color: var(--muted); }
.sumRow.saving { color: var(--good); font-weight: 500; }
.sumRow.total { padding-block-start: 12px; border-block-start: 1px solid var(--line); font-size: 18px; font-weight: 700; }
.link.center { align-self: center; }
.help { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }

/* Cart */
.cartGrid, .checkGrid { display: grid; grid-template-columns: minmax(0, 1fr) 352px; gap: 24px; align-items: start; }
.lines { display: flex; flex-direction: column; gap: 12px; }
.line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.lineImg { display: block; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: #fff; }
.lineImg img { width: 100%; height: 100%; object-fit: contain; }
.lineBody { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lineBody .name { text-decoration: none; }
.unit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 14px; color: var(--muted); }
.qty { display: inline-flex; align-items: center; width: fit-content; margin-block-start: 8px; border: 1px solid var(--line); border-radius: 12px; }
.qty button { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: 18px; transition: transform 160ms var(--ease); }
.qty button:active { transform: scale(.92); }
.qty button:disabled { color: var(--line); cursor: not-allowed; transform: none; }
.qty span { min-width: 28px; text-align: center; font-weight: 600; }
.lineEnd { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.lineEnd b { font-size: 15px; font-weight: 700; white-space: nowrap; }

/* Forms */
.formCol { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.payCard { display: flex; flex-direction: column; gap: 16px; max-inline-size: 560px; margin-inline: auto; padding-block-start: 24px; }
.payCard .pageTitle { margin-block-end: 0; }
.filePick { position: relative; }
.filePick input { position: absolute; inset: 0; z-index: 1; opacity: 0; cursor: pointer; }
.filePick label { display: flex; align-items: center; gap: 12px; min-height: 48px; font-weight: 400; }
.filePick .btn { flex: none; min-height: 44px; }
.filePick input:focus-visible + label .btn { outline: 2px solid var(--accent); outline-offset: 2px; }
.filePickName { min-width: 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.payLine { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding-block: 12px; border-block-end: 1px solid var(--line); }
.payLabel { grid-column: 1; font-size: 13px; color: var(--muted); }
.payValue { grid-column: 1; font-size: 20px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.payValue[dir="ltr"] { text-align: end; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.payValue[dir="ltr"] { white-space: nowrap; }
/* Wide enough for «کپی شد», so the card number doesn't jump onto a second line when it's pressed. */
.payLine .btn { grid-column: 2; grid-row: 1 / span 2; min-height: 44px; min-inline-size: 84px; padding-inline: 8px; }
@media (max-width: 374px) {
  .payValue[dir="ltr"] { font-size: 18px; }
}
@media (max-width: 359px) {
  .payLine { grid-template-columns: 1fr; }
  .payLine .btn { grid-column: 1; grid-row: auto; justify-self: start; }
}
.payTimer { font-size: 14px; color: var(--muted); }
.payTimer b { color: var(--ink); font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-size: 16px; transition: border-color 160ms ease; }
.field input, .field select, .field textarea { scroll-margin-block-start: 148px; }
.field textarea { resize: vertical; line-height: 1.8; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: none; }
.field .input-validation-error { border-color: var(--bad); }
.field input::placeholder { color: var(--muted); }
.field.narrow { max-width: 220px; }
.fieldRow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fieldError { font-size: 13px; color: var(--bad); }
.fieldError:empty { display: none; }
.optional { font-weight: 400; color: var(--muted); }

/* Order summary lines */
.miniLines { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.miniLines li { display: flex; align-items: center; gap: 12px; }
.miniLines img { flex: none; width: 56px; height: 56px; border: 1px solid var(--line); border-radius: 8px; background: #fff; object-fit: contain; }
.miniName { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.6; }
.miniName small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.miniPrice { flex: none; font-size: 14px; font-weight: 600; white-space: nowrap; }

/* Order page */
.orderHead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; padding-block-start: 24px; }
.orderHead .pageTitle { margin-block-end: 0; }
.orderHead p { margin-block-end: 16px; }
.statusBadge { padding-inline: 12px; border-radius: 8px; background: var(--sand); font-size: 14px; font-weight: 600; line-height: 32px; white-space: nowrap; }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 8px 0 24px; padding: 0; list-style: none; }
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); text-align: center; }
.steps li::before { content: ""; position: absolute; top: 6px; inset-inline-end: 50%; width: 100%; height: 2px; background: var(--line); }
.steps li:first-child::before { display: none; }
.steps i { position: relative; width: 14px; height: 14px; border: 2px solid var(--line); border-radius: 50%; background: var(--paper); }
.steps li.done { color: var(--ink); font-weight: 600; }
.steps li.done::before { background: var(--ink); }
.steps li.done i { border-color: var(--ink); background: var(--ink); }
.orderGrid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.orderHelp { margin-block-start: 16px; }
.trackBox { max-width: 480px; margin: 16px auto 0; }
.trackBox .pageTitle { margin-block-end: 0; }
.trackBox .alert { margin-block-end: 0; }

@media (hover: hover) and (pointer: fine) {
  .cartbtn:hover { border-color: var(--ink); }
  .barLink:hover { color: var(--ink); }
  .lineBody .name:hover { text-decoration: underline; }
}

@media (max-width: 980px) {
  .cartGrid, .checkGrid, .orderGrid { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
}

@media (max-width: 640px) {
  .pageTitle { font-size: 24px; }
  .cartLabel, .barLink { display: none; }
  .nav a.navTrack { display: inline-flex; }
  .field input, .field select, .field textarea { scroll-margin-block-start: 76px; }
  .box, .summary { padding: 16px; }
  .line { grid-template-columns: 72px minmax(0, 1fr); gap: 8px 12px; }
  .lineImg { width: 72px; height: 72px; }
  .lineEnd { grid-column: 2; flex-direction: row; align-items: center; }
  .fieldRow { grid-template-columns: minmax(0, 1fr); }
  .field.narrow { max-width: none; }
  .steps li { font-size: 12px; }
}
