/* ===== إضافات المتجر الإلكتروني ===== */
[hidden] { display: none !important; }
.demo-bar { background: #b8860b; color: #fff; text-align: center; font-size: 13px; padding: 5px 12px; font-weight: 600; }

.cart-btn {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0; position: relative;
  background: linear-gradient(180deg, var(--gold-l), var(--gold)); color: var(--navy);
  border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 700; cursor: pointer;
}
.cart-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.cart-count {
  background: var(--navy); color: var(--gold-l); min-width: 22px; height: 22px; border-radius: 999px;
  display: grid; place-items: center; font-size: 12px; padding: 0 6px;
}
.cart-btn.bump { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.12); } }

.hero-cta { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.btn-gold, .btn-outline {
  border-radius: 999px; padding: 10px 22px; font-weight: 700; cursor: pointer; font-size: 15px; display: inline-block;
}
.btn-gold { background: linear-gradient(180deg, var(--gold-l), var(--gold)); color: var(--navy); border: 0; }
.btn-outline { border: 1px solid rgba(242,212,138,.6); color: var(--gold-l); }
.btn-outline:hover { background: rgba(212,165,60,.12); }

/* ----- شريط الإعلانات ----- */
.ticker { background: var(--navy-2); border-block: 1px solid rgba(212,165,60,.3); overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; gap: 34px; padding: 8px 0; animation: tick 35s linear infinite; }
.ticker-track span { color: #e8ecf5; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 34px; }
.ticker-track span::after { content: "✦"; color: var(--gold); }
.ticker-track mark { background: var(--gold); color: var(--navy); padding: 1px 10px; border-radius: 999px; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ----- البنر الرئيسي ----- */
.promo {
  margin-top: 18px; border-radius: 22px; overflow: hidden; display: grid; grid-template-columns: 1.2fr 1fr; min-height: 300px;
  background: radial-gradient(circle at 80% 30%, rgba(212,165,60,.28), transparent 50%), linear-gradient(135deg, var(--navy) 0%, #1b2c58 100%);
  box-shadow: 0 14px 40px rgba(13,23,48,.25); color: #fff;
}
.promo-text { padding: 36px 34px; display: flex; flex-direction: column; justify-content: center; }
.promo-kicker { align-self: flex-start; background: rgba(212,165,60,.18); color: var(--gold-l); border: 1px solid rgba(212,165,60,.45); padding: 3px 14px; border-radius: 999px; font-weight: 700; font-size: 13.5px; }
.promo h1 { margin: 14px 0 6px; font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 4.4vw, 46px); line-height: 1.3; }
.promo h1 em { font-style: normal; background: linear-gradient(180deg, var(--gold-l), var(--gold) 60%, var(--gold-d)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.promo p { color: #c4cbe0; margin: 0; max-width: 460px; }
.promo-art { display: grid; place-items: center; position: relative; }
.promo-art::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; border: 1px dashed rgba(212,165,60,.45); }
.promo-art img { width: 210px; height: 210px; filter: drop-shadow(0 18px 40px rgba(0,0,0,.45)); position: relative; }
.btn-wa-pill { border-radius: 999px; padding: 10px 22px; font-weight: 700; background: #1fa855; color: #fff; }
.btn-wa-pill:hover { background: #178a45; }

.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.perks div {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px;
  display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14.5px;
}
.perks b { font-size: 24px; width: 44px; height: 44px; display: grid; place-items: center; background: #fbf4e2; border-radius: 12px; flex-shrink: 0; }
.perks small { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; }

/* ----- الأقسام والماركات ----- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.cat-tile {
  background: var(--card); border: 1px solid transparent; border-radius: 16px; box-shadow: var(--shadow); padding: 16px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; transition: .18s;
}
.cat-tile:hover { border-color: var(--gold); transform: translateY(-2px); }
.cat-tile i { font-style: normal; font-size: 30px; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(180deg, #fff7e2, #f3e2b5); }
.cat-tile small { color: var(--muted); font-weight: 500; }
.brand-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.brand-chip {
  flex-shrink: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 22px; cursor: pointer;
  font-weight: 800; letter-spacing: 1.5px; color: var(--navy); font-size: 15px;
}
.brand-chip:hover { border-color: var(--gold); color: var(--gold-d); }

/* ----- صفوف المنتجات ----- */
.row-head { display: flex; align-items: center; gap: 12px; margin: 30px 0 12px; flex-wrap: wrap; }
.row-head h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 24px; }
.row-head .see-all { margin-inline-start: auto; color: var(--gold-d); font-weight: 700; background: none; border: 0; cursor: pointer; }
.row-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.row-chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 12px; cursor: pointer; font-size: 13px; }
.row-chips button.active { background: var(--navy); color: var(--gold-l); border-color: var(--navy); }
.prow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 230px); gap: 14px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.prow .card { scroll-snap-align: start; }
.prow-empty { color: var(--muted); padding: 20px 0; }

.service {
  margin: 34px 0 6px; border-radius: 20px; padding: 26px 30px; display: flex; align-items: center; gap: 20px; justify-content: space-between; flex-wrap: wrap;
  background: linear-gradient(135deg, #fff7e2, #f1dfae); border: 1px solid #ead39a;
}
.service h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 24px; color: var(--navy); }
.service p { margin: 0; color: #5b4a20; }

/* ----- أزرار البطاقة ----- */
.btn-wa-sq { flex: 0 0 42px !important; display: grid; place-items: center; padding: 0 !important; background: #1fa855; color: #fff; }
.btn-wa-sq svg { width: 20px; height: 20px; fill: #fff; }
.badge.gift { top: 40px; background: #1f9d55; color: #fff; }
.gift-line { font-size: 12.5px; color: #1f7a45; font-weight: 600; }

/* ----- الشريط السفلي ----- */
.bottom-nav { display: none; }
@media (max-width: 760px) {
  .bottom-nav {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 45;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(13,23,48,.08); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--muted); position: relative; }
  .bottom-nav a.active { color: var(--navy); }
  .bottom-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
  .bottom-nav .bn-wa { color: #1fa855; }
  .bn-count { position: absolute; top: -2px; right: calc(50% - 22px); background: var(--gold); color: var(--navy); font-size: 10.5px; min-width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; }
  body { padding-bottom: 74px; }
  .wa-float { display: none; }
  .promo { grid-template-columns: 1fr; min-height: 0; }
  .promo-art { display: none; }
  .promo-text { padding: 26px 20px; }
}

.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 12px; }
.sec-head h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 24px; }
.offers-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 230px); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.offers-row .card { scroll-snap-align: start; }

.btn-cart { background: linear-gradient(180deg, var(--gold-l), var(--gold)); color: var(--navy); }
.btn-cart:hover { filter: brightness(1.05); }
.btn-gold-solid { background: var(--navy); color: var(--gold-l); width: 100%; padding: 12px; font-size: 16px; }
.btn-gold-solid:hover { background: var(--navy-2); }
.btn-gold-solid:disabled { opacity: .6; cursor: wait; }
.btn-link { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px; width: 100%; }
.icon-btn { border: 0; background: #f2efe7; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px; }

/* ----- السلة ----- */
.drawer-back { position: fixed; inset: 0; background: rgba(7,13,29,.55); z-index: 60; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(400px, 92vw); background: var(--bg); z-index: 61;
  display: flex; flex-direction: column; transform: translateX(-105%); transition: transform .25s; visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; box-shadow: 10px 0 40px rgba(0,0,0,.3); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; background: var(--navy); color: var(--gold-l); }
.drawer-head h3 { margin: 0; font-size: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.drawer-foot { padding: 14px 18px; background: #fff; border-top: 1px solid var(--line); }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 15px; }
.sum-row b { font-size: 17px; }
.sum-row.total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.sum-row.total b { font-size: 21px; color: var(--navy); }

.ci { display: flex; gap: 10px; background: #fff; border-radius: 12px; padding: 10px; box-shadow: var(--shadow); }
.ci img { width: 64px; height: 64px; object-fit: contain; background: #f6f3ec; border-radius: 8px; flex-shrink: 0; }
.ci-info { flex: 1; min-width: 0; }
.ci-info b { display: block; direction: ltr; text-align: right; font-size: 14.5px; }
.ci-info small { color: var(--muted); }
.ci-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { border: 0; background: #faf8f3; width: 28px; height: 28px; cursor: pointer; font-size: 16px; }
.qty span { min-width: 28px; text-align: center; font-weight: 700; }
.ci-del { border: 0; background: none; color: var(--bad); cursor: pointer; font-size: 13px; }
.cart-empty { text-align: center; color: var(--muted); padding: 50px 10px; }
.cart-empty b { display: block; font-size: 44px; }

/* ----- إتمام الطلب ----- */
dialog.checkout { width: min(940px, calc(100% - 24px)); }
.co { padding: 26px; }
.co h2 { margin: 0 0 16px; font-family: var(--font-display); font-weight: 700; }
.co-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; }
.co-fields { display: flex; flex-direction: column; gap: 12px; }
.co-fields label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 14px; }
.co-fields input, .co-fields select, .co-fields textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; font-weight: 400;
}
.co-fields input:focus, .co-fields select:focus, .co-fields textarea:focus { outline: 2px solid rgba(212,165,60,.5); border-color: var(--gold); }
.co-fields .invalid { border-color: var(--bad); background: #fff6f5; }
.pay { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pay legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.pay-opt { flex-direction: row !important; align-items: center; gap: 10px !important; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: #fff; }
.pay-opt:has(input:checked) { border-color: var(--gold); background: #fffaf0; box-shadow: 0 0 0 1px var(--gold); }
.pay-opt input { accent-color: var(--gold-d); width: 18px; height: 18px; }
.pay-opt span { display: flex; flex-direction: column; }
.pay-opt small { color: var(--muted); font-weight: 400; }
.co-summary { background: #faf8f3; border-radius: 14px; padding: 16px; align-self: start; position: sticky; top: 0; }
.co-summary h3 { margin: 0 0 10px; }
.co-line { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.co-line span:first-child { direction: ltr; text-align: right; }
.co-error { color: var(--bad); font-weight: 600; margin: 0; }
.co-done { padding: 34px 26px; text-align: center; }
.co-done .ok { width: 74px; height: 74px; border-radius: 50%; background: #e8f6ee; color: var(--ok); font-size: 40px; display: grid; place-items: center; margin: 0 auto 10px; }
.co-done h2 { margin: 6px 0; font-family: var(--font-display); }
.order-no { display: inline-block; background: var(--navy); color: var(--gold-l); padding: 6px 16px; border-radius: 10px; font-weight: 700; letter-spacing: 1px; direction: ltr; margin: 8px 0 14px; }
.cliq-box { background: #fffaf0; border: 1px dashed var(--gold); border-radius: 12px; padding: 14px; margin: 12px auto; max-width: 420px; text-align: right; }
.cliq-box b { color: var(--navy); }
.co-done .actions { max-width: 420px; margin: 16px auto 0; padding: 0; flex-direction: column; }

/* ----- عام ----- */
.wa-float {
  position: fixed; bottom: 18px; right: 18px; width: 56px; height: 56px; border-radius: 50%; background: #1fa855;
  display: grid; place-items: center; box-shadow: 0 8px 22px rgba(31,168,85,.45); z-index: 40;
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 30px); background: var(--navy); color: var(--gold-l);
  padding: 11px 20px; border-radius: 999px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 80;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.share-btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 12px; cursor: pointer; align-self: flex-start; font-size: 13px; }
.m-qty { display: flex; align-items: center; gap: 10px; }

@media (max-width: 900px) {
  .perks { grid-template-columns: repeat(2, 1fr); }
  .co-grid { grid-template-columns: 1fr; }
  .co-summary { position: static; }
}
@media (max-width: 640px) {
  .cart-btn span:not(.cart-count) { display: none; }
  .cart-btn { padding: 9px 12px; }
  .header-in .brand { flex: 1; }
  .header-in .search { order: 3; }
  .perks { margin-top: 12px; gap: 8px; }
  .perks div { font-size: 13px; padding: 10px; }
  .co { padding: 18px 14px; }
  .topbar-in span:nth-child(2) { display: none; }
  .wa-float { width: 50px; height: 50px; bottom: 14px; right: 14px; }
}
