:root {
  --ink: #1d1a17; --soft: #6e665e; --line: #e8e1d8; --bg: #fffdfa; --sand: #f5efe6; --accent: #c4512f; --accent-d: #a8411f;
  --r: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; min-width: 0; }
html { scroll-behavior: smooth; }
body { font: 16px/1.7 "IBM Plex Sans Arabic", system-ui, sans-serif; color: var(--ink); background: var(--bg); overflow-x: clip; }
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Top */
.strip { background: var(--ink); color: #f3ece2; text-align: center; font-size: 13.5px; padding: 8px 12px; }
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { text-decoration: none; display: inline-flex; align-items: baseline; gap: 8px; }
.logo-ar { font-weight: 700; font-size: 26px; letter-spacing: 0; }
.logo-en { font-size: 13px; color: var(--soft); font-weight: 500; }
.logo.small .logo-ar { font-size: 22px; }
.lang { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 16px; cursor: pointer; font-size: 14px; font-weight: 500; min-height: 40px; }
.lang:hover { border-color: var(--ink); }

/* Home: hero */
.hero { background: var(--sand); border-bottom: 1px solid var(--line); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; padding: 56px 20px; }
.hero h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.12; font-weight: 700; text-wrap: balance; }
.hero p { font-size: 17px; color: #4a433c; margin: 16px 0 26px; max-width: 46ch; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: #fff; text-decoration: none;
  border: 0; border-radius: 999px; padding: 14px 28px; font-weight: 600; font-size: 16px; cursor: pointer; min-height: 50px; }
.btn:hover { background: var(--accent-d); }
.mosaic { display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; aspect-ratio: 1.15; }
.mosaic a { border-radius: var(--r); overflow: hidden; display: block; background: #fff; }
.mosaic a:first-child { grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.mosaic a:hover img { transform: scale(1.04); }

/* Trust row */
.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 28px 20px; }
.trust div { display: flex; gap: 12px; align-items: flex-start; }
.trust svg { flex: none; width: 30px; height: 30px; color: var(--accent); }
.trust b { display: block; font-size: 15px; }
.trust span { font-size: 13.5px; color: var(--soft); }

/* Country filter + grid */
.shop { padding: 20px 20px 64px; }
.shop-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; border-top: 1px solid var(--line); padding-top: 36px; }
.shop-head h2 { font-size: 28px; line-height: 1.2; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: 14px; color: var(--soft); align-self: center; margin-inline-end: 4px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 16px; cursor: pointer; font-size: 14px; min-height: 40px; }
.chip[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 30px 22px; }
.card { text-decoration: none; display: grid; gap: 6px; align-content: start; }
.card .pic { border-radius: var(--r); overflow: hidden; aspect-ratio: 1; background: var(--tint, var(--sand)); position: relative; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .pic img { transform: scale(1.04); }
.card .flag { position: absolute; top: 10px; inset-inline-start: 10px; background: rgba(255,255,255,.92); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 500; }
.card b { font-size: 16.5px; line-height: 1.4; margin-top: 6px; }
.card .short { font-size: 14px; color: var(--soft); line-height: 1.5; }
.card .row { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.card .price { font-weight: 700; font-size: 16px; white-space: nowrap; }
.dots { display: flex; gap: 5px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.15); }

/* Product view */
.crumb { padding: 18px 0 0; font-size: 14px; color: var(--soft); }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; padding: 18px 0 56px; align-items: start; }
.photo { position: sticky; top: 84px; background: var(--tint, var(--sand)); border-radius: var(--r); overflow: hidden; }
.photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.buy h1 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.25; font-weight: 700; }
.buy .sub { color: var(--soft); margin-top: 4px; }
.buy .price { font-size: 28px; font-weight: 700; margin: 14px 0 6px; white-space: nowrap; }
.lead { color: #3d3730; margin: 10px 0 24px; }
.label { font-weight: 600; font-size: 14.5px; margin-bottom: 10px; }
.label em { font-style: normal; font-weight: 400; color: var(--soft); }
.swatches { display: flex; gap: 10px; margin-bottom: 22px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); background: var(--c); cursor: pointer; }
.swatch[aria-checked=true] { box-shadow: 0 0 0 2px var(--ink); }
.offers { border: 0; display: grid; gap: 8px; margin-bottom: 20px; }
.offers label { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); background: #fff;
  border-radius: 12px; padding: 13px 16px; cursor: pointer; min-height: 54px; }
.offers label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.offers input { width: 18px; height: 18px; accent-color: var(--ink); }
.offers small { color: var(--accent); font-size: 12.5px; font-weight: 600; margin-inline-start: 6px; }
.offers b { white-space: nowrap; }
.field { display: grid; gap: 5px; font-size: 14px; font-weight: 500; margin-bottom: 12px; }
.field input, .field select { font: 16px "IBM Plex Sans Arabic", sans-serif; padding: 12px 14px; border: 1px solid #d8d0c5; border-radius: 10px; background: #fff; width: 100%; color: var(--ink); }
.field input:focus, .field select:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.tel { display: flex; direction: ltr; }
.tel i { font-style: normal; padding: 12px; border: 1px solid #d8d0c5; border-right: 0; border-radius: 10px 0 0 10px; background: var(--sand); }
.tel input { border-radius: 0 10px 10px 0; }
.err { color: #b3261e; font-size: 14px; margin-bottom: 10px; }
.submit { width: 100%; border-radius: 12px; font-size: 17px; min-height: 56px; }
.submit:disabled { opacity: .6; cursor: wait; }
.hint { font-size: 13.5px; color: var(--soft); margin-top: 10px; text-align: center; }
.done { border: 1px solid var(--line); border-radius: var(--r); padding: 26px; background: var(--sand); }
.done h2 { font-size: 22px; margin-bottom: 6px; }
.done .note { font-size: 13px; color: var(--accent); margin-top: 8px; }
.details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; border-top: 1px solid var(--line); padding: 40px 0; }
.details h2 { font-size: 18px; margin-bottom: 10px; }
.details ol, .details ul { padding-inline-start: 20px; display: grid; gap: 6px; color: #3d3730; }
.faq { border-top: 1px solid var(--line); padding: 36px 0; max-width: 760px; }
.faq h2 { font-size: 20px; margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 500; }
.faq p { color: #4a433c; margin-top: 6px; }
.more { border-top: 1px solid var(--line); padding: 36px 0 64px; }
.more h2 { font-size: 22px; margin-bottom: 18px; }
.more .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }

/* Policy */
.policy { max-width: 720px; padding: 40px 20px 72px; }
.policy h1 { font-size: 32px; margin-bottom: 18px; }
.policy h2 { font-size: 18px; margin: 22px 0 4px; }
.policy p { color: #3d3730; }

/* Footer */
.foot { background: var(--sand); border-top: 1px solid var(--line); }
.foot-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 32px 20px 40px; font-size: 14px; color: var(--soft); }
.foot p { margin-top: 6px; max-width: 44ch; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; align-items: start; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--ink); }

.sticky { display: none; }

@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; gap: 28px; padding: 32px 20px 36px; }
  .product { grid-template-columns: 1fr; gap: 22px; }
  .photo { position: static; margin: 0 -20px; border-radius: 0; }
  .photo img { aspect-ratio: auto; max-height: 56vh; }
  .details { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 600px) {
  .trust { grid-template-columns: 1fr; gap: 14px; padding: 22px 20px; }
  .grid, .more .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .card b { font-size: 14.5px; }
  .card .short { display: none; }
  .card .row { flex-wrap: wrap; gap: 6px; }
  .shop-head h2 { font-size: 24px; }
  .sticky { display: block; position: fixed; inset: auto 0 0 0; background: var(--accent); color: #fff; text-align: center;
    padding: 15px; font-weight: 600; text-decoration: none; z-index: 20; transition: transform .2s; }
  .sticky.hide { transform: translateY(100%); }
  .foot-in { padding-bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .mosaic img, .card .pic img, .sticky { transition: none; } }

/* ===== Per-product colours (set from catalog.json → theme) ===== */
:root { --page: var(--bg); --deep: var(--ink); --accent-d: color-mix(in srgb, var(--accent) 80%, #000); }
* { -webkit-tap-highlight-color: transparent; }
a, button, label, select, input { touch-action: manipulation; }
body[data-view=product] { background: var(--page); }
body[data-view=product] .top { background: var(--page); border-color: color-mix(in srgb, var(--accent) 18%, transparent); }
body[data-view=product] .strip { background: var(--deep); }
body[data-view=product] .foot { background: color-mix(in srgb, var(--page) 70%, #fff); }
.btn { transition: background .2s, transform .1s; }
.btn:active { transform: scale(.98); }
.photo { background: #fff; box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 15%, transparent); }
.buy h1 { color: var(--deep); }
.label em, .offers small { color: var(--accent); }
.swatch { transition: box-shadow .15s; }
.swatch[aria-checked=true] { box-shadow: 0 0 0 2px var(--accent); }
.offers label { transition: border-color .15s, box-shadow .15s, background .15s; }
.offers label:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); }
.offers input { accent-color: var(--accent); }
.field input:focus, .field select:focus { outline-color: var(--accent); }
.done { background: #fff; border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.done h2 { color: var(--accent); }
.details, .faq, .more { border-color: color-mix(in srgb, var(--accent) 15%, var(--line)); }
.more-btn { display: none; }
#order, #done, #err { scroll-margin: 80px; }

/* ===== Phone ===== */
@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .strip { font-size: 12.5px; padding: 6px 10px; }
  .top-in { height: 54px; }
  .logo-ar { font-size: 22px; }
  .lang { min-height: 36px; padding: 5px 14px; font-size: 13px; }

  /* Home: short hero, swipeable photos, products appear sooner */
  .hero-in { padding: 22px 20px 24px; gap: 18px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 15px; margin: 10px 0 16px; }
  .hero .btn { width: 100%; }
  .mosaic { display: flex; aspect-ratio: auto; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -20px; padding: 0 20px; scrollbar-width: none; }
  .mosaic::-webkit-scrollbar { display: none; }
  .mosaic a { flex: 0 0 74%; aspect-ratio: 1; scroll-snap-align: center; }
  .mosaic a:first-child { grid-row: auto; }
  .trust { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 16px 14px; text-align: center; }
  .trust div { flex-direction: column; align-items: center; gap: 4px; }
  .trust svg { width: 26px; height: 26px; }
  .trust b { font-size: 12.5px; line-height: 1.35; }
  .trust span { display: none; }
  .shop { padding: 4px 16px 48px; }
  .shop-head { padding-top: 22px; margin-bottom: 14px; gap: 10px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 32px); margin: 0 -16px; padding: 2px 16px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }

  /* Product: photo, name, price, colour, offer, form — in that order, no hunting */
  .crumb { display: none; }
  .product { padding-top: 0; gap: 16px; }
  .photo { margin: 0 -20px; border-radius: 0; box-shadow: none; }
  .photo img { aspect-ratio: 1; max-height: none; }
  .buy h1 { font-size: 23px; }
  .buy .sub { font-size: 14px; }
  .buy .price { font-size: 24px; margin: 8px 0 2px; }
  .lead { margin: 8px 0 4px; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .lead.open { display: block; }
  .more-btn { display: inline; border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 14px; padding: 4px 0; margin-bottom: 14px; cursor: pointer; }
  .swatches { margin-bottom: 16px; }
  .offers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .offers legend { margin-bottom: 8px; }
  .offers label { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 2px; padding: 12px 4px; min-height: 76px; position: relative; }
  .offers input { position: absolute; opacity: 0; pointer-events: none; }
  .offers span { font-size: 13.5px; line-height: 1.3; }
  .offers small { display: block; margin: 2px 0 0; font-size: 11.5px; }
  .offers b { font-size: 14px; }
  .field { margin-bottom: 10px; }
  .field input, .field select { padding: 13px 14px; min-height: 50px; }
  .submit { min-height: 58px; font-size: 17px; }
  .details { padding: 26px 0; }
  .faq { padding: 24px 0; }
  .more { padding: 26px 0 40px; }
  .sticky { background: var(--accent); padding: 15px 15px calc(15px + env(safe-area-inset-bottom)); font-size: 16px; box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
  .foot-in { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
}

.chips span { white-space: nowrap; }

/* Growth quick wins 2026-11-21: trust row under the price, savings on bundle offers */
.mini-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 10px; padding: 0; font-size: 13px; color: var(--deep, #333); }
.mini-trust li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-inline-end: 5px; }
.offers small.save { display: inline-block; background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); border-radius: 999px; padding: 1px 8px; font-weight: 700; }
@media (max-width: 600px) { .offers small.save { display: block; margin: 3px auto 0; padding: 1px 6px; width: fit-content; } }
