/* ردا — متجر العبايات · نظام التصميم المشترك */
@font-face {
  font-family: "DIN Next LT Arabic";
  src: url("../fonts/DINNextLTArabic-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root {
  --ink: #0c1f45;
  --ink-2: #16306a;
  --ivory: #ffffff;
  --paper: #ffffff;
  --sand: #eef2f8;
  --line: #dfe5ef;
  --muted: #5b6782;
  --gold: #1d3f85;
  --gold-2: #4f6fae;
  --gold-ink: #0c1f45;
  --danger: #b42318;
  --ok: #1f7a4d;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px -12px rgba(12, 31, 69, .25);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --f-head: "DIN Next LT Arabic", "IBM Plex Sans Arabic", sans-serif;
  --f-accent: "Amiri", serif;
  --f-body: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-latin: "Cormorant", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 400; line-height: 1.3; margin: 0; letter-spacing: -.005em; }
.latin { font-family: var(--f-latin); letter-spacing: .04em; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
/* floating navy bar with softly rounded corners */
.site-header { position: sticky; top: 0; z-index: 50; padding-top: 10px; pointer-events: none; }
.site-header .nav { pointer-events: auto; }
.nav {
  display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px;
  padding-inline: 22px; border-radius: 14px;
  background: var(--ink); color: #fff;
  box-shadow: 0 12px 30px -18px rgba(12, 31, 69, .6);
}
.site-header :focus-visible { outline-color: #fff; }
/* stretch the bar edge to edge, lined up with the hero card */
.site-header .nav.container { width: calc(100% - 2 * clamp(12px, 2.5vw, 32px)); padding-inline: clamp(16px, 2.5vw, 32px); }
@media (max-width: 720px) { .nav { padding-inline: 12px; height: 58px; border-radius: 12px; } }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand b { font-family: var(--f-accent); font-size: 30px; line-height: 1; }
.brand span { font-family: var(--f-latin); font-size: 13px; letter-spacing: .35em; opacity: .7; }
.nav-links { display: flex; gap: 28px; font-size: 15px; }
.nav-links a { position: relative; padding: 6px 0; opacity: .85; transition: opacity .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; }
.nav-links a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: currentColor; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; background: transparent; border-radius: 50%; cursor: pointer; transition: background .2s;
}
.icon-btn:hover { background: rgba(29, 63, 133, .12); }
.nav .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.nav .cart-count { background: #fff; color: var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute; top: 4px; inset-inline-start: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--gold); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600;
}
.cart-count[data-n="0"] { display: none; }
@media (max-width: 720px) { .nav-links { display: none; } }

.announce { background: var(--ink); color: #fff; text-align: center; font-size: 13px; padding: 8px 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 28px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer;
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: var(--ivory); }
.btn-primary:hover { background: var(--ink-2); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-ink); }
.btn-ghost { background: transparent; border-color: currentColor; }
.btn-ghost:hover { background: rgba(29,63,133,.1); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  cursor: pointer; font-size: 14px; transition: all .2s; white-space: nowrap;
}
.chip:hover { border-color: var(--gold-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--ivory); border-color: var(--ink); }

/* ---------- Product card ---------- */
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 22px; }
.p-card { display: flex; flex-direction: column; gap: 12px; }
.p-media {
  position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius-lg); overflow: hidden;
  background: radial-gradient(120% 80% at 50% 20%, #ffffff 0%, var(--sand) 100%);
  display: grid; place-items: center; padding: 18px;
}
.p-media svg { height: 100%; transition: transform .6s var(--ease); }
.p-media .p-photo { height: 100%; width: 100%; object-fit: contain; transition: transform .6s var(--ease); filter: drop-shadow(0 14px 18px rgba(12,31,69,.14)); }
.p-card:hover .p-media svg, .p-card:hover .p-media .p-photo { transform: scale(1.04) translateY(-4px); }
.badge {
  position: absolute; top: 14px; inset-inline-start: 14px; padding: 4px 12px; border-radius: 999px;
  background: var(--paper); font-size: 12px; font-weight: 600; color: var(--gold-ink); box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.fav {
  position: absolute; top: 10px; inset-inline-end: 10px; background: rgba(255,255,255,.85);
}
.fav[aria-pressed="true"] svg { fill: var(--gold); stroke: var(--gold); }
.p-info { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.p-name { font-family: var(--f-head); font-size: 20px; }
.p-meta { font-size: 13px; color: var(--muted); }
.price { font-weight: 700; white-space: nowrap; }
.price s { color: var(--muted); font-weight: 400; font-size: 13px; margin-inline-start: 6px; }
.swatches { display: flex; gap: 6px; }
.swatch-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select {
  min-height: 50px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--paper); transition: border-color .2s, box-shadow .2s; width: 100%;
}
.input:focus, .select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(29,63,133,.15); }
.field.invalid .input, .field.invalid .select { border-color: var(--danger); }
.err { font-size: 13px; color: var(--danger); display: none; }
.field.invalid .err { display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9d3e6; padding: 56px 0 28px; margin-top: 96px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: var(--ivory); margin: 0 0 12px; font-size: 15px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.site-footer a:hover { color: var(--gold-2); }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding-top: 20px; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.pay-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-pill { padding: 3px 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 6px; font-size: 12px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 140%); z-index: 100;
  background: var(--ink); color: var(--ivory); padding: 14px 22px; border-radius: 999px;
  display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow);
  transition: transform .45s var(--ease), visibility 0s .45s; max-width: calc(100% - 32px);
  transform: translate(-50%, 200%); visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .45s var(--ease); }
.toast svg { width: 18px; height: 18px; color: var(--gold-2); flex: none; }

/* ---------- Breadcrumb ---------- */
.crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); padding: 22px 0; flex-wrap: wrap; }
.crumbs a:hover { color: var(--gold-ink); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* footer legal line (CR / VAT / verified) */
.foot-legal { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; opacity: .85; }
.foot-legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
/* content pages (page.html) */
.prose { max-width: 72ch; }
.prose h2 { font-size: 20px; margin: 28px 0 10px; }
.prose p, .prose li { line-height: 1.95; color: var(--ink-2, inherit); }
.prose ul { padding-inline-start: 22px; margin: 8px 0; }
.size-table { width: 100%; border-collapse: collapse; margin: 18px 0 8px; font-variant-numeric: tabular-nums; }
.size-table th, .size-table td { padding: 12px 10px; border-bottom: 1px solid var(--line, #e6e6e6); text-align: start; }
.size-table th { font-weight: 600; font-size: 13px; }

/* floating WhatsApp + social icons */
.wa-float { position: fixed; inset-block-end: 18px; inset-inline-end: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 16px 0 14px; border-radius: 999px; background: #1f8a4c; color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 24px rgba(15, 40, 25, .25); text-decoration: none; transition: transform .2s ease; }
.wa-float:hover { transform: translateY(-2px); color: #fff; }
.wa-float svg { width: 22px; height: 22px; }
@media (max-width: 560px) { .wa-float span { display: none; } .wa-float { padding: 0; width: 52px; justify-content: center; } }
@media print { .wa-float { display: none; } }
.soc-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.soc { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); color: inherit; }
.soc:hover { border-color: currentColor; }
.soc svg { width: 19px; height: 19px; }

/* WhatsApp code popup */
.otp-dlg { border: 0; border-radius: 24px; padding: 34px 28px 26px; width: min(420px, 100% - 32px); text-align: center; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.otp-dlg::backdrop { background: color-mix(in srgb, var(--ink) 55%, transparent); backdrop-filter: blur(4px); }
.otp-dlg h2 { font-size: 26px; margin: 10px 0 6px; }
.otp-dlg p { color: var(--muted); margin: 0 0 16px; font-size: 15px; }
.otp-ic { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--ink); }
.otp-ic svg { width: 26px; height: 26px; }
.otp-x { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; width: 40px; height: 40px; border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--muted); border-radius: 50%; }
.otp-x:hover { background: var(--sand); }
.otp-f { display: grid; gap: 10px; }
.otp-phone { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; direction: ltr; }
.otp-phone span { display: grid; place-items: center; padding: 0 14px; background: var(--sand); font-weight: 600; }
.otp-phone .input { border: 0; border-radius: 0; text-align: left; font-size: 18px; letter-spacing: .04em; }
.otp-code { text-align: center; font-size: 28px; letter-spacing: .45em; font-weight: 600; padding-inline-start: .45em; }
.otp-err { color: var(--danger) !important; min-height: 20px; margin: 0 !important; font-size: 14px !important; }
.otp-test { background: #fff6e5; color: #7a4b00 !important; border-radius: 10px; padding: 8px 12px; font-size: 14px !important; }
.otp-more { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.otp-link { border: 0; background: none; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 40px; font: inherit; font-size: 14px; }
.otp-link:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.verified-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ok); margin-inline-start: 6px; }
.verified-tag svg { width: 14px; height: 14px; }
.fav-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; font-size: 14px; }
.fav-btn svg { width: 20px; height: 20px; }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; color: #b3263e; }
#accBtn.on::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); inset-block-start: 6px; inset-inline-end: 6px; }
#accBtn { position: relative; }

/* phone menu */
.menu-btn { display: none; color: inherit; }
@media (max-width: 720px) { .menu-btn { display: grid; } }
.m-menu { pointer-events: auto; margin: 8px clamp(12px, 2.5vw, 32px) 0; background: var(--ink); color: #fff; border-radius: 14px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.5); max-height: calc(100vh - 90px); overflow-y: auto; }
.m-menu-in { display: grid; padding: 8px; }
.m-menu a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 10px; font-size: 17px; }
.m-menu a.sub { font-size: 15px; opacity: .8; min-height: 44px; }
.m-menu a:hover, .m-menu a:focus-visible { background: rgba(255,255,255,.1); }
.m-menu hr { border: 0; border-top: 1px solid rgba(255,255,255,.15); margin: 6px 8px; }
@media (min-width: 721px) { .m-menu { display: none; } }
