/* OVO — storefront (black / white / greys) + admin (colour-coded, light/dark/auto) */
:root {
  --bg: #ffffff; --fg: #0b0b0b; --muted: #6b6b6b; --line: #e6e6e6; --soft: #f5f5f3; --card: #ffffff;
  --accent: #0b0b0b; --accent-fg: #ffffff; --danger: #b42318; --ok: #157347;
  --radius: 4px; --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --font: "Tajawal", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --tone-blue: #2563eb; --tone-violet: #7c3aed; --tone-amber: #b45309; --tone-green: #15803d; --tone-red: #b91c1c; --tone-grey: #6b7280;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wordmark { font-family: Arial, Helvetica, sans-serif; font-weight: 900; letter-spacing: -.08em; text-transform: uppercase; line-height: 1; }
.tagline { font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; } .row > .field { flex: 1 1 180px; }
.stack { display: grid; gap: 14px; } .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.spacer { flex: 1; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 1px solid var(--fg); background: transparent; color: var(--fg); border-radius: var(--radius); cursor: pointer; font-weight: 700; font-size: 14px; text-decoration: none; transition: background .15s, color .15s, opacity .15s; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn.primary:hover { opacity: .88; }
.btn.ghost { border-color: transparent; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { background: none; border: 0; cursor: pointer; padding: 8px; line-height: 1; font-size: 18px; border-radius: var(--radius); }
.icon-btn:hover { background: var(--soft); }
.field { display: grid; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 700; }
.hint { color: var(--muted); font-size: 12px; }
.input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--fg); font: inherit; }
.input:focus, .btn:focus-visible, .chip:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
textarea.input { min-height: 90px; resize: vertical; }
.otp-code { letter-spacing: .5em; text-align: center; font-size: 20px; direction: ltr; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--fg); }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: color-mix(in srgb, var(--tone) 12%, transparent); color: var(--tone); }
.tone-blue { --tone: var(--tone-blue); } .tone-violet { --tone: var(--tone-violet); } .tone-amber { --tone: var(--tone-amber); } .tone-green { --tone: var(--tone-green); } .tone-red { --tone: var(--tone-red); } .tone-grey { --tone: var(--tone-grey); }
.notice { padding: 12px 14px; border-radius: var(--radius); background: var(--soft); font-size: 14px; }
.notice.warn { background: #fff7e6; color: #7a4b00; } .notice.err { background: #fdecea; color: var(--danger); }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

/* ---------- feedback ---------- */
.toasts { position: fixed; inset-inline: 0; bottom: 18px; display: grid; justify-items: center; gap: 8px; z-index: 1000; pointer-events: none; padding: 0 16px; }
.toast { background: #111; color: #fff; padding: 12px 18px; border-radius: 8px; box-shadow: var(--shadow); font-weight: 700; max-width: 520px; transition: opacity .4s, transform .4s; pointer-events: auto; }
.toast.ok { background: #14532d; } .toast.error { background: #7f1d1d; } .toast.out { opacity: 0; transform: translateY(10px); }
.modal-wrap { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: grid; place-items: center; padding: 16px; z-index: 900; }
.modal { background: var(--card); color: var(--fg); width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 10px; box-shadow: var(--shadow); }
.modal.wide { width: min(980px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 20px; display: grid; gap: 14px; }

/* =================== STOREFRONT ===================
   Ink on paper, with the concrete grey of the campaign photos as the only surface tone.
   Shape language comes from the wordmark: controls are round (the O's), photos stay square.
   The one loud moment is the hero: the OVO mark set across the full width of the photo. */
.app-store {
  --bg: #ffffff; --fg: #000000; --muted: #6f6b66; --line: #e3e0dc; --soft: #efedea; --card: #ffffff;
  --accent: #000000; --accent-fg: #ffffff; --radius: 12px; --header-h: 68px; --gutter: max(20px, 3.2vw);
  --font: "Alexandria", "Tajawal", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-family: var(--font); font-size: 15px; line-height: 1.7; font-weight: 400;
}
.app-store h1, .app-store h2, .app-store h3 { text-wrap: balance; }
.app-store .wrap { max-width: 1440px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.app-store :focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

/* controls: round, like the O */
.app-store .btn { border-radius: 999px; min-height: 48px; padding: 12px 26px; font-weight: 600; font-size: 14px; border-width: 1px; }
.app-store .btn:hover { background: var(--soft); }
.app-store .btn.primary:hover { background: #2b2a28; border-color: #2b2a28; opacity: 1; }
.app-store .btn.light { background: #fff; color: #000; border-color: #fff; }
.app-store .btn.light:hover { background: #e9e7e3; border-color: #e9e7e3; }
.app-store .btn.small { min-height: 36px; padding: 6px 16px; }
.app-store .btn.ghost { border-color: transparent; }
.app-store .input { min-height: 50px; border-radius: 12px; padding: 12px 14px; }
.app-store .input:focus { outline: 2px solid var(--fg); outline-offset: 0; border-color: transparent; }
.app-store .chip { padding: 8px 16px; font-weight: 500; }
.app-store .notice { border-radius: 12px; }
.ico { display: inline-grid; place-items: center; } .ico svg { display: block; }

/* announcement + header */
.topbar { background: #000; color: #fff; font-size: 12px; text-align: center; padding: 9px 16px; }
.app-store .header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); color: var(--fg); transition: background .3s, color .3s, border-color .3s; }
.app-store .header .wrap { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.app-store .header .wordmark { font-size: 32px; text-decoration: none; }
.nav { display: flex; gap: 26px; margin-inline-start: 28px; }
.nav a { text-decoration: none; font-weight: 500; font-size: 14px; opacity: .62; padding: 6px 0; border-bottom: 1.5px solid transparent; transition: opacity .2s; }
.nav a:hover { opacity: 1; } .nav a.on { opacity: 1; border-bottom-color: currentColor; }
.header-actions { margin-inline-start: auto; display: flex; gap: 2px; align-items: center; }
.app-store .icon-btn { color: inherit; padding: 9px; border-radius: 999px; display: inline-grid; place-items: center; text-decoration: none; }
.app-store .icon-btn:hover { background: rgba(127, 127, 127, .14); }
.lang-switch { font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid currentColor; border-radius: 999px; padding: 3px 12px; margin-inline-end: 8px; opacity: .85; }
.lang-switch:hover { opacity: 1; }
.bag-btn { position: relative; }
.app-store .cart-count { position: absolute; top: 2px; inset-inline-end: 0; min-width: 18px; height: 18px; border-radius: 9px; font-size: 10px; font-weight: 700; padding: 0 4px; background: var(--fg); color: var(--bg); }
body.is-home:not(.header-solid) .header { background: transparent; border-bottom-color: transparent; color: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.is-home:not(.header-solid) .cart-count { background: #fff; color: #000; }
body.is-home:not(.header-solid) .app-store :focus-visible, body.is-home:not(.header-solid) .header :focus-visible { outline-color: #fff; }
.menu-btn { display: none !important; }
@media (max-width: 900px) {
  .menu-btn { display: inline-grid !important; margin-inline-start: -8px; }
  .nav { display: none; }
  .nav.open { display: grid; position: absolute; top: var(--header-h); inset-inline: 0; height: calc(100svh - var(--header-h)); background: #fff; color: #000; padding: 28px var(--gutter); gap: 6px; margin: 0; align-content: start; }
  .nav.open a { font-size: 28px; font-weight: 600; opacity: 1; border: 0; padding: 4px 0; }
  .app-store .header .wordmark { font-size: 28px; margin-inline: auto; }
  .header-actions { margin-inline-start: 0; }
  .lang-switch { margin-inline-end: 0; }
}

/* hero: the wordmark across the photo */
.hero { position: relative; height: min(100svh, 940px); min-height: 560px; margin-top: calc(-1 * var(--header-h)); background: #000; color: #fff; overflow: hidden; isolation: isolate; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; z-index: -2; animation: hero-img 1.8s cubic-bezier(.2, .7, .2, 1) both; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, .45) 0, transparent 22%, transparent 45%, rgba(0, 0, 0, .55) 100%); }
.hero-copy { position: absolute; inset-inline-start: max(var(--gutter), env(safe-area-inset-left, 0px)); bottom: calc(27vw + 28px); display: grid; gap: 22px; justify-items: start; max-width: 380px; animation: hero-copy .9s .55s ease-out both; }
.hero-lead { margin: 0; font-size: 17px; line-height: 1.65; font-weight: 400; }
.hero-mark { position: absolute; inset-inline: 0; bottom: 0; margin: 0; font-size: 37.5vw; line-height: .76; text-align: center; letter-spacing: -.095em; transform: translateY(5%); padding-inline-end: .09em; pointer-events: none; user-select: none; animation: hero-mark 1.2s cubic-bezier(.16, .84, .3, 1) both; }
@keyframes hero-img { from { transform: scale(1.07); } }
@keyframes hero-mark { from { transform: translateY(45%); } }
@keyframes hero-copy { from { opacity: 0; } }
@media (max-width: 720px) {
  .hero { height: 88svh; min-height: 520px; }
  .hero-img { object-position: 72% 30%; }
  .hero-copy { bottom: calc(30vw + 18px); inset-inline-end: var(--gutter); max-width: none; gap: 16px; }
  .hero-lead { font-size: 15px; }
  .hero-mark { font-size: 41vw; }
}
@media (prefers-reduced-motion: reduce) { .hero-img, .hero-mark, .hero-copy { animation: none; } }

/* collection */
.app-store .section { padding: 88px 0 80px; }
.shop-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 32px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.shop-head h2 { margin: 0 0 18px; font-size: clamp(34px, 5vw, 60px); font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.cat-tabs { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 0 0 16px; font: inherit; font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.cat-tab:hover { color: var(--fg); } .cat-tab.on { color: var(--fg); border-bottom-color: var(--fg); }
.cat-tab sup { font-size: 10px; margin-inline-start: 4px; color: var(--muted); }
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 52px 16px; }
@media (max-width: 1060px) { .products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 10px; } .shop-head { margin-bottom: 24px; } .app-store .section { padding: 64px 0; } }
.card { display: grid; grid-template-rows: auto auto auto; gap: 10px; text-decoration: none; min-width: 0; align-content: start; }
.card-media { position: relative; aspect-ratio: 3 / 4; background: var(--soft); overflow: hidden; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-media img.alt { opacity: 0; transition: opacity .45s ease; }
.card.has-alt:hover .card-media img.alt { opacity: 1; }
.card-tag { position: absolute; top: 12px; inset-inline-start: 12px; background: #fff; color: #000; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.card-info { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 4px; }
.card h3 { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.45; min-width: 0; }
.app-store .price { display: flex; gap: 8px; align-items: baseline; font-weight: 600; white-space: nowrap; }
.price s { color: var(--muted); font-weight: 400; font-size: 12px; }
.swatches { display: flex; gap: 5px; align-items: center; }
.swatch { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .18); }
.swatch-label { font-size: 12px; color: var(--muted); margin-inline-start: 4px; }
.card:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
@media (min-width: 721px) {
  .card.featured { grid-column: span 2; grid-row: span 2; grid-template-rows: 1fr auto auto; }
  .card.featured .card-media { aspect-ratio: auto; min-height: 100%; }
  .card.featured h3 { font-size: 20px; font-weight: 600; } .card.featured .price { font-size: 18px; }
}
@media (max-width: 720px) { .card.featured { grid-column: span 2; } .card.featured .card-media { aspect-ratio: 4 / 5; } .card.featured h3 { font-size: 17px; } }

/* editorial band */
.editorial { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); }
.editorial-img { min-height: 100%; } .editorial-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.editorial-copy { padding: clamp(40px, 7vw, 112px) max(var(--gutter), 4vw); display: grid; gap: 36px; align-content: center; justify-items: start; }
.statement { margin: 0; font-size: clamp(30px, 3.6vw, 54px); font-weight: 600; line-height: 1.2; letter-spacing: -.015em; max-width: 15ch; text-wrap: balance; }
.facts { margin: 0; display: grid; width: 100%; max-width: 520px; }
.facts > div { display: grid; grid-template-columns: 112px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid rgba(0, 0, 0, .12); }
.facts > div:last-child { border-bottom: 1px solid rgba(0, 0, 0, .12); }
.facts dt { font-weight: 600; } .facts dd { margin: 0; color: var(--muted); }
@media (max-width: 820px) { .editorial { grid-template-columns: 1fr; } .editorial-img img { aspect-ratio: 4 / 4.4; } .facts > div { grid-template-columns: 92px 1fr; } }

/* product page */
.pdp { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 4.5vw, 72px); padding: 20px 0 40px; align-items: start; }
.gallery { position: relative; min-width: 0; }
.gallery-strip { display: grid; gap: 8px; }
.gallery-main { aspect-ratio: 3 / 4; background: var(--soft); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-count { display: none; }
.buybox { display: grid; gap: 24px; align-content: start; position: sticky; top: calc(var(--header-h) + 28px); padding-top: 8px; }
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 13px; } .crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--fg); }
.buybox h1 { margin: -12px 0 0; font-size: clamp(28px, 2.8vw, 40px); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.buybox .price { font-size: 20px; margin-top: -10px; }
.app-store .opt-label { display: flex; gap: 10px; font-size: 13px; font-weight: 600; margin: 0 0 12px; }
.app-store .opt-label span { font-weight: 400; color: var(--muted); }
.color-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.color-opt { width: 40px; height: 40px; border-radius: 50%; padding: 4px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.color-opt span { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.color-opt.on { border: 1.5px solid var(--fg); }
.size-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.size-opt { min-width: 54px; height: 54px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: border-color .15s; }
.size-opt:hover { border-color: var(--fg); }
.size-opt.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.size-opt:disabled { color: #b5b1ab; cursor: not-allowed; background: linear-gradient(to top left, transparent calc(50% - .5px), #d8d4cf calc(50% - .5px), #d8d4cf calc(50% + .5px), transparent calc(50% + .5px)); }
.size-opt:disabled:hover { border-color: var(--line); }
.app-store .qty { border-radius: 999px; overflow: hidden; } .qty button { height: 44px; }
.buy-row { display: grid; gap: 10px; } .buy-row .btn { min-height: 56px; font-size: 15px; }
.stock-line { margin: 0; font-size: 13px; color: var(--muted); text-align: center; } .stock-line.low { color: var(--tone-amber); font-weight: 600; }
.pdesc { margin: 0; color: var(--muted); line-height: 1.85; }
.facts.compact > div { grid-template-columns: 84px 1fr; padding: 12px 0; font-size: 13px; border-color: var(--line); }
.more { padding: 80px 0 40px; border-top: 1px solid var(--line); margin-top: 48px; }
.more h2 { font-size: 24px; font-weight: 600; margin: 0 0 28px; }
.buy-bar { display: none; }
@media (max-width: 900px) {
  .pdp { grid-template-columns: 1fr; gap: 24px; padding-top: 0; }
  .gallery { margin-inline: calc(-1 * var(--gutter)); }
  .gallery-strip { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .gallery-strip::-webkit-scrollbar { display: none; }
  .gallery-strip .gallery-main { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 5; }
  .gallery-count { display: block; position: absolute; bottom: 14px; inset-inline-end: 14px; background: rgba(255, 255, 255, .88); padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
  .buybox { position: static; padding-top: 0; }
  .more { padding-top: 56px; padding-bottom: 96px; }
  .buy-bar { display: flex; align-items: center; gap: 14px; position: fixed; inset-inline: 0; bottom: 0; z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 10px max(var(--gutter), env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px)); }
  .buy-bar-info { display: grid; min-width: 0; flex: 1; line-height: 1.35; } .buy-bar-info b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .buy-bar-info span { font-size: 13px; color: var(--muted); }
  .buy-bar .btn { flex: 0 0 auto; min-width: 52%; }
}

/* cart drawer */
.drawer-wrap { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 800; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(460px, 100%); background: #fff; display: grid; grid-template-rows: auto 1fr auto; animation: slide .3s cubic-bezier(.2, .8, .2, 1); }
[dir=rtl] .drawer { animation-name: slide-rtl; }
@keyframes slide { from { transform: translateX(100%); } } @keyframes slide-rtl { from { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-wrap { animation: none; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 18px; font-weight: 600; }
.drawer-body { overflow: auto; padding: 4px 24px; } .drawer-foot { padding: 18px 24px calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: grid; gap: 10px; }
.line-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line-item img { width: 76px; height: 100px; object-fit: cover; background: var(--soft); }
.line-item h4 { margin: 0; font-size: 14px; font-weight: 600; } .line-item .meta { color: var(--muted); font-size: 12px; }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); }
.qty button { width: 38px; border: 0; background: none; cursor: pointer; font-size: 17px; } .qty span { min-width: 30px; display: grid; place-items: center; font-weight: 600; }
.totals { display: grid; gap: 8px; font-size: 14px; } .totals > div { display: flex; justify-content: space-between; gap: 12px; } .totals .grand { font-weight: 700; font-size: 17px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }

/* inner pages */
.page { padding: 40px 0 88px; }
.app-store .page h1 { font-size: clamp(30px, 4vw, 48px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 12px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; }
.two-col > .panel:last-child { position: sticky; top: calc(var(--header-h) + 20px); }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } .two-col > .panel:last-child { position: static; } }
.panel { border-radius: 20px; padding: 24px; background: var(--card); display: grid; gap: 16px; border: 1px solid var(--line); }
.app-store .two-col > .panel:last-child, .app-store .panel.tone { background: var(--soft); border-color: transparent; }
.panel h2, .panel h3 { margin: 0; font-size: 17px; font-weight: 600; }
.choice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; background: #fff; transition: border-color .15s; }
.choice:hover { border-color: #bdb8b2; }
.choice.on { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); } .choice.disabled { opacity: .5; cursor: not-allowed; }
.choice input { margin-top: 5px; accent-color: #000; }
.city-picker { position: relative; }
.city-list { position: absolute; z-index: 20; inset-inline: 0; top: calc(100% + 6px); max-height: 280px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .1); padding: 6px; }
.city-list button { display: flex; width: 100%; justify-content: space-between; gap: 10px; padding: 10px 12px; background: none; border: 0; cursor: pointer; text-align: start; border-radius: 10px; }
.city-list button:hover, .city-list button:focus { background: var(--soft); } .city-list button[disabled] { color: var(--muted); cursor: not-allowed; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; } .timeline li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--fg); margin-top: 8px; }
.timeline li:not(:first-child)::before { background: var(--line); }
.order-card { border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 10px; }
.order-card header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tabs button.on { color: var(--fg); border-color: var(--fg); }
.lookbook { columns: 3 260px; column-gap: 12px; } .lookbook figure { margin: 0 0 12px; break-inside: avoid; } .lookbook img, .lookbook video { width: 100%; }
.lookbook figcaption { font-size: 13px; color: var(--muted); padding-top: 6px; }
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; } @media (max-width: 800px) { .story { grid-template-columns: 1fr; } }
.success { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 64px 0; }
.success .tick { width: 72px; height: 72px; border-radius: 50%; background: #000; color: #fff; display: grid; place-items: center; font-size: 30px; }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0; }

/* footer: a quiet echo of the hero mark */
.footer { background: #000; color: #fff; padding: 72px 0 0; margin-top: 0; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-lead { grid-column: 1 / -1; } }
.footer-lead p { margin: 0; font-size: 22px; font-weight: 500; line-height: 1.45; max-width: 18ch; }
.footer-lead .footer-note { font-size: 13px; color: #8f8b86; margin-top: 14px; max-width: 32ch; font-weight: 400; }
.footer-h { font-size: 13px; color: #8f8b86; margin: 0 0 10px; }
.footer a { color: #e9e7e3; text-decoration: none; display: block; padding: 4px 0; font-size: 14px; } .footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid #222; margin-top: 56px; padding-top: 18px; }
.footer small { color: #8f8b86; }
.footer-mark { font-size: 26vw; line-height: .74; text-align: center; color: #161616; letter-spacing: -.095em; padding-inline-end: .09em; margin-top: 20px; transform: translateY(6%); user-select: none; }
.app-store .footer :focus-visible { outline-color: #fff; }

/* =================== ADMIN =================== */
.app-admin, .app-courier {
  --bg: #f4f5f7; --fg: #111827; --muted: #6b7280; --line: #e5e7eb; --soft: #eef0f3; --card: #ffffff; --accent: #4f46e5; --accent-fg: #fff; --radius: 8px;
}
.app-admin[data-theme=dark], .app-courier[data-theme=dark] {
  --bg: #0f1115; --fg: #e5e7eb; --muted: #9ca3af; --line: #262b33; --soft: #1a1e25; --card: #151920; --accent: #818cf8; --accent-fg: #0f1115;
  --tone-blue: #60a5fa; --tone-violet: #a78bfa; --tone-amber: #fbbf24; --tone-green: #4ade80; --tone-red: #f87171; --tone-grey: #9ca3af;
}
.app-admin { font-family: system-ui, -apple-system, "Segoe UI", "Tajawal", Arial, sans-serif; font-size: 14px; }
.admin-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--card); border-inline-end: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.side .brand { display: flex; align-items: center; gap: 8px; padding: 4px 10px 18px; } .side .brand .wordmark { font-size: 28px; }
.side button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: start; font-weight: 600; color: var(--muted); }
.side button:hover { background: var(--soft); color: var(--fg); } .side button.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.side .count { margin-inline-start: auto; background: var(--tone-red); color: #fff; border-radius: 10px; font-size: 11px; padding: 0 6px; font-weight: 800; }
.side .bottom { margin-top: auto; display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.main { padding: 22px 28px 60px; min-width: 0; }
.main-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; } .main-head h1 { margin: 0; font-size: 22px; }
.main-col { min-width: 0; }
.m-top, .m-tabs { display: none; }
.sheet-wrap { position: fixed; inset: 0; z-index: 900; background: rgba(0, 0, 0, .45); display: grid; align-items: end; animation: fade .2s ease; }
.sheet { background: var(--card); color: var(--fg); border-radius: 20px 20px 0 0; max-height: 88svh; overflow: auto; padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)); animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheet-up { from { transform: translateY(40%); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-wrap { animation: none; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px 12px; position: sticky; top: 0; background: var(--card); }
.sheet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sheet-item { position: relative; display: grid; justify-items: center; gap: 6px; padding: 14px 6px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--fg); font: inherit; font-size: 12px; font-weight: 600; text-align: center; line-height: 1.3; cursor: pointer; }
.sheet-item.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.sheet-ico { font-size: 22px; line-height: 1; }
.sheet-item .count { position: absolute; top: 6px; inset-inline-end: 6px; background: var(--tone-red); color: #fff; border-radius: 10px; font-size: 11px; padding: 0 6px; font-weight: 800; }
.sheet-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; border-top: 3px solid var(--tone, var(--accent)); }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 700; } .kpi .value { font-size: 22px; font-weight: 800; margin-top: 4px; } .kpi .sub { font-size: 12px; color: var(--muted); }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; min-width: 0; }
.box > h2 { font-size: 15px; margin: 0 0 12px; display: flex; gap: 8px; align-items: center; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: start; color: var(--muted); font-weight: 700; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td.num, .tbl td .num { white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--soft); }
.tbl .low { color: var(--tone-red); font-weight: 800; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; } .toolbar .input { width: auto; min-height: 38px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.money-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.money-grid div { background: var(--soft); border-radius: 8px; padding: 8px 10px; } .money-grid b { display: block; font-size: 16px; }
.thumb { width: 44px; height: 54px; object-fit: cover; border-radius: 6px; background: var(--soft); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.photo-grid figure { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); }
.photo-grid img { aspect-ratio: 4/5; object-fit: cover; width: 100%; } .photo-grid figcaption { padding: 6px; display: grid; gap: 4px; font-size: 12px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: min(380px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: grid; gap: 14px; }

/* ---------- print labels ---------- */
.label-ship { width: 100mm; height: 150mm; padding: 5mm; font-family: Arial, "Tajawal", sans-serif; color: #000; background: #fff; display: grid; grid-template-rows: auto auto 1fr auto; gap: 3mm; font-size: 10pt; }
.label-ship .top { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #000; padding-bottom: 2mm; } .label-ship .wordmark { font-size: 26pt; }
.label-ship .addr { font-size: 12pt; line-height: 1.35; } .label-ship .addr b { font-size: 14pt; }
.label-ship .pay { border: 2px solid #000; padding: 2mm; display: grid; grid-template-columns: 1fr 1fr; gap: 1mm 3mm; font-size: 9.5pt; }
.label-ship .pay .due { grid-column: 1 / -1; font-size: 15pt; font-weight: 900; text-align: center; border-top: 1px solid #000; padding-top: 1mm; }
.label-ship .barcode { height: 16mm; width: 100%; }
.label-sku { width: 80mm; height: 50mm; padding: 3mm 4mm; font-family: Arial, sans-serif; color: #000; background: #fff; display: grid; grid-template-rows: auto auto 1fr; gap: 1mm; font-size: 9pt; }
.label-sku .wordmark { font-size: 16pt; } .label-sku .barcode { height: 15mm; width: 100%; } .label-sku .row { justify-content: space-between; align-items: center; }
.barcode-wrap svg { width: 100%; height: 100%; fill: #000; display: block; }
.print-body .label-ship, .print-body .label-sku { page-break-after: always; }

/* =================== COURIER =================== */
.courier { max-width: 520px; margin: 0 auto; padding: 20px 16px 60px; display: grid; gap: 14px; }
.courier .big { font-size: 28px; font-weight: 900; }

/* ---------- discounts, online payment, reports, store settings ---------- */
.narrow { max-width: 760px; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--fg); animation: spin .8s linear infinite; margin: 0 auto 6px; }
.totals .discount, .totals .discount .num { color: var(--ok); }
.coupon-row { flex-wrap: nowrap; margin-top: 14px; }
.coupon-row .input { min-width: 0; flex: 1; }
.free-hint { background: var(--soft); border-radius: var(--radius); padding: 8px 12px; margin: 8px 0 0; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: 14px; padding: 10px 14px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--fg); border-bottom-color: var(--fg); }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(70px, 160px) 1fr auto; gap: 10px; align-items: center; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 12px; background: var(--soft); border-radius: 6px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--tone-blue); border-radius: 6px; }
.bar-val { white-space: nowrap; }
@media (max-width: 560px) { .bar-row { grid-template-columns: 1fr auto; } .bar-track { grid-column: 1 / -1; grid-row: 2; } }
.sms-row { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
details summary { cursor: pointer; margin: 10px 0; }

/* ---------- admin on phones (kept last so it wins over the base admin rules) ---------- */
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); } .side { display: none; }
  .app-admin, .app-courier { font-size: 15px; }
  .m-top { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px)); }
  .m-top .wordmark { font-size: 22px; }
  .m-title { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-lang { border: 1px solid var(--line); background: var(--card); color: var(--fg); border-radius: 999px; min-width: 40px; height: 34px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
  .m-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; inset-inline: 0; bottom: 0; z-index: 60; background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); }
  .m-tabs button { display: grid; justify-items: center; gap: 2px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; padding: 6px 2px; border-radius: 12px; cursor: pointer; min-width: 0; }
  .m-tabs button > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-tabs button.on { color: var(--accent); }
  .m-tabs button.on .m-ico { background: color-mix(in srgb, var(--accent) 14%, transparent); }
  .m-ico { position: relative; display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; font-size: 18px; line-height: 1; }
  .m-ico .dot { position: absolute; top: -2px; inset-inline-end: 6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--tone-red); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }
  .main { padding: 14px 14px calc(96px + env(safe-area-inset-bottom, 0px)); overflow-x: clip; }
  .main-head { gap: 8px; margin-bottom: 14px; }
  .main-head h1 { font-size: 20px; width: 100%; }
  .main-head .spacer { display: none; }
  .main-head > .btn, .main-head > .field, .main-head > select, .main-head > .input { flex: 1 1 auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 12px; border-radius: 14px; } .kpi .value { font-size: 18px; overflow-wrap: anywhere; }
  .box { padding: 14px 12px; border-radius: 14px; margin-bottom: 12px; }
  .toolbar { display: grid; grid-template-columns: minmax(0, 1fr); } .toolbar .input, .toolbar select, .toolbar .btn { width: 100%; }
  .app-admin .input, .app-admin select, .app-admin textarea { font-size: 16px; }
  .app-admin .btn { min-height: 44px; }
  /* tables become stacked cards; each cell shows its column name */
  .tbl-wrap { overflow: visible; }
  table.tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl thead { display: none; }
  .tbl tr { border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; margin-bottom: 10px; background: var(--card); }
  .tbl tr:last-child { margin-bottom: 0; }
  .tbl td { border: 0; padding: 5px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: end; min-height: 30px; font-size: 14px; overflow-wrap: anywhere; }
  .tbl td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: start; flex: 0 0 auto; max-width: 42%; }
  .tbl td:not([data-label]) { justify-content: flex-start; flex-wrap: wrap; }
  .tbl td:not([data-label])::before { content: none; }
  .tbl td:empty { display: none; }
  .tbl td[colspan] { text-align: center; justify-content: center; }
  .tbl tr.click:hover td { background: none; } .tbl tr.click:active { background: var(--soft); }
  .tbl td .btn.small { min-height: 38px; }
  .tbl td .input { max-width: 60%; }
  /* windows slide up from the bottom and use the full width */
  .modal-wrap { align-items: end; padding: 0; }
  .modal, .modal.wide { width: 100%; max-height: 94svh; border-radius: 20px 20px 0 0; animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1); }
  .modal-head { padding: 14px 16px; } .modal-body { padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .row > .field { flex: 1 1 140px; }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .money-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs { margin-inline: -14px; padding-inline: 14px; }
}
