/* موقع متجر رواسي — مودرن وناعم: خلفية رمادية دافئة، بطاقات بيضاء مدوّرة، صور كبيرة، ولون فيروزي واحد من سيراميك المتجر */
:root {
  --ground: #F4F3F0;
  --surface: #FFFFFF;
  --tint: #ECEAE5;
  --ink: #171717;
  --ink-2: #44423F;
  --muted: #7A7671;
  --line: #E7E4DF;
  --accent: #2C8C86;
  --accent-soft: #E1F0EE;
  --rose: #D25E6B;
  --rose-soft: #FBE7E9;
  --sand: #C9A25A;
  --on-dark: #FFFFFF;
  --shadow-sm: 0 1px 2px rgb(23 23 23 / .05);
  --shadow: 0 2px 6px rgb(23 23 23 / .04), 0 18px 40px -22px rgb(23 23 23 / .28);
  --r-xl: 32px;
  --r-lg: 24px;
  --r: 18px;
  --r-sm: 12px;
  --font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --display: 'Alexandria', var(--font);
  --head-h: 68px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #111111; --surface: #1B1B1B; --tint: #252523; --ink: #F3F2EF; --ink-2: #D0CEC9; --muted: #9C9892; --line: #2C2B29;
    --accent: #5FC2BA; --accent-soft: #163633; --rose: #EC8A95; --rose-soft: #3A2226; --on-dark: #111111;
    --shadow: 0 2px 6px rgb(0 0 0 / .3), 0 18px 40px -22px rgb(0 0 0 / .7); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #111111; --surface: #1B1B1B; --tint: #252523; --ink: #F3F2EF; --ink-2: #D0CEC9; --muted: #9C9892; --line: #2C2B29;
  --accent: #5FC2BA; --accent-soft: #163633; --rose: #EC8A95; --rose-soft: #3A2226; --on-dark: #111111;
  --shadow: 0 2px 6px rgb(0 0 0 / .3), 0 18px 40px -22px rgb(0 0 0 / .7); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 12px); }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.65 var(--font); -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.ic { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--ground); padding: 8px 14px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; }

/* ---------- الشريط العلوي والرأس ---------- */
.topbar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 600; text-align: center; }
.head { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--ground) 82%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); transition: box-shadow .2s; }
.head.scrolled { box-shadow: 0 1px 0 var(--line); }
.head-in { max-width: 1240px; margin: 0 auto; height: var(--head-h); padding: 0 20px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.brand-logo.big { width: 88px; height: 88px; }
.brand-name { font: 600 21px/1 var(--display); }
.head-search { flex: 1; max-width: 440px; margin-inline-start: auto; position: relative; display: flex; align-items: center; }
.head-search svg { position: absolute; inset-inline-start: 16px; width: 19px; height: 19px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.head-search input { width: 100%; height: 46px; border: 0; border-radius: 999px; background: var(--surface); padding: 0 46px 0 16px; outline: none; box-shadow: var(--shadow-sm); transition: box-shadow .15s; }
.head-search input::placeholder { color: var(--muted); }
.head-search input:focus { box-shadow: 0 0 0 2px var(--ink); }
.head-actions { display: flex; align-items: center; gap: 6px; }
.head-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 46px; min-width: 46px; justify-content: center; padding: 0 12px; border: 0; background: var(--surface); border-radius: 999px; color: var(--ink); box-shadow: var(--shadow-sm); }
.head-btn:hover { background: var(--tint); }
.head-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.cart-btn { background: var(--ink); color: var(--ground); padding: 0 18px; }
.cart-btn:hover { background: var(--ink-2); }
.cart-label { font-weight: 600; font-size: 15px; }
.badge { position: absolute; top: -2px; inset-inline-end: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--rose); color: #fff; font: 700 11px/20px var(--font); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--ground); }
.badge.bump { animation: bump .4s ease; }
@keyframes bump { 40% { transform: scale(1.3); } }
@media (max-width: 720px) {
  .head-in { flex-wrap: wrap; height: auto; padding: 10px 16px 12px; row-gap: 10px; }
  .head-search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .head-actions { margin-inline-start: auto; }
  .cart-label, .theme-btn { display: none; }
  .cart-btn { padding: 0 14px; }
  :root { --head-h: 124px; }
}

/* ---------- الهيكل والأزرار ---------- */
.main { max-width: 1240px; margin: 0 auto; padding: 0 20px 56px; }
@media (max-width: 720px) { .main { padding: 0 16px 48px; } }
.loading, .state { min-height: 60vh; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; color: var(--muted); padding: 40px 16px; }
.state h1 { font: 600 26px/1.4 var(--display); color: var(--ink); }
.state p { max-width: 38ch; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; font-weight: 600; font-size: 15.5px; transition: background .15s, transform .1s; }
.btn:hover { filter: brightness(.95); }
.btn:active { transform: scale(.98); }
.btn-line { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-line:hover { background: var(--tint); filter: none; }
.btn-buy { background: var(--ink); color: var(--ground); }
.btn-buy:hover { background: var(--ink-2); filter: none; }
.btn.wide { width: 100%; }
.btn.disabled { opacity: .4; pointer-events: none; }
.btn-text { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--ink-2); font-weight: 500; border-radius: 999px; }
.btn-text:hover { background: var(--tint); }
.btn-text.on { color: var(--rose); }
.btn-text.on .ic { fill: currentColor; }

/* ---------- الواجهة ---------- */
.hero { margin-top: 12px; display: grid; grid-template-columns: 1fr 1.05fr; gap: 12px; }
.hero-text { background: var(--surface); border-radius: var(--r-xl); padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; }
.hero-logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.hero-title { font: 600 clamp(32px, 4.4vw, 54px)/1.25 var(--display); letter-spacing: -.01em; max-width: 14ch; text-wrap: balance; }
.hero-tag { color: var(--muted); font-size: 17px; max-width: 42ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hero-meta span { padding: 6px 14px; border-radius: 999px; background: var(--ground); color: var(--ink-2); font-size: 14px; }
.hero-meta b { color: var(--accent); }
.hero-media { position: relative; display: block; border-radius: var(--r-xl); overflow: hidden; background: var(--tint); min-height: 460px; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
a.hero-media:hover .hero-img { transform: scale(1.03); }
.hero-pill { position: absolute; bottom: 18px; inset-inline-start: 18px; display: flex; flex-direction: column; padding: 10px 18px; border-radius: 20px; background: rgb(255 255 255 / .82); color: #171717; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 14px; max-width: calc(100% - 36px); box-shadow: var(--shadow-sm); }
.hero-pill b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-pill span { color: #5c5955; font-size: 13.5px; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { order: -1; min-height: 0; aspect-ratio: 4 / 4.2; }
  .hero-text { padding: 28px 22px; gap: 12px; }
  .hero-logo { display: none; }
}

/* ---------- الأقسام ---------- */
.sec { margin-top: 52px; }
.sec-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.sec-head.row { flex-direction: row; align-items: baseline; gap: 12px; }
.sec-head h2 { font: 600 clamp(22px, 2.6vw, 30px)/1.35 var(--display); letter-spacing: -.01em; }
.sec-sub { color: var(--muted); }
.sec-count { color: var(--muted); font-size: 15px; }

.sec-cats { margin-top: 40px; }
.cats { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: 0 0 auto; width: 104px; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; padding: 0; text-align: center; }
.cat-img { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--surface); margin-bottom: 8px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.cat:hover .cat-img { transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-photo { width: 100%; height: 100%; object-fit: cover; }
.cat-img .img-empty { font-size: 30px; }
.cat b { font-weight: 600; font-size: 15px; }
.cat small { color: var(--muted); font-size: 13px; }
@media (min-width: 900px) { .cats { gap: 28px; } .cat { width: 132px; } .cat-img { width: 124px; height: 124px; } }

.filters { position: sticky; top: var(--head-h); z-index: 10; background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 10px 0 12px; margin: 0 0 8px; display: flex; flex-direction: column; gap: 10px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; height: 42px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--surface); font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; box-shadow: var(--shadow-sm); }
.chip small { color: var(--muted); font-size: 12.5px; }
.chip:hover { background: var(--tint); }
.chip.on { background: var(--ink); color: var(--ground); }
.chip.on small { color: inherit; opacity: .7; }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; min-height: 40px; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--line); position: relative; margin: 0; transition: background .2s; cursor: pointer; }
.switch input::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .2); transition: inset-inline-start .2s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { inset-inline-start: 21px; }
.sort select { height: 42px; border-radius: 999px; border: 0; background: var(--surface); box-shadow: var(--shadow-sm); padding: 0 16px 0 36px; font-size: 15px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: 17px 19px, 22px 19px; background-size: 5px 5px; background-repeat: no-repeat; }

/* ---------- بطاقة المنتج ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 44%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail .card { scroll-snap-align: start; }
@media (min-width: 640px) { .rail { grid-auto-columns: minmax(210px, 28%); gap: 16px; } }
@media (min-width: 1000px) { .rail { grid-auto-columns: calc((100% - 60px) / 4.3); gap: 20px; } }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); padding: 8px; transition: box-shadow .25s, transform .25s; }
.card:hover { box-shadow: var(--shadow); }
.card-media { position: relative; border-radius: var(--r); overflow: hidden; background: var(--tint); aspect-ratio: 1 / 1.08; }
.card-media > a { display: block; width: 100%; height: 100%; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 6px 4px; flex: 1; }
.card-name { font-size: 15px; font-weight: 500; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-2); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.card-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; min-width: 0; }
.price { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--ink); }
.price.big { font-size: 28px; font-family: var(--display); font-weight: 600; }
.was { color: var(--muted); font-size: 13.5px; }
.is-out .card-img, .is-out .img-empty { opacity: .45; filter: grayscale(.7); }
.is-out .price { color: var(--muted); }
.tags { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.tag { padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgb(255 255 255 / .9); color: #171717; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tag-new { color: #1F6F6A; }
.tag-low { color: #9A6A1A; }
.tag-sale { background: var(--rose); color: #fff; }
.tag-out { background: rgb(23 23 23 / .8); color: #fff; }
.fav { position: absolute; top: 8px; inset-inline-end: 8px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .9); color: #171717; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.fav:hover { background: #fff; }
.fav.on { color: var(--rose); }
.fav.on .ic { fill: currentColor; }
.quick { flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--ink); color: var(--ground); transition: transform .15s, background .15s; }
.quick:hover { background: var(--accent); color: #fff; transform: scale(1.06); }
.img-empty { width: 100%; height: 100%; display: grid; place-items: center; background: var(--tint); color: var(--muted); font: 600 40px/1 var(--display); }

/* ---------- خطوات الطلب ---------- */
.how { background: var(--surface); border-radius: var(--r-xl); padding: 32px 24px; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .steps:not(.steps-sm) { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.steps:not(.steps-sm) li { background: var(--ground); border-radius: var(--r); padding: 18px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; row-gap: 2px; align-items: start; }
.steps li::before { content: counter(s); grid-row: span 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--ground); font: 600 16px/1 var(--display); }
.steps li > b { font-size: 16px; font-weight: 600; padding-top: 6px; }
.steps li > span { color: var(--muted); font-size: 15px; }
.facts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.fact { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: var(--r); background: var(--accent-soft); flex: 1 1 240px; color: var(--accent); }
.fact div { display: flex; flex-direction: column; color: var(--ink); }
.fact span { color: var(--ink-2); font-size: 14.5px; }

/* ---------- الفوتر ---------- */
.foot { margin-top: 56px; padding: 28px 24px; border-radius: var(--r-xl); background: var(--surface); display: grid; gap: 16px; }
.foot-brand { display: flex; gap: 14px; align-items: center; }
.foot-brand b { font: 600 18px/1.4 var(--display); }
.foot-brand p { color: var(--muted); max-width: 52ch; font-size: 15px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px; }
.foot-links a { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--ground); }
.foot-links a:hover { background: var(--tint); }
.foot-upd { color: var(--muted); font-size: 13.5px; }
.empty { display: grid; justify-items: center; gap: 14px; padding: 48px 16px; text-align: center; color: var(--muted); }
.empty p { max-width: 36ch; }

/* ---------- الطبقة: منتج، سلة، مفضلة ---------- */
.layer { position: fixed; inset: 0; z-index: 50; }
.scrim { position: absolute; inset: 0; background: rgb(17 17 17 / .42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .2s ease; }
.sheet { position: absolute; background: var(--ground); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 -10px 40px rgb(0 0 0 / .18); }
.sheet-product { inset: auto 0 0 0; max-height: 94vh; border-radius: var(--r-xl) var(--r-xl) 0 0; animation: rise .3s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
.sheet-side { inset: 0 auto 0 0; width: min(440px, 100%); display: flex; flex-direction: column; animation: slide .28s cubic-bezier(.2,.8,.2,1); }
@media (min-width: 900px) {
  .sheet-product { inset: 4vh auto auto 50%; transform: translateX(-50%); width: min(1060px, 94vw); max-height: 92vh; border-radius: var(--r-xl); animation: pop .24s ease; }
  .sheet-side { inset: 12px auto 12px 12px; border-radius: var(--r-xl); }
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes slide { from { transform: translateX(-30px); opacity: 0; } }
@keyframes pop { from { opacity: 0; translate: 0 16px; } }
.close { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .9); color: #171717; display: grid; place-items: center; box-shadow: var(--shadow-sm); backdrop-filter: blur(8px); }
.close:hover { background: #fff; }
.side-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; min-height: 68px; padding: 12px 16px; background: var(--ground); }
.side-head h2 { font: 600 22px/1.3 var(--display); flex: 1; }
.side-head .close { position: static; box-shadow: none; background: var(--surface); color: var(--ink); }
.side-head .back { order: -1; }
.side-scroll { padding: 4px 16px 16px; flex: 1; }
.side-scroll .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.side-foot { position: sticky; bottom: 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--ground); display: grid; gap: 8px; }
.hint { color: var(--muted); font-size: 14px; text-align: center; }

.pd { display: grid; gap: 0; padding: 10px; }
@media (min-width: 900px) { .pd { grid-template-columns: 1.05fr 1fr; gap: 10px; } }
.gallery { position: relative; background: var(--tint); border-radius: var(--r-lg); overflow: hidden; align-self: start; }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1 / 1.08; max-height: 60vh; }
@media (min-width: 900px) { .gal-slide { max-height: none; } }
.gal-slide img { width: 100%; height: 100%; object-fit: cover; }
.gal-slide .img-empty { height: 100%; }
.gal-dots { position: absolute; bottom: 12px; inset-inline: 0; display: flex; justify-content: center; gap: 2px; }
.dot { width: 26px; height: 26px; border: 0; background: none; padding: 0; display: grid; place-items: center; }
.dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: rgb(255 255 255 / .6); transition: width .2s; }
.dot.on::before { width: 20px; border-radius: 4px; background: #fff; }
.pd-info { padding: 22px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 900px) { .pd-info { padding: 36px 30px; background: var(--surface); border-radius: var(--r-lg); } }
.pd-cat { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13.5px; }
.pd-name { font: 600 clamp(24px, 2.8vw, 32px)/1.35 var(--display); letter-spacing: -.01em; }
.pd-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.save { padding: 3px 11px; border-radius: 999px; background: var(--rose-soft); color: var(--rose); font-size: 13.5px; font-weight: 600; }
.pd-stock { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.pd-stock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.st-ok { color: var(--accent); }
.st-low { color: #A36F17; }
.st-out { color: var(--muted); }
.pd-desc { color: var(--ink-2); line-height: 1.9; max-width: 60ch; }
.buy { display: flex; gap: 10px; margin-top: 6px; }
.buy .btn-buy { flex: 1; min-height: 54px; font-size: 16.5px; }
.stepper { display: inline-flex; align-items: center; border-radius: 999px; background: var(--ground); height: 54px; box-shadow: inset 0 0 0 1px var(--line); }
.stepper button { width: 46px; height: 100%; border: 0; background: none; display: grid; place-items: center; border-radius: 999px; }
.stepper button:hover:not(:disabled) { background: var(--tint); }
.stepper button:disabled { opacity: .3; cursor: not-allowed; }
.stepper output { min-width: 24px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper.sm { height: 38px; background: var(--surface); }
.stepper.sm button { width: 36px; }
.pd-actions { display: flex; gap: 4px; margin-inline-start: -12px; }
.pd-facts { list-style: none; margin: 4px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; color: var(--ink-2); font-size: 15px; }
.pd-facts li { display: flex; gap: 10px; align-items: flex-start; }
.pd-facts .ic { color: var(--accent); margin-top: 2px; }
.pd-related { padding: 16px 20px 28px; }
.pd-related h3 { font: 600 20px/1.4 var(--display); margin-bottom: 14px; }
@media (min-width: 900px) { .pd-related { padding: 18px 30px 32px; } }

.lines { list-style: none; margin: 0; padding: 0 16px; flex: 1; display: grid; gap: 10px; align-content: start; }
.line { display: grid; grid-template-columns: 80px 1fr auto; gap: 12px; padding: 8px; border-radius: var(--r); background: var(--surface); align-items: start; }
.line-img .thumb { width: 80px; height: 88px; border-radius: var(--r-sm); object-fit: cover; font-size: 26px; }
.line-body { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding-top: 2px; }
.line-body b { font-weight: 600; line-height: 1.4; }
.line-price { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.line-rm { width: 38px; height: 38px; border: 0; background: none; border-radius: 50%; color: var(--muted); display: grid; place-items: center; }
.line-rm:hover { background: var(--rose-soft); color: var(--rose); }
.line.is-out .thumb { opacity: .45; }
.warn { color: var(--rose); font-size: 13.5px; font-weight: 600; }
.sum { padding: 16px 18px; display: grid; gap: 8px; background: var(--surface); margin: 12px 16px 0; border-radius: var(--r); }
.sum div { display: flex; justify-content: space-between; color: var(--ink-2); }
.sum b { font-variant-numeric: tabular-nums; color: var(--ink); }
.sum-total { padding-top: 10px; border-top: 1px dashed var(--line); font-size: 18px; }
.sum-total span { color: var(--ink); font-weight: 600; }
.form { padding: 4px 16px 16px; display: grid; gap: 14px; }
.form .sum { margin: 4px 0 0; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: 15px; }
.field small { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; border: 0; border-radius: var(--r-sm); background: var(--surface); padding: 10px 16px; outline: none; font-size: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.field input[dir="ltr"] { text-align: right; }
.form-err { color: var(--rose); font-weight: 600; background: var(--rose-soft); padding: 10px 14px; border-radius: var(--r-sm); }
.done { display: grid; gap: 16px; align-content: start; }
.steps-sm li { grid-template-columns: 38px 1fr; }
.steps-sm li .btn, .steps-sm .send-row { grid-column: 2; justify-self: start; }
.send-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.order-text { margin: 0; white-space: pre-wrap; font: 14.5px/1.8 var(--font); background: var(--surface); border-radius: var(--r); padding: 16px 18px; max-height: 280px; overflow: auto; }

/* ---------- الإشعار ---------- */
.toast { position: fixed; z-index: 70; bottom: calc(18px + env(safe-area-inset-bottom)); left: 0; right: 0; margin-inline: auto; width: fit-content; max-width: calc(100vw - 32px); translate: 0 20px; opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-radius: 20px; background: var(--ink); color: var(--ground); font-size: 15px; line-height: 1.5; box-shadow: var(--shadow); transition: opacity .2s, translate .2s; }
.toast.show { opacity: 1; translate: 0 0; pointer-events: auto; }
.toast a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
