/* ─────────────────────────────────────────────────────────────────────────
   YAFA STORE — THEME (owner's COLOR LOCK, 2026-11-21, trial-final11)
   NAVY scheme: header band #0B2242 (bare gold Y10 logo, short white
   search pill, white icons, gold cart badge, menu row under a thin
   gold rule — active item is a gold pill), navy round cart buttons,
   navy features strip and footer. Page background WHITE, cards white.
   Gold #C6A15B is an ACCENT only: stars, heading rules, active menu
   pill, "view all" outline, hero. Headings and prices are deep brown
   #2A2118; deep gold #A7833F is only a darker accent end.
   ───────────────────────────────────────────────────────────────────────── */
:root {
  --band: #0B2242;          /* navy header band */
  --navy: #2A2118;          /* deep brown — headings/prices/text on gold */
  --navy-2: #3A2C1D;        /* lighter brown */
  --navy-dark: #1E150D;     /* darkest brown */
  --gold: #C6A15B;
  --gold-deep: #A7833F;
  --bg: #E9E2CF;
  --surface: #FFFFFF;
  --ink: #33302A;
  --ink-strong: var(--navy);
  --muted: #7A7268;
  --btn-bg: var(--band);          /* primary buttons: navy */
  --btn-text: var(--gold);
  --buy-bg: var(--gold); /* اشترِ الآن — gold pill accent */
  --buy-text: var(--navy);
  --footer-bg: #071630;           /* darkest navy */
  --footer-text: #C7D2E4;
  --border: #EAE5D8;
  --shadow: rgba(42, 33, 24, .10);
}

/* Layout & components — colors come from the theme above. */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Noto Naskh Arabic', 'Segoe UI', Tahoma, sans-serif; background: var(--bg); color: var(--ink); }
a { color: inherit; text-decoration: none; }

/* Header — navy band: top row (bare gold logo, white pill search,
   white account/cart/burger icons) + menu row under a thin gold rule */
.hdr { background: var(--band); position: relative; z-index: 5; }
.hdr-top { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.logo { display: block; }
.logo img { height: 98px; width: auto; display: block; }
.searchbar { flex: 0 1 150px; width: 150px; max-width: 38%; margin: 0 auto; display: flex; align-items: center; background: #fff; border-radius: 26px; padding: 2px 4px 2px 9px; }
.searchbar input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 11.5px; background: none; color: var(--ink); min-width: 0; }
.searchbar button svg { width: 17px; height: 17px; }
.searchbar input::placeholder { color: #9AA3B2; }
.searchbar button { background: none; border: none; cursor: pointer; display: flex; padding: 4px; }
.hdr-icons { display: flex; gap: 15px; align-items: center; }
.hicon { position: relative; display: flex; color: #fff; }
.hicon .badge { position: absolute; top: -7px; inset-inline-end: -9px; background: var(--gold); color: var(--band); font-size: 11px; font-weight: 800; min-width: 19px; height: 19px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.burger { background: none; border: none; font-size: 25px; cursor: pointer; color: #fff; line-height: 1; }
.menurow { display: flex; align-items: center; gap: 2px; border-top: 1.5px solid var(--gold); padding: 10px 14px 12px; overflow-x: auto; scrollbar-width: none; }
.menurow::-webkit-scrollbar { display: none; }
.menurow a { color: #fff; font-size: 15px; padding: 7px 17px; border-radius: 20px; white-space: nowrap; }
.menurow a.active { background: var(--gold); color: var(--navy); font-weight: 800; }

/* Hero cover slider */
.hero-slider { position: relative; overflow: hidden; background: var(--band); }
.hero-slider .slide { display: none; aspect-ratio: 900 / 497; }
.hero-slider .slide.active { display: block; }
.hero-slider .slide > img, .hero-slider .slide > a > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-slider .slide > a { display: block; height: 100%; }
.hero-slider .slide > video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.hero-slider .navy-inner { height: 100%; display: flex; align-items: center; justify-content: center; background: var(--band); }
.hero-slider .navy-inner img { height: 74%; width: auto; max-width: 86%; object-fit: contain; background: #fff; border-radius: 20px; padding: 12px 20px; }
.hero-slider .arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .75); background: rgba(6, 17, 38, .5); color: #fff; font-size: 21px; cursor: pointer; line-height: 1; z-index: 2; }
.hero-slider .arrow.prev { inset-inline-start: 10px; }
.hero-slider .arrow.next { inset-inline-end: 10px; }
.hero-slider .dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 7px; z-index: 2; }
.hero-slider .dot { width: 10px; height: 10px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .55); cursor: pointer; padding: 0; }
.hero-slider .dot.active { background: var(--gold); }

/* Section headings — Arabic title with short gold rules, English subtitle */
.sec-head { position: relative; text-align: center; max-width: 1000px; margin: 26px auto 14px; padding: 0 14px; }
.sec-head .sec-line { display: flex; align-items: center; justify-content: center; gap: 14px; }
.sec-head .rule { width: 52px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.sec-head h2 { font-size: 25px; font-weight: 800; color: var(--navy); white-space: nowrap; }
.sec-head .sec-en { font-size: 15px; color: var(--navy); letter-spacing: .4px; margin-top: 1px; font-family: 'Segoe UI', Tahoma, sans-serif; }
.view-all { position: absolute; top: 6px; inset-inline-end: 14px; border: 1.5px solid var(--gold); color: var(--gold-deep); background: #fff; font-weight: 700; font-size: 13px; border-radius: 20px; padding: 5px 14px; }
.cat-sub { text-align: center; color: var(--gold-deep); font-size: 15px; margin: -6px 0 10px; }

/* Category tiles (homepage: Necklaces / Stickers) — SQUARE 1:1, slightly
   bigger than the reference: full-width row with small side margins. */
.tiles { display: flex; gap: 12px; padding: 0 10px; max-width: 1000px; margin: 0 auto; }
.tile { flex: 1; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; box-shadow: 0 5px 16px var(--shadow); display: block; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tilewrap { flex: 1; display: flex; flex-direction: column; }
.tilewrap .tile { flex: none; width: 100%; position: relative; }
.tile-cta { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: var(--band); color: var(--gold); font-weight: 800; font-size: 14px; padding: 6px 18px; border-radius: 999px; white-space: nowrap; box-shadow: 0 3px 10px rgba(0,0,0,.30); }
.tile-name { text-align: center; font-weight: 800; color: var(--navy); font-size: 17px; margin-top: 8px; }

/* Product cards — reference style: image, AR name, EN subtitle, gold stars,
   brown price + round brown add-to-cart button with gold cart icon */
.grid { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 12px; max-width: 1000px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid #F0EBDD; border-radius: 16px; width: calc(50% - 5px); overflow: hidden; box-shadow: 0 4px 14px var(--shadow); }
@media (min-width: 700px) { .grid .card { width: calc(25% - 8px); } }
.card img { width: 100%; height: 150px; object-fit: cover; display: block; }
.card .b { padding: 9px 11px 11px; }
.nm { font-size: 13px; font-weight: 700; color: var(--navy); line-height: 1.45; height: 37px; overflow: hidden; display: block; }
.card .sub { font-size: 11.5px; color: var(--muted); font-family: 'Segoe UI', Tahoma, sans-serif; margin-top: 1px; }
.stars { color: var(--gold); font-size: 13px; letter-spacing: 2px; margin: 4px 0 6px; }
.prow { display: flex; align-items: center; justify-content: space-between; }
.pr { color: var(--navy); font-weight: 800; font-size: 16.5px; direction: ltr; }
.addbtn { width: 39px; height: 39px; border-radius: 50%; border: none; background: var(--band); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.addbtn:active { background: #123058; }
.btn { background: var(--btn-bg); color: var(--btn-text); text-align: center; border: none; border-radius: 24px; padding: 7px 0; font-size: 13px; font-weight: 700; width: 100%; cursor: pointer; font-family: inherit; }
.btn.block { display: block; margin-top: 8px; padding: 10px 0; }
.center { text-align: center; margin: 16px 0 4px; }
.cta-dark { display: inline-block; background: var(--band); color: var(--gold); font-weight: 800; font-size: 14.5px; border-radius: 24px; padding: 10px 30px; }

/* Best Sellers — horizontal scroll row on mobile, grid on desktop */
.bs-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 12px 14px; max-width: 1000px; margin: 0 auto; scrollbar-width: none; }
.bs-row::-webkit-scrollbar { display: none; }
.bs-row .card { flex: 0 0 168px; }
@media (min-width: 700px) {
  .bs-row { overflow-x: visible; flex-wrap: wrap; }
  .bs-row .card { flex: 1 1 200px; }
}

/* Features strip — deep brown with gold top border (homepage bottom, above footer) */
.features { margin-top: 30px; background: var(--band); border-top: 4px solid var(--gold); }
.features .in { display: flex; max-width: 1000px; margin: 0 auto; padding: 16px 6px 14px; }
.feature { flex: 1; text-align: center; padding: 0 4px; }
a.feature { text-decoration: none; cursor: pointer; display: block; }
.feature + .feature { border-inline-start: 1px solid rgba(198, 161, 91, .35); }
.feature svg { display: block; margin: 0 auto 6px; }
.feature b { display: block; color: #fff; font-size: 13px; }
.feature span { display: block; color: #B9C6DA; font-size: 10.5px; font-family: 'Segoe UI', Tahoma, sans-serif; margin-top: 1px; }

/* Empty category state */
.empty-state { text-align: center; padding: 44px 16px 30px; }
.empty-state .empty-emoji { font-size: 40px; }
.empty-state b { font-size: 20px; display: block; margin: 8px 0 4px; color: var(--navy); }
.empty-state p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

.feat { display: flex; gap: 8px; margin: 14px auto 0; padding: 0 12px; max-width: 1000px; }
.feat div { flex: 1; background: #FBF8F1; border: 1px solid var(--border); border-radius: 10px; text-align: center; padding: 8px 2px; font-size: 11.5px; color: var(--gold-deep); font-weight: 700; }
.ftr { background: var(--footer-bg); color: var(--footer-text); text-align: center; padding: 14px 12px; font-size: 12px; line-height: 1.9; }
.ftr b { color: var(--gold); font-size: 14px; }

/* Product page */
.pimg { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.pbody { padding: 14px; max-width: 700px; margin: 0 auto; }
.pname { font-size: 19px; font-weight: 800; line-height: 1.5; color: var(--navy); }
.pprice { color: var(--gold-deep); font-weight: 800; font-size: 22px; margin: 6px 0; }
.qty { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.qb { border: 1.5px solid var(--gold); color: var(--gold-deep); border-radius: 10px; padding: 5px 14px; font-size: 16px; background: var(--surface); cursor: pointer; }
.bigbtn { background: var(--band); color: var(--gold); text-align: center; border: none; border-radius: 26px; padding: 13px 0; font-size: 16px; font-weight: 800; margin: 8px 0; width: 100%; cursor: pointer; font-family: inherit; }
.buy2 { background: var(--buy-bg); color: var(--buy-text); text-align: center; border: none; border-radius: 26px; padding: 13px 0; font-size: 16px; font-weight: 800; width: 100%; cursor: pointer; font-family: inherit; }
.buy2.block { display: block; margin-top: 10px; }
.desc { font-size: 13.5px; line-height: 1.9; color: var(--muted); margin-top: 12px; }

/* Cart / checkout / orders / admin */
.wrap { max-width: 700px; margin: 0 auto; padding: 12px; }
.page-title { font-size: 19px; margin: 8px 0 12px; color: var(--navy); }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 13px; margin-bottom: 12px; box-shadow: 0 2px 6px rgba(42, 33, 24, .05); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; }
.row.total { border-top: 1px solid #eee; font-size: 16px; }
.note { font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.empty { text-align: center; padding: 30px 0; font-size: 15px; }
.form label { display: block; font-size: 13px; margin-bottom: 10px; }
.form label.check-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.form label.check-row input { width: 18px; height: 18px; accent-color: var(--band); }
.form input { width: 100%; border: 1.5px solid var(--border); border-radius: 10px; padding: 9px 11px; font-size: 14px; margin-top: 4px; font-family: inherit; background: var(--surface); }
.form input:focus { border-color: var(--gold); outline: none; }
.form .cols { display: flex; gap: 8px; }
.form .cols label { flex: 1; }
.cart-item { display: flex; gap: 10px; align-items: center; }
.cart-item img { width: 62px; height: 62px; object-fit: cover; border-radius: 10px; }
.cart-item .grow { flex: 1; }
.small-btn { border: 1.5px solid var(--gold); color: var(--gold-deep); background: var(--surface); border-radius: 8px; padding: 2px 10px; cursor: pointer; font-size: 14px; }
.del { color: #b03030; border: none; background: none; cursor: pointer; font-size: 13px; font-family: inherit; }
.search-note { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 12px; }

/* Small screens — keep the whole header row on one line */
@media (max-width: 640px) {
  .hdr-top { padding: 10px; gap: 8px; }
  .logo img { height: 70px; }
  .hdr-icons { gap: 9px; }
  .searchbar { max-width: 34%; }
  .menurow { padding: 8px 8px 10px; }
  .menurow a { padding: 6px 13px; font-size: 14px; }
}

/* Toast (add-to-cart feedback, replaces browser alert) */
#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); background: #0B2242; color: #fff; border: 1px solid #C6A15B; border-radius: 999px; padding: 10px 22px; font-size: 14.5px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 999; box-shadow: 0 8px 24px rgba(11,34,66,.35); white-space: nowrap; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Live search suggestions */
.searchbar { position: relative; }
.search-suggest { position: absolute; top: calc(100% + 8px); inset-inline: 0; background: #fff; border-radius: 14px; box-shadow: 0 14px 34px rgba(11,34,66,.28); z-index: 80; overflow: hidden; min-width: 240px; }
.search-suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: #2A2118; text-decoration: none; font-size: 13.5px; }
.search-suggest a:hover { background: #F7F3EA; }
.search-suggest a img { width: 38px; height: 38px; object-fit: cover; border-radius: 8px; flex: none; }
.search-suggest a span { flex: 1; }
.search-suggest a b { color: #A7833F; }
.search-suggest .ss-empty { padding: 12px; color: #77736B; font-size: 13.5px; text-align: center; }

/* Offers page */
.offer-card { position: relative; background: var(--surface); border: 1.5px solid var(--border); border-radius: 18px; padding: 20px 16px 16px; margin-bottom: 14px; text-align: center; box-shadow: 0 3px 10px rgba(42,33,24,.06); }
.offer-card.best { border-color: #C6A15B; box-shadow: 0 6px 18px rgba(167,131,63,.22); }
.offer-tag { position: absolute; top: -11px; inset-inline-start: 16px; background: #C6A15B; color: #fff; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 3px 12px; }
.offer-qty { font-size: 19px; font-weight: 800; color: #2A2118; }
.offer-price { font-size: 34px; font-weight: 800; color: #A7833F; margin: 4px 0; }
.offer-was { color: #77736B; font-size: 13.5px; margin-bottom: 12px; }
.offer-was .was-price { color: #C0392B; text-decoration: line-through; font-weight: 700; }
.offer-was .save-amt { color: #4E9A51; font-weight: 800; }
.card .imgwrap { position: relative; display: block; }
.card.soldout img { filter: grayscale(1); opacity: .55; }
.soldout-badge { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-8deg); background: #C0392B; color: #fff; font-weight: 800; font-size: 15px; padding: 6px 16px; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.25); white-space: nowrap; }
.soldout-badge.big { font-size: 22px; padding: 10px 26px; }
.soldout-txt { color: #C0392B; font-weight: 800; font-size: 14px; }
.pimg-wrap { position: relative; }
.pimg-wrap .pimg { display: block; width: 100%; }
.bigbtn[disabled] { background: #B9B2A4; cursor: not-allowed; }
.share-link { background: #F5F1E8; border: 1.5px dashed #A7833F; border-radius: 12px; padding: 10px 12px; margin: 10px 0 12px; font-size: 14.5px; word-break: break-all; color: #2A2118; }
.share-code { font-size: 30px; font-weight: 800; letter-spacing: 1.5px; color: #A7833F; margin-top: 8px; }
.offer-card .wa { background: #4E9A51; margin-top: 8px; }

/* language switcher (header) */
.langsw{display:inline-flex;gap:4px;background:rgba(255,255,255,.12);border:1px solid rgba(198,161,91,.55);border-radius:999px;padding:2px}
.langsw a{color:#fff;text-decoration:none;font-size:12px;font-weight:800;padding:3px 9px;border-radius:999px;line-height:1.2}
.langsw a.on{background:#C6A15B;color:#0B2242}

/* horizontal-overflow guards (the English header/menu are wider than Arabic) */
html,body{overflow-x:hidden;max-width:100%}
.menurow{overflow-x:auto;scrollbar-width:none}
.menurow::-webkit-scrollbar{display:none}
.menurow a{flex:0 0 auto}
.searchbar input{min-width:0;width:100%}
.features .in>*{min-width:0}
.feature b,.feature span{overflow-wrap:break-word}
/* single language toggle (compact — replaces the two-option pill so the
   mobile header fits: logo + search + toggle + account + cart + burger) */
.langsw1{color:#C6A15B;text-decoration:none;font-size:12.5px;font-weight:900;border:1.5px solid #C6A15B;border-radius:999px;padding:4px 10px;line-height:1.1;white-space:nowrap}
.searchbar{min-width:0}
@media (max-width:640px){
  .hdr-icons{gap:15px}
  .menurow{gap:6px}
  .menurow a{padding:6px 15px}
  .feature b{font-size:12.5px}
  .feature span{font-size:10.5px}
  .logo img{height:56px}
  .hdr-top{gap:8px}
  .sec-head .view-all{position:static;display:block;text-align:center;margin-top:8px}
}

/* International-shipping popup (owner, 2026-11-21): appears the moment a
   non-US country is picked at checkout — apology + agreed notice + close. */
.intl-modal { position: fixed; inset: 0; background: rgba(7, 22, 48, .5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 18px; }
.intl-card { background: #fff; border: 2px solid var(--gold); border-radius: 20px; max-width: 400px; width: 100%; padding: 24px 20px 20px; text-align: center; box-shadow: 0 16px 44px rgba(7, 22, 48, .35); }
.intl-emoji { font-size: 36px; line-height: 1; }
.intl-card h3 { margin: 8px 0 2px; color: var(--band); font-size: 20px; }
.intl-apology { margin: 2px 0 8px; font-weight: 700; color: var(--gold-deep); }
.intl-msg { margin: 0 0 16px; line-height: 1.9; font-size: 14px; color: var(--ink); }

/* Hero CTA — a REAL button over the banner (owner, 2026-11-21: the button
   painted inside the banner image was erased; this live one replaces it,
   centred where the painted one sat: x≈32%, y≈56% of the 900×497 banner). */
.hero-slider .slide { position: relative; }
.hero-cta { position: absolute; left: 31.8%; top: 55.7%; transform: translate(-50%, -50%); z-index: 2; display: inline-flex; align-items: center; gap: .45em; background: linear-gradient(180deg, #EBD08C, #C6A15B); color: #0B2242; font-weight: 800; font-size: clamp(13px, 3.4vw, 19px); line-height: 1; padding: .62em 1.5em; border-radius: 999px; text-decoration: none; box-shadow: 0 6px 18px rgba(6, 17, 38, .45); white-space: nowrap; }
.hero-cta:active { transform: translate(-50%, -50%) scale(.97); }
.hero-cta-arrow { font-size: 1.25em; font-weight: 900; }
