/* ==========================================================
   D Mobile — Storefront styles
   ========================================================== */
:root {
  --red: #c8102e;
  --red-d: #9b0c23;
  --red-l: #fdecef;
  --ink: #16161a;
  --ink-2: #3a3a42;
  --muted: #8a8a96;
  --line: #ececf1;
  --bg: #f5f5f8;
  --card: #ffffff;
  --green: #12a150;
  --green-l: #e7f7ee;
  --amber: #c27c00;
  --amber-l: #fff4dc;
  --blue: #2563eb;
  --blue-l: #e8efff;
  --purple: #6d28d9;
  --purple-l: #f1ebff;
  --radius: 16px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(16, 16, 24, .04), 0 4px 16px rgba(16, 16, 24, .06);
  --shadow-l: 0 10px 40px rgba(16, 16, 24, .16);
  --nav-h: 68px;
  --font: 'Inter', 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, Tahoma, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.i { width: 22px; height: 22px; flex: none; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 640px; }
.red { color: var(--red) !important; }
.center { text-align: center; }
.hint { color: var(--muted); font-size: 13px; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topbar.home { background: linear-gradient(135deg, var(--red) 0%, var(--red-d) 100%); border: 0; padding-bottom: 14px; color: #fff; }
.topbar.home .tb-row { height: 70px; }
.tb-row { display: flex; align-items: center; gap: 8px; height: 60px; }
.tb-title { flex: 1; text-align: center; line-height: 1.15; min-width: 0; }
.tb-title b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title span { font-size: 12px; color: var(--muted); font-family: 'Cairo', var(--font); }
.tb-actions { display: flex; gap: 2px; min-width: 40px; justify-content: flex-end; margin-left: auto; }
.logo-link { flex: 1; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--ink); transition: background .15s; }
.icon-btn:hover { background: rgba(0,0,0,.05); }
.icon-btn.light { color: #fff; }
.icon-btn.light:hover { background: rgba(255,255,255,.15); }
.icon-btn.red { color: var(--red); }
.icon-btn.sm { width: 32px; height: 32px; color: var(--muted); }
.icon-btn.sm .i { width: 18px; height: 18px; }

.badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.topbar.home .badge { background: #fff; color: var(--red); border-color: var(--red); }
.badge.static { position: static; margin-left: auto; border: 0; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; letter-spacing: -.5px; }
.logo-mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-size: 19px; border: 2.5px solid currentColor; }
.logo.light .logo-mark { background: transparent; color: #fff; }
.logo-img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; background: #fff; }
.logo-text { white-space: nowrap; }
.brand-logo img { height: 56px; width: auto; filter: drop-shadow(0 1px 2px rgba(0,0,0,.15)); }
.dr-head .brand-logo img { height: 56px; }
@media (min-width: 960px) { .topbar.home .brand-logo img { height: 66px; } }

/* Search */
.search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; background: #fff; border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.12); color: var(--muted); }
.search.grey { background: var(--bg); box-shadow: none; margin-bottom: 12px; }
.search input { flex: 1; border: 0; outline: 0; background: none; color: var(--ink); min-width: 0; }
.search input::-webkit-search-cancel-button { display: none; }

/* ---------- Bottom nav ---------- */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bn-inner { display: flex; max-width: 640px; margin: 0 auto; height: var(--nav-h); }
.bn-item { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--muted); }
.bn-item .badge { top: 6px; right: calc(50% - 22px); }
.bn-item.active { color: var(--red); font-weight: 700; }
.bn-item.active::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--red); }
.bn-item.bump .i { animation: bump .45s ease; }
@keyframes bump { 30% { transform: scale(1.35) rotate(-8deg); } 60% { transform: scale(.9); } }

/* ---------- Drawer ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(10,10,15,.45); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 50; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(86vw, 340px); background: #fff; z-index: 60; transform: translateX(-102%); transition: transform .3s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; box-shadow: var(--shadow-l); }
.drawer-open .backdrop { opacity: 1; pointer-events: auto; }
.drawer-open .drawer { transform: none; }
.drawer-open { overflow: hidden; }
.dr-head { background: linear-gradient(135deg, var(--red), var(--red-d)); color: #fff; padding: calc(18px + env(safe-area-inset-top)) 16px 18px 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.dr-head p { width: 100%; margin: 8px 0 0; font-size: 13px; opacity: .85; }
.dr-body { flex: 1; overflow-y: auto; padding: 10px 10px 20px; overscroll-behavior: contain; }
.dr-link { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; font-weight: 600; }
.dr-link:hover, .dr-cat:hover { background: var(--bg); }
.dr-link .i { color: var(--red); }
.dr-link small, .dr-cat small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); font-family: 'Cairo', var(--font); }
.dr-title { margin: 14px 12px 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.dr-title span { font-family: 'Cairo', var(--font); text-transform: none; letter-spacing: 0; }
.dr-cat { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; }
.dr-cat-img { width: 44px; height: 44px; border-radius: 12px; background: var(--bg); overflow: hidden; flex: none; display: grid; place-items: center; }
.dr-cat-img img { width: 100%; height: 100%; object-fit: cover; }
.dr-cat-img .ph { font-size: 22px; background: none; }
.dr-cat-name { flex: 1; font-weight: 600; font-size: 14px; }
.dr-count { font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 2px 8px; }
.dr-cat .i { width: 16px; height: 16px; color: #c4c4cc; }
.dr-admin { padding: 10px 12px 0; border-top: 1px solid var(--line); }
.dr-admin-btn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 700; }
.dr-admin-btn:hover { background: #2a2a31; }
.dr-admin-btn span { flex: 1; }
.dr-admin-btn small { display: block; font-weight: 400; font-size: 12px; color: #b9b9c4; font-family: 'Cairo', var(--font); }
.dr-admin-btn .i:last-child { width: 16px; height: 16px; color: #8b8b97; }
.dr-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.dr-foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.dr-foot .i { width: 18px; height: 18px; color: var(--red); }

/* ---------- Generic ---------- */
.view { min-height: 60vh; padding: 16px 0 24px; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 46px; background: linear-gradient(135deg, #f7f7fa, #ececf2); }
.loader { display: grid; place-items: center; padding: 80px 0; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--red); animation: spin .8s linear infinite; }
.spinner.sm { width: 18px; height: 18px; border-width: 2px; border-color: rgba(255,255,255,.4); border-top-color: #fff; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 14px; font-weight: 700; font-size: 15px; transition: transform .1s, background .15s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn.lg { height: 54px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(200,16,46,.28); }
.btn.primary:hover { background: var(--red-d); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.ghost { background: var(--bg); color: var(--ink); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn .i { width: 20px; height: 20px; }
.link-center { display: block; text-align: center; margin-top: 12px; color: var(--muted); font-weight: 600; font-size: 14px; }

.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 8px; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }

.sec { margin-top: 26px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.sec-h h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.sec-h h2 span { font-family: 'Cairo', var(--font); font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.sec-h a { color: var(--red); font-weight: 700; font-size: 13px; }
.count { color: var(--muted); font-size: 13px; margin: 4px 0 12px; }

.empty { text-align: center; padding: 60px 20px; }
.empty-ic { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%; background: var(--red-l); color: var(--red); display: grid; place-items: center; }
.empty-ic .i { width: 38px; height: 38px; }
.empty h3 { margin: 0 0 4px; font-size: 19px; }
.empty p { margin: 0 0 20px; color: var(--muted); font-family: 'Cairo', var(--font); }

/* ---------- Hero ---------- */
.hero { position: relative; margin-top: 2px; }
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 20px; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { flex: 0 0 100%; scroll-snap-align: start; display: flex; align-items: center; min-height: 190px; padding: 22px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #ff4d67 0%, var(--red) 45%, #6e0617 100%); position: relative; overflow: hidden; }
.hero-slide::after { content: ''; position: absolute; width: 260px; height: 260px; right: -60px; bottom: -120px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero-text { flex: 1.1; position: relative; z-index: 1; }
.hero-text small { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.hero-text h2 { margin: 6px 0; font-size: clamp(22px, 5vw, 38px); line-height: 1.1; letter-spacing: -.5px; }
.hero-text p { margin: 0 0 14px; font-size: 17px; font-weight: 700; }
.hero-text p s { opacity: .6; font-weight: 500; font-size: 14px; }
.btn-pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--ink); padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.btn-pill .i { width: 16px; height: 16px; }
.hero-img { flex: 1; height: 160px; position: relative; z-index: 1; display: grid; place-items: center; }
.hero-img img { max-height: 100%; object-fit: contain; filter: drop-shadow(0 12px 22px rgba(0,0,0,.35)); }
.hero-img .ph { background: rgba(255,255,255,.12); border-radius: 20px; font-size: 64px; }
.hero-dots { position: absolute; bottom: 10px; left: 22px; display: flex; gap: 6px; }
.hero-dots button { width: 7px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.5); transition: width .25s; }
.hero-dots button.on { width: 22px; background: #fff; }

/* Quick links */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; text-align: center; }
.quick a > span { width: 62px; height: 62px; border-radius: 50%; background: var(--red-l); display: grid; place-items: center; font-size: 28px; overflow: hidden; transition: transform .15s; }
.quick a:hover > span { transform: translateY(-2px); }
.quick a > span img { width: 100%; height: 100%; object-fit: cover; }
.quick .q-ic { color: var(--red); }
.quick .q-ic .i { width: 28px; height: 28px; }

/* Category chips */
.cat-chip { width: 104px; text-align: center; }
.cc-img { display: grid; place-items: center; width: 104px; height: 96px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 7px; }
.cc-img img { width: 100%; height: 100%; object-fit: cover; }
.cc-img .ph { background: #fff; font-size: 38px; }
.cat-chip b { display: block; font-size: 12.5px; line-height: 1.2; }
.cat-chip small { font-family: 'Cairo', var(--font); font-size: 11.5px; color: var(--muted); }

.brands .brand { min-width: 96px; height: 54px; padding: 0 16px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; font-weight: 800; letter-spacing: -.2px; font-size: 15px; }

/* ---------- Product cards ---------- */
.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pcard { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(16,16,24,.1); }
.prow-scroll .pcard { width: 168px; }
.pimg { position: relative; aspect-ratio: 1; background: #fafafc; }
.pimg img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.disc { position: absolute; top: 10px; right: 10px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 8px; }
.disc.big { top: 14px; right: 14px; font-size: 14px; padding: 5px 10px; z-index: 2; }
.oos { position: absolute; left: 10px; bottom: 10px; background: rgba(22,22,26,.85); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 8px; }
.pinfo { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.pinfo small { color: var(--muted); font-size: 12px; }
.pinfo h3 { margin: 2px 0 8px; font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.prow { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.price { color: var(--red); font-weight: 800; font-size: 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.price em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 11px; width: 100%; }
.price s { color: var(--muted); font-weight: 500; font-size: 12px; }
.add-mini { width: 34px; height: 34px; border-radius: 11px; background: var(--red); color: #fff; display: grid; place-items: center; flex: none; transition: transform .1s; }
.add-mini:active { transform: scale(.9); }
.add-mini .i { width: 18px; height: 18px; }

/* ---------- Categories page ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 10px 14px; text-align: center; transition: transform .15s; }
.cat-card:hover { transform: translateY(-2px); }
.cat-img { aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; margin-bottom: 10px; background: #fafafc; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-img .ph { font-size: 52px; }
.cat-card b { display: block; font-size: 14px; }
.cat-card small { display: block; font-family: 'Cairo', var(--font); color: var(--muted); font-size: 13px; }
.cat-count { display: inline-block; margin-top: 6px; font-size: 11px; color: var(--red); background: var(--red-l); border-radius: 8px; padding: 2px 8px; font-weight: 600; }

/* Toolbar / chips */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.toolbar .chips { flex: 1; margin: 0; padding: 4px 0 8px; }
.chips { display: flex; gap: 8px; }
.chips.wrap { flex-wrap: wrap; }
.chip { height: 36px; padding: 0 14px; border-radius: 18px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip.on { background: var(--red); border-color: var(--red); color: #fff; }
.sort { height: 36px; border-radius: 12px; border: 1px solid var(--line); background: #fff; padding: 0 10px; font-size: 13px; font-weight: 600; flex: none; }

/* ---------- Product page ---------- */
.pp-grid { display: grid; gap: 20px; }
.gallery { position: relative; }
.g-main { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: #fff; border-radius: 22px; box-shadow: var(--shadow); }
.g-main::-webkit-scrollbar { display: none; }
.g-slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1; display: grid; place-items: center; }
.g-slide img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.g-slide .ph { font-size: 90px; background: none; }
.g-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.g-thumb { width: 62px; height: 62px; border-radius: 12px; background: #fff; border: 2px solid transparent; overflow: hidden; flex: none; box-shadow: var(--shadow); }
.g-thumb.on { border-color: var(--red); }
.g-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.g-thumb .ph { font-size: 22px; }
.pp-cat { font-size: 12px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .08em; }
.pp-info h1 { margin: 4px 0 2px; font-size: 24px; letter-spacing: -.4px; line-height: 1.2; }
.ar-name { margin: 0; font-family: 'Cairo', var(--font); color: var(--ink-2); }
.pp-brand { margin: 4px 0 10px; color: var(--muted); font-size: 14px; }
.in-text { color: var(--green); font-weight: 600; }
.oos-text { color: var(--red); font-weight: 600; }
.low-text { color: var(--amber); font-weight: 700; }
.pp-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px; }
.pp-price b { color: var(--red); font-size: 30px; letter-spacing: -.5px; }
.pp-price s { color: var(--muted); font-size: 17px; }
.opt { margin-bottom: 16px; }
.opt > label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.opt > label b { font-weight: 500; color: var(--muted); }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-btn { min-width: 86px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; }
.opt-btn.on { border-color: var(--red); color: var(--red); background: var(--red-l); }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent; padding: 3px; }
.swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.swatch.on { border-color: var(--red); }
.qty-row { display: flex; align-items: center; justify-content: space-between; }
.qty-row > label { margin: 0; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; height: 44px; }
.stepper button { width: 42px; height: 100%; display: grid; place-items: center; }
.stepper b { min-width: 30px; text-align: center; }
.stepper .i { width: 18px; height: 18px; }
.stepper.sm { height: 34px; border-radius: 10px; }
.stepper.sm button { width: 32px; }
.stepper.sm .i { width: 15px; height: 15px; }
.pp-actions { display: grid; gap: 10px; margin: 6px 0 18px; }
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.perks div { background: #fff; border-radius: 14px; padding: 12px 8px; text-align: center; font-size: 12px; font-weight: 600; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.perks .i { color: var(--red); }
.perks small { display: block; font-family: 'Cairo', var(--font); color: var(--muted); font-weight: 500; }
.desc { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.desc h3 { margin: 0 0 8px; font-size: 15px; }
.desc p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }

/* ---------- Cart ---------- */
.cart-page { display: grid; gap: 16px; align-items: start; }
.cart-list { display: grid; gap: 10px; }
.cart-item { display: flex; gap: 12px; background: #fff; border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.ci-img { width: 88px; height: 88px; border-radius: 12px; overflow: hidden; background: #fafafc; flex: none; }
.ci-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.ci-img .ph { font-size: 32px; }
.ci-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ci-top { display: flex; justify-content: space-between; gap: 6px; align-items: flex-start; }
.ci-top b { font-size: 14.5px; line-height: 1.3; }
.ci-info > small { color: var(--muted); font-size: 12.5px; }
.ci-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 8px; }
.ci-bottom .price { font-size: 17px; }
.summary { padding: 18px; }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: var(--ink-2); }
.sum-row.total { font-size: 17px; color: var(--ink); font-weight: 700; padding: 10px 0 14px; border-top: 1px dashed var(--line); margin-top: 6px; }
.sum-row.total b { font-size: 20px; }
.free-note { display: flex; align-items: center; gap: 8px; background: var(--amber-l); color: var(--amber); padding: 10px 12px; border-radius: 12px; font-size: 13px; margin-bottom: 10px; }
.free-note.ok { background: var(--green-l); color: var(--green); }
.free-note .i { width: 18px; height: 18px; }

/* ---------- Checkout ---------- */
.steps { display: flex; align-items: flex-start; margin: 4px 0 22px; }
.step { display: flex; flex-direction: column; align-items: center; text-align: center; width: 70px; flex: none; color: var(--muted); }
.step .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #d4d4dc; display: grid; place-items: center; background: #fff; margin-bottom: 4px; }
.step .dot .i { width: 14px; height: 14px; }
.step b { font-size: 12px; }
.step small { font-family: 'Cairo', var(--font); font-size: 11px; }
.step.current, .step.done { color: var(--red); }
.step.current .dot { border-color: var(--red); box-shadow: inset 0 0 0 5px #fff; background: var(--red); }
.step.done .dot { background: var(--red); border-color: var(--red); color: #fff; }
.step-line { flex: 1; height: 2px; background: #d4d4dc; margin-top: 12px; }
.step.done + .step-line { background: var(--red); }

.form { display: grid; gap: 10px; }
.f-title { margin: 14px 0 6px; font-size: 16px; }
.f-title span { display: block; font-family: 'Cairo', var(--font); font-size: 13px; color: var(--muted); font-weight: 600; }
.field { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 14px; transition: border-color .15s, box-shadow .15s; }
.field:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px rgba(200,16,46,.08); }
.field > .i { color: var(--muted); width: 20px; height: 20px; }
.field > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.field small { font-size: 11.5px; color: var(--muted); }
.field input { border: 0; outline: 0; background: none; font-size: 15px; padding: 2px 0; width: 100%; }
[data-addr] { display: grid; gap: 10px; }
.radio-card { display: flex; align-items: center; gap: 12px; padding: 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; margin-bottom: 10px; }
.form .radio-card { margin: 0; }
.radio-card input { appearance: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c9c9d2; flex: none; margin: 0; display: grid; place-items: center; }
.radio-card input:checked { border-color: var(--red); }
.radio-card input:checked::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.radio-card:has(input:checked) { border-color: var(--red); background: #fffafb; }
.radio-card b { display: block; font-size: 15px; }
.radio-card small { font-size: 12.5px; color: var(--muted); font-family: 'Cairo', var(--font); }
.rc-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--red-l); color: var(--red); display: grid; place-items: center; flex: none; }
.rc-ic.green { background: var(--green-l); color: var(--green); }
.rc-ic.whish, .wb-logo { background: linear-gradient(135deg, #7c3aed, #5b21b6); color: #fff; font-weight: 900; font-size: 22px; font-family: Inter, sans-serif; }
.form-err { color: var(--red); font-size: 14px; font-weight: 600; min-height: 1px; margin: 4px 0; }
.whish-box { display: flex; gap: 14px; background: var(--purple-l); border-radius: 16px; padding: 16px; margin: 4px 0 8px; color: #3b1a7a; font-size: 14px; }
.wb-logo { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.whish-box b { white-space: nowrap; }
.whish-box ol { margin: 6px 0 0; padding-left: 18px; line-height: 1.7; }
.whish-box p { margin: 4px 0 0; }
.info-box { display: flex; align-items: center; gap: 10px; background: var(--green-l); color: #0c6b37; padding: 12px 14px; border-radius: 14px; font-size: 14px; margin: 6px 0 12px; text-align: left; }
.info-box.red { background: var(--red-l); color: var(--red); }
.mini-summary { padding: 14px 16px; margin-bottom: 14px; }
.ms-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ms-item > span { flex: 1; min-width: 0; }
.ms-item small { display: block; color: var(--muted); font-size: 12px; }
.ms-img { width: 46px !important; height: 46px !important; border-radius: 10px; object-fit: contain; background: #fafafc; flex: none; font-size: 20px; }
.ship-to { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); background: var(--bg); padding: 12px; border-radius: 12px; }
.ship-to .i { color: var(--red); width: 20px; height: 20px; }
.ship-to span { flex: 1; }
.ship-to a { color: var(--red); font-weight: 700; }

.success { text-align: center; padding: 28px 20px; }
.ok-circle { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 10px var(--green-l); animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
.ok-circle .i { width: 42px; height: 42px; stroke-width: 3; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.success h2 { margin: 6px 0; }
.success p { color: var(--muted); margin: 0 0 16px; }
.success .ar { font-family: 'Cairo', var(--font); }
.order-no { background: var(--bg); border-radius: 14px; padding: 12px; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.order-no b { display: block; color: var(--ink); font-size: 24px; letter-spacing: .5px; }
.success .btn { margin-top: 10px; }
.success .whish-box { text-align: left; }

/* ---------- Orders ---------- */
.otabs { margin-bottom: 8px; }
.otab { min-width: 92px; padding: 8px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 13px; text-align: center; line-height: 1.2; position: relative; }
.otab small { display: block; font-family: 'Cairo', var(--font); font-weight: 500; font-size: 11px; color: var(--muted); }
.otab i { position: absolute; top: -6px; right: -4px; font-style: normal; font-size: 10px; background: var(--ink); color: #fff; border-radius: 8px; padding: 1px 6px; }
.otab.on { background: var(--red); border-color: var(--red); color: #fff; }
.otab.on small { color: rgba(255,255,255,.85); }
.olist { display: grid; gap: 12px; }
.ocard { padding: 14px 16px; }
.ocard summary { list-style: none; cursor: pointer; }
.ocard summary::-webkit-details-marker { display: none; }
.oc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.oc-top b { font-size: 15px; }
.oc-top small { display: block; color: var(--muted); font-size: 12.5px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; line-height: 1.15; }
.status small { display: block; font-family: 'Cairo', var(--font); font-weight: 500; font-size: 10.5px; }
.status .i { width: 16px; height: 16px; }
.st-pending { background: var(--amber-l); color: var(--amber); }
.st-confirmed { background: var(--blue-l); color: var(--blue); }
.st-preparing { background: var(--purple-l); color: var(--purple); }
.st-shipped { background: #e0f5f9; color: #0e7490; }
.st-delivered { background: var(--green-l); color: var(--green); }
.st-cancelled { background: #f1f1f4; color: #6b6b76; }
.oc-mid { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 12px; }
.oc-thumbs { display: flex; gap: 6px; }
.oc-thumbs span { width: 52px; height: 52px; border-radius: 10px; background: #fafafc; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line); }
.oc-thumbs img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.oc-thumbs .ph { font-size: 20px; }
.oc-thumbs .more { font-size: 12px; font-weight: 700; color: var(--muted); }
.oc-total { text-align: right; }
.oc-total b { display: block; font-size: 17px; }
.view-d { font-size: 12.5px; color: var(--ink-2); font-weight: 600; display: inline-flex; align-items: center; }
.view-d .i { width: 14px; height: 14px; transition: transform .2s; }
.ocard[open] .view-d .i { transform: rotate(90deg); }
.oc-details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; animation: fade .2s; }
.oc-meta { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); padding-top: 4px; }
.oc-meta span { display: inline-flex; align-items: center; gap: 6px; }
.oc-meta .i { width: 16px; height: 16px; color: var(--red); }
.track { display: flex; margin: 8px 0 10px; }
.tr-step { flex: 1; text-align: center; position: relative; font-size: 10.5px; color: var(--muted); }
.tr-step span { display: block; width: 14px; height: 14px; border-radius: 50%; background: #d9d9e0; margin: 0 auto 4px; position: relative; z-index: 1; }
.tr-step::before { content: ''; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: #d9d9e0; }
.tr-step:first-child::before { display: none; }
.tr-step.done { color: var(--green); font-weight: 600; }
.tr-step.done span, .tr-step.done::before { background: var(--green); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 100; box-shadow: var(--shadow-l); max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .i { width: 18px; height: 18px; color: #4ade80; }
.toast.err .i { color: #ff6b81; }

/* ---------- Install app ---------- */
.dr-install { padding: 0 12px 10px; }
.dr-install-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--red-l); color: var(--red); font-weight: 700; text-align: left; }
.dr-install-btn img { width: 36px; height: 36px; border-radius: 10px; }
.dr-install-btn span { flex: 1; }
.dr-install-btn small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-2); font-family: 'Cairo', var(--font); }
.install-card { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 8px 10px 12px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
.install-card img { width: 44px; height: 44px; border-radius: 12px; }
.install-card div { flex: 1; min-width: 0; line-height: 1.25; }
.install-card b { display: block; font-size: 14px; }
.install-card small { font-size: 12px; color: var(--muted); font-family: 'Cairo', var(--font); }
.sm-btn { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 11px; box-shadow: none; }
.sheet-wrap { position: fixed; inset: 0; z-index: 120; background: rgba(10,10,15,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { width: 100%; max-width: 480px; background: #fff; border-radius: 24px 24px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); text-align: center; animation: sheetUp .28s cubic-bezier(.2,.8,.2,1); }
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet-icon { width: 68px; height: 68px; border-radius: 18px; margin: 0 auto 10px; box-shadow: var(--shadow); }
.sheet h3 { margin: 0 0 4px; }
.sheet .muted { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
.install-steps { list-style: none; padding: 0; margin: 0 0 18px; text-align: left; display: grid; gap: 10px; }
.install-steps li { display: flex; gap: 12px; align-items: center; background: var(--bg); padding: 10px 12px; border-radius: 14px; font-size: 14px; }
.install-steps li > span { width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; display: grid; place-items: center; flex: none; }
.install-steps small { display: block; color: var(--muted); font-family: 'Cairo', var(--font); }
.install-steps .i { width: 18px; height: 18px; vertical-align: -4px; color: var(--blue); }
@media (min-width: 960px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 24px; } }

/* ---------- Footer ---------- */
.site-footer { background: #16161a; color: #b8b8c3; padding: 26px 0 24px; margin-top: 8px; text-align: center; font-size: 12.5px; line-height: 1.6; }
.ft-brand { color: #fff; font-weight: 800; font-size: 17px; margin-bottom: 4px; }
.ft-copy { margin: 0 0 8px; color: #e4e4ea; font-weight: 600; }
.ft-note { margin: 0 auto 6px; max-width: 620px; }
.ft-note.ar { font-family: 'Cairo', var(--font); }
.ft-credit { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.08); color: #6f6f7a; font-size: 9.5px; line-height: 1.5; letter-spacing: .02em; }
.ft-credit b { color: #9a9aa6; font-weight: 600; }
.ft-credit span[dir] { font-family: 'Cairo', var(--font); }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .pgrid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-slide { min-height: 240px; padding: 30px 40px; }
  .hero-img { height: 210px; }
  .hscroll { margin: 0; padding-left: 0; padding-right: 0; }
  .quick { max-width: 560px; }
}
@media (min-width: 960px) {
  body { padding-bottom: 96px; }
  .pgrid { grid-template-columns: repeat(4, 1fr); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-slide { min-height: 320px; padding: 40px 64px; }
  .hero-img { height: 270px; }
  .topbar.home .tb-row { height: 84px; }
  .topbar.home .search { max-width: 640px; margin: 0 auto; }
  .pp-grid { grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: start; }
  .gallery { position: sticky; top: 80px; }
  .pp-info h1 { font-size: 30px; }
  .pp-actions { grid-template-columns: 1.4fr 1fr; }
  .cart-page { grid-template-columns: 1fr 360px; }
  .summary { position: sticky; top: 80px; }
  .olist { grid-template-columns: 1fr 1fr; align-items: start; }
  /* floating pill navigation on desktop */
  .bottom-nav { left: 50%; right: auto; bottom: 16px; transform: translateX(-50%); width: 520px; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow-l); }
  .bn-item.active::before { display: none; }
  .toast { bottom: 110px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.search-row { display: flex; gap: 10px; align-items: center; }
.search-row .search { flex: 1; }
.white-btn { width: 48px; height: 48px; border-radius: 14px; background: #fff; color: var(--red); box-shadow: 0 4px 14px rgba(0,0,0,.12); flex: none; }
.white-btn:hover { background: #fff5f6; }
.topbar.home .white-btn .badge { background: var(--red); color: #fff; border-color: #fff; top: -4px; right: -4px; }
@media (min-width: 960px) { .search-row { max-width: 720px; } }
