/* 3D Crafting Mania — styles. Logical properties throughout so Arabic (RTL) mirrors automatically. */
:root {
  --paper: #F6F6F4;
  --plate: #E4E5E1;
  --plate-deep: #D5D7D2;
  --graphite: #26272B;
  --graphite-2: #3A3B40;
  --steel: #6B7078;        /* secondary text, 4.9:1 on paper */
  --line: #CDD0CB;
  --orange: #F26A1B;       /* buying actions */
  --orange-ink: #B9470B;   /* orange text on light backgrounds (AA) */
  --ok: #2F7A4B; --warn: #9A5B00; --bad: #B3261E;

  --f-display: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --s-1: .8125rem; --s0: 1rem; --s1: 1.125rem; --s2: 1.375rem; --s3: 1.75rem; --s4: 2.25rem; --s5: clamp(2.5rem, 5.4vw, 4.5rem);
  --r-sm: 4px; --r-md: 8px; --r-pill: 999px;
  --wrap: 1240px; --gutter: clamp(16px, 4vw, 40px);
  --focus: 0 0 0 3px var(--paper), 0 0 0 5px var(--graphite);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--paper); color: var(--graphite);
  font: 400 var(--s0)/1.6 var(--f-body); font-feature-settings: "tnum" 0;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--graphite); color: #fff; padding: 10px 14px; border-radius: var(--r-md); z-index: 50; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.12; letter-spacing: -.015em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: var(--s5); font-weight: 700; letter-spacing: -.03em; }
h2 { font-size: var(--s4); }
h3 { font-size: var(--s2); }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; line-height: 1.3; }
p { margin: 0 0 1em; max-width: 68ch; }
.lead { font-size: var(--s1); color: var(--graphite-2); max-width: 54ch; }
.muted { color: var(--steel); }
.tbc { color: var(--warn); font-style: italic; }
:lang(ar) .tbc { font-style: normal; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .7em 1.4em;
  border-radius: var(--r-md); border: 1.5px solid var(--graphite); background: transparent; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.btn:hover { background: var(--graphite); color: var(--paper); }
.btn-buy { background: var(--orange); border-color: var(--orange); color: #1d1206; }
.btn-buy:hover { background: #DC5A0E; border-color: #DC5A0E; color: #1d1206; }
.btn-quiet { border-color: var(--line); background: var(--paper); }
.btn-quiet:hover { background: var(--plate); color: inherit; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

/* ---------------------------------------------------------------- header */
.demo-banner { margin: 0; max-width: none; background: var(--graphite); color: #E9E9E6; font-size: var(--s-1); text-align: center; padding: 6px var(--gutter); }
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand img { width: 84px; height: auto; }
.main-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 10px 12px; border-radius: var(--r-md); text-decoration: none; font-weight: 500; }
.main-nav a:hover { background: var(--plate); }
.main-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--orange); border-radius: 0; }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.lang-btn { min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: transparent; cursor: pointer; font-weight: 500; }
.lang-btn:lang(ar) { font-family: var(--f-body); }
.lang-btn:hover { border-color: var(--graphite); }
.cart-btn { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-md); text-decoration: none; }
.cart-btn:hover { background: var(--plate); }
.cart-count { position: absolute; top: 4px; inset-inline-end: 2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pill); background: var(--orange); color: #1d1206; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.menu-btn { display: none; width: 48px; height: 48px; border: 0; background: none; border-radius: var(--r-md); cursor: pointer; place-items: center; }
@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .main-nav { position: absolute; inset-inline: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 8px var(--gutter) 16px; }
  .main-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .main-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--orange); padding-inline-start: 12px; }
}

/* ---------------------------------------------------------------- page scaffolding */
main { display: block; }
.section { padding-block: clamp(48px, 8vw, 104px); }
.section-tight { padding-block: clamp(32px, 5vw, 56px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.page-head { padding-block: clamp(32px, 6vw, 64px) 8px; }
.page-head h1 { font-size: clamp(2.25rem, 4.4vw, 3.5rem); }
.crumbs { font-size: var(--s-1); color: var(--steel); margin-bottom: 18px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: var(--line); }
.dark { background: var(--graphite); color: #EDEDEA; }
.dark .muted { color: #A9ACB2; }
.dark a { color: #fff; }

/* ---------------------------------------------------------------- hero */
.hero { padding-block: clamp(24px, 4vw, 56px) clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-pick { margin-top: 18px; }
.hero-pick-label { font-size: var(--s-1); color: var(--steel); margin-bottom: 8px; }
.hero-product { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.hero-product a { font-family: var(--f-display); font-weight: 600; font-size: var(--s1); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- build-plate stage (signature element) */
.stage { --ruler-mm: 100; position: relative; }
.stage-canvas {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-md); overflow: hidden;
  background:
    linear-gradient(to bottom, transparent 62%, rgba(38,39,43,.05)),
    repeating-linear-gradient(90deg, rgba(38,39,43,.045) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(0deg, rgba(38,39,43,.045) 0 1px, transparent 1px 40px),
    #EEEAE4;
}
.stage-canvas model-viewer, .stage-poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-poster { object-fit: cover; }
.stage-canvas model-viewer { background: transparent; --poster-color: transparent; --progress-bar-color: transparent; }
.stage[data-state="ready"] .stage-canvas { background: radial-gradient(ellipse at 50% 40%, #F4F1EC, #E6E2DB 75%); }
.stage-progress { position: absolute; inset-inline: 22% ; bottom: 18px; height: 3px; background: rgba(38,39,43,.12); border-radius: 3px; overflow: hidden; }
.stage-progress span { display: block; height: 100%; width: 4%; background: var(--orange); transition: width .2s; }
.stage-msg { position: absolute; inset-inline: 0; bottom: 30px; margin: 0 auto; text-align: center; font-size: var(--s-1); color: var(--graphite-2); max-width: 46ch; padding-inline: 16px; }
.stage[data-state="failed"] .stage-msg { bottom: 16px; background: rgba(246,246,244,.94); border-radius: var(--r-md); padding: 10px 14px; width: calc(100% - 32px); color: var(--graphite); }
.stage-load { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); }
.ar-btn { position: absolute; bottom: 14px; inset-inline-end: 14px; min-height: 40px; padding: .4em .9em; font-size: var(--s-1); }
/* Z-height ruler: one tick per 10 mm of the printed height, label shows the real number */
.ruler { position: absolute; inset-block: 12% 16%; inset-inline-start: 16px; width: 8px; pointer-events: none; }
.ruler::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 7px; border-inline-start: 1.5px solid rgba(38,39,43,.5);
  background: repeating-linear-gradient(to top, rgba(38,39,43,.5) 0 1px, transparent 1px calc(100% / (var(--ruler-mm) / 10))); }
.ruler::after { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 12px; border-top: 1.5px solid var(--orange); }
.ruler-label { position: absolute; top: -24px; inset-inline-start: 0; white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--graphite-2); font-variant-numeric: tabular-nums; }
.stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.stage-hint { margin: 0; font-size: var(--s-1); color: var(--steel); }
.stage-controls { display: flex; gap: 4px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--paper); border-radius: var(--r-md); cursor: pointer; }
.icon-btn:hover:not([disabled]) { background: var(--plate); }
.icon-btn[aria-pressed="true"] { background: var(--graphite); color: var(--paper); border-color: var(--graphite); }
.icon-btn[disabled] { opacity: .4; cursor: default; }
@media (max-width: 520px) { .stage-hint { display: none; } .stage-bar { justify-content: flex-end; } }


/* ---------------------------------------------------------------- filament swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.swatch { --sw: #999; display: block; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--sw) 0 38%, color-mix(in srgb, var(--sw) 70%, #000) 39% 46%, var(--sw) 47%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.swatches.mini .swatch { width: 14px; height: 14px; }
.color-pick { display: flex; flex-wrap: wrap; gap: 10px; border: 0; padding: 0; margin: 0; }
.color-pick label { position: relative; cursor: pointer; }
.color-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.color-pick .spool { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 6px; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--paper); font-size: var(--s-1); font-weight: 500; }
[dir="rtl"] .color-pick .spool { padding: 6px 6px 6px 14px; }
.color-pick .spool .swatch { width: 30px; height: 30px; }
.color-pick input:checked + .spool { border-color: var(--graphite); box-shadow: inset 0 0 0 1px var(--graphite); }
.color-pick input:focus-visible + .spool { box-shadow: var(--focus); }
.color-pick.compact .spool { padding: 4px; } .color-pick.compact .spool-name { display: none; }

/* segmented options (size / licence) */
.seg { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.seg label { cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: flex; flex-direction: column; min-height: 44px; justify-content: center; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--paper); font-weight: 500; }
.seg small { color: var(--steel); font-weight: 400; }
.seg input:checked + span { border-color: var(--graphite); box-shadow: inset 0 0 0 1px var(--graphite); }
.seg input:focus-visible + span { box-shadow: var(--focus); }

/* ---------------------------------------------------------------- category rail */
.cat-rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.cat { display: grid; grid-template-rows: auto 1fr; text-decoration: none; border-radius: var(--r-md); background: var(--plate); overflow: hidden; }
.cat img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.cat div { padding: 14px 16px 18px; }
.cat h3 { font-size: var(--s1); margin-bottom: 4px; }
.cat p { font-size: var(--s-1); color: var(--graphite-2); margin: 0; }
.cat:hover h3 { text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 1000px) { .cat-rail { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
@media (max-width: 560px) {
  .cat-rail { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .cat { scroll-snap-align: start; }
}

/* ---------------------------------------------------------------- product cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.card-link { display: block; text-decoration: none; height: 100%; }
.card-plate { position: relative; border-radius: var(--r-md); overflow: hidden; background: #EEEAE4; }
.card-plate img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.card-body { padding: 14px 2px 4px; }
.card-title { font-size: var(--s1); margin: 0 0 4px; }
.card-link:hover .card-title { text-decoration: underline; text-underline-offset: .2em; }
.card-short { font-size: var(--s-1); color: var(--steel); margin: 0 0 10px; }
.card-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 10px; }
.price { font-weight: 600; font-variant-numeric: tabular-nums; }
.from { font-weight: 400; color: var(--steel); font-size: var(--s-1); }
.stock { font-size: var(--s-1); color: var(--steel); display: inline-flex; align-items: center; gap: 6px; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock-in { color: var(--ok); } .stock-made { color: var(--warn); } .stock-out { color: var(--bad); } .stock-digital { color: var(--graphite-2); }
.is-out .card-plate img { opacity: .6; }
.tag { position: absolute; top: 10px; inset-inline-start: 10px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--graphite); color: #fff; }
.tag-demo { position: static; display: inline-block; background: var(--plate); color: var(--graphite-2); }

/* ---------------------------------------------------------------- three ways */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #45464C; }
.way { padding: 28px clamp(16px, 2.5vw, 32px) 8px 0; border-inline-end: 1px solid #45464C; }
.way + .way { padding-inline-start: clamp(16px, 2.5vw, 32px); }
.way:last-child { border-inline-end: 0; }
.way h3 { font-size: var(--s2); color: #fff; }
.way p { color: #C9CBCF; }
.way a { font-weight: 600; }
.way-icon { width: 44px; height: 44px; margin-bottom: 18px; color: var(--orange); }
@media (max-width: 800px) { .ways { grid-template-columns: 1fr; } .way, .way + .way { border-inline-end: 0; border-bottom: 1px solid #45464C; padding-inline: 0; padding-bottom: 20px; } }

/* ---------------------------------------------------------------- shop */
.shop-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); align-items: start; }
.filters { position: sticky; top: 96px; display: grid; gap: 22px; }
.filters fieldset { border: 0; padding: 0; margin: 0; }
.filters legend, .field-label { font-weight: 600; font-size: var(--s-1); margin-bottom: 8px; padding: 0; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); font-size: var(--s-1); cursor: pointer; background: var(--paper); }
.chip input:checked + span { background: var(--graphite); color: var(--paper); border-color: var(--graphite); }
.chip input:focus-visible + span { box-shadow: var(--focus); }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-size: var(--s-1); }
.check input { width: 20px; height: 20px; accent-color: var(--graphite); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; margin-bottom: 20px; }
.toolbar .count { margin: 0; color: var(--steel); }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search input[type="search"] { padding-inline-start: 42px; }
.search svg { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: var(--steel); pointer-events: none; }
.filters-toggle { display: none; }
.empty { text-align: center; padding: 64px 16px; border: 1.5px dashed var(--line); border-radius: var(--r-md); }
.empty p { margin-inline: auto; }
@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; }
  .filters-toggle { display: inline-flex; }
  .filters { position: fixed; inset: 0; z-index: 60; background: var(--paper); padding: 20px var(--gutter) 100px; overflow-y: auto; display: none; }
  .filters.open { display: grid; align-content: start; }
  .filters-close { position: fixed; bottom: 0; inset-inline: 0; padding: 12px var(--gutter); background: var(--paper); border-top: 1px solid var(--line); }
}
@media (min-width: 901px) { .filters-close, .filters-head { display: none; } }
.filters-head { display: flex; justify-content: space-between; align-items: center; }

/* ---------------------------------------------------------------- forms */
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label, .field .field-label { font-weight: 500; font-size: var(--s-1); }
.hint { font-size: var(--s-1); color: var(--steel); margin: 0; }
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="url"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid #B9BDB7; border-radius: var(--r-md); background: #fff;
}
textarea { min-height: 130px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--graphite); }
[aria-invalid="true"] { border-color: var(--bad) !important; }
.err { color: var(--bad); font-size: var(--s-1); margin: 0; }
.radio-list { display: grid; gap: 8px; border: 0; padding: 0; margin: 0 0 18px; }
.radio-list label { display: flex; gap: 10px; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; background: #fff; }
.radio-list input { accent-color: var(--graphite); width: 18px; height: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.notice { padding: 14px 16px; border-radius: var(--r-md); background: var(--plate); margin-bottom: 18px; font-size: var(--s-1); }
.notice p:last-child { margin: 0; }
.notice-ok { background: #E3F0E6; color: #173D25; }
.notice-bad { background: #F8E3E1; color: #5C120D; }
.notice-warn { background: #F6ECD9; color: #4A2D00; }

/* ---------------------------------------------------------------- product page */
.pdp { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.pdp-media { position: sticky; top: 92px; }
.thumbs { display: flex; gap: 8px; margin-top: 12px; list-style: none; padding: 0; }
.thumbs button { width: 72px; height: 72px; padding: 0; border: 1.5px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: #EEEAE4; cursor: pointer; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.thumbs button[aria-pressed="true"] { border-color: var(--graphite); box-shadow: inset 0 0 0 1px var(--graphite); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info h1 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: .25em; }
.pdp-price { font-size: var(--s3); font-weight: 600; font-family: var(--f-display); margin: 12px 0 4px; font-variant-numeric: tabular-nums; }
.pdp-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 20px; }
.opt { margin: 0 0 22px; }
fieldset.opt { border: 0; padding: 0; min-width: 0; }
fieldset.opt legend { padding: 0; }
.opt-head { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: var(--s-1); margin-bottom: 10px; }
.opt-head output { font-weight: 400; color: var(--steel); }
.buy-row { display: flex; gap: 10px; align-items: stretch; margin-top: 8px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid #B9BDB7; border-radius: var(--r-md); background: #fff; }
.qty button { width: 44px; height: 46px; border: 0; background: none; cursor: pointer; font-size: 20px; }
.qty input { width: 46px; min-height: 0; height: 46px; border: 0; text-align: center; padding: 0; -moz-appearance: textfield; background: transparent; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buy-row .btn-buy { flex: 1; }
.ask { margin-top: 12px; display: inline-block; font-size: var(--s-1); }
.acc { border-top: 1px solid var(--line); margin-top: 28px; }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 22px; font-weight: 400; line-height: 1; }
.acc details[open] summary::after { content: "–"; }
.acc .acc-body { padding-bottom: 18px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: var(--s-1); }
.spec-table th, .spec-table td { text-align: start; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { font-weight: 500; color: var(--steel); width: 46%; padding-inline-end: 12px; }
.spec-table td { font-variant-numeric: tabular-nums; }
.digital-note { border-inline-start: 3px solid var(--orange); padding: 4px 14px; margin: 18px 0 0; font-size: var(--s-1); }
@media (max-width: 900px) { .pdp { grid-template-columns: 1fr; } .pdp-media { position: static; } }

/* ---------------------------------------------------------------- cart */
.cart-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.cart-lines { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.cart-line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-line img { width: 96px; height: 96px; border-radius: var(--r-md); background: #EEEAE4; }
.cart-line h3 { font-size: var(--s1); margin-bottom: 4px; }
.cart-line h3 a { text-decoration: none; }
.cart-line .opts { font-size: var(--s-1); color: var(--steel); margin: 0 0 10px; }
.cart-line .line-end { text-align: end; display: grid; gap: 8px; justify-items: end; }
.cart-line .qty button { width: 38px; height: 38px; } .cart-line .qty input { height: 38px; width: 40px; }
.summary { background: var(--plate); border-radius: var(--r-md); padding: clamp(18px, 3vw, 28px); position: sticky; top: 92px; }
.summary-row { display: flex; justify-content: space-between; font-size: var(--s1); font-weight: 600; margin-bottom: 4px; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } .summary { position: static; } }
@media (max-width: 480px) { .cart-line { grid-template-columns: 72px minmax(0, 1fr); } .cart-line img { width: 72px; height: 72px; } .cart-line .line-end { grid-column: 2; justify-items: start; text-align: start; grid-auto-flow: column; align-items: center; } }

/* ---------------------------------------------------------------- about / process / support */
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: step; }
.process li { counter-increment: step; padding: 20px 18px 0 0; border-top: 3px solid var(--plate-deep); position: relative; }
[dir="rtl"] .process li { padding: 20px 0 0 18px; }
.process li::before { content: counter(step); font-family: var(--f-display); font-weight: 700; font-size: var(--s3); color: var(--orange-ink); display: block; margin-bottom: 8px; }
.process h3 { font-size: var(--s1); }
.process p { font-size: var(--s-1); color: var(--graphite-2); }
@media (max-width: 900px) { .process { grid-template-columns: 1fr; } .process li { padding-inline-end: 0; } }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 0; }
.facts dt { color: var(--steel); }
.facts dd { margin: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding-bottom: 16px; }
.policy { padding: 18px 0; border-bottom: 1px solid var(--line); }
.policy h3 { font-size: var(--s1); }

/* ---------------------------------------------------------------- footer + toast */
.site-footer { background: var(--graphite); color: #D9DADC; margin-top: clamp(48px, 8vw, 96px); }
main:has(> .dark:last-child) + .site-footer { margin-top: 0; border-top: 1px solid #3E3F45; }
.footer-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-block: 56px 32px; }
.footer-in h2 { font-size: var(--s0); color: #fff; margin-bottom: 12px; }
.footer-in ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-in a { text-decoration: none; color: #D9DADC; }
.footer-in a:hover { color: #fff; text-decoration: underline; }
.footer-brand img { width: 120px; margin-bottom: 12px; }
.footer-brand p { color: #A9ACB2; font-size: var(--s-1); }
.site-footer .tbc { color: #E6B979; }
.footer-legal { border-top: 1px solid #3E3F45; padding-block: 18px 28px; margin: 0 auto; max-width: var(--wrap); font-size: var(--s-1); color: #A9ACB2; }
.site-footer :focus-visible { box-shadow: 0 0 0 2px var(--graphite), 0 0 0 4px #fff; }
@media (max-width: 800px) { .footer-in { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 140%); background: var(--graphite); color: #fff; padding: 12px 18px; border-radius: var(--r-md); z-index: 80; max-width: calc(100vw - 32px); transition: transform .25s ease; }
.toast.show { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .stage-bar, .demo-banner { display: none; } }

/* ---------------------------------------------------------------- accounts */
.account-slot { display: contents; }
.acct-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: var(--r-md); text-decoration: none; font-weight: 500; }
.acct-btn:hover { background: var(--plate); }
.acct-btn[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--orange); border-radius: 0; }
.acct-btn.signed-in { padding: 0 7px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--graphite); color: var(--paper); font-size: 14px; font-weight: 600; object-fit: cover; }
@media (max-width: 600px) { .acct-label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .acct-btn { padding: 0 10px; } }
.signin-card { max-width: 460px; display: grid; gap: 16px; padding: clamp(20px, 4vw, 32px); background: var(--plate); border-radius: var(--r-md); }
.signin-card .lead { margin: 0; }
.btn-google { background: #fff; border-color: #B9BDB7; color: var(--graphite); gap: 12px; }
.btn-google:hover { background: #fff; color: var(--graphite); border-color: var(--graphite); }
.acct-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.acct-head p { margin: 0; }
.acct-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.acct-grid h2 { font-size: var(--s2); margin-bottom: 6px; }
.acct-panel { background: var(--plate); border-radius: var(--r-md); padding: clamp(18px, 3vw, 28px); }
.acct-col { display: grid; gap: 40px; }
@media (max-width: 900px) { .acct-grid { grid-template-columns: 1fr; } }
.order-list { list-style: none; padding: 0; margin: 12px 0 0; border-top: 1px solid var(--line); }
.order { padding: 14px 0; border-bottom: 1px solid var(--line); }
.order p { margin: 4px 0 0; font-size: var(--s-1); }
.order-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.pill { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: var(--r-pill); background: var(--plate); color: var(--graphite-2); }
.pill-confirmed, .pill-printing { background: #F6ECD9; color: #4A2D00; }
.pill-shipped, .pill-delivered { background: #E3F0E6; color: #173D25; }
.pill-cancelled { background: #F8E3E1; color: #5C120D; }
.grid-sm { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); margin-top: 12px; }
.grid-sm .card-short, .grid-sm .swatches { display: none; }
.wish-item { display: grid; gap: 4px; justify-items: start; }
.pdp-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 12px; }
.pdp-links .ask { margin: 0; }
.wish-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 2px; border: 0; background: none; cursor: pointer; font-size: var(--s-1); text-decoration: underline; text-underline-offset: .2em; }
.wish-btn[aria-pressed="true"] { --heart-fill: var(--orange); text-decoration: none; }
.wish-btn[aria-pressed="true"] svg { color: var(--orange-ink); }

/* ---------------------------------------------------------------- legal pages */
.legal { padding-block: clamp(32px, 6vw, 64px); max-width: 760px; }
.legal h1 { font-size: clamp(2.25rem, 4.4vw, 3.25rem); }
.legal h2 { font-size: var(--s2); margin-top: 1.8em; }
.legal ul { padding-inline-start: 1.2em; display: grid; gap: 8px; max-width: 68ch; }
html[lang="ar"] [data-only="en"], html:not([lang="ar"]) [data-only="ar"] { display: none; }
