/* =========================================
   AtlasStride — Shop theme (same look as the admin dashboard)
   Loaded after app.css and shop-pages.css; overrides tokens + key components.
   Light background with soft glow, white rounded cards, black pill buttons,
   gold kept for prices and small highlights.
   ========================================= */

:root {
  --ink:        #111111;
  --gold:       #9A6B35;          /* prices / accents (passes contrast on white) */
  --gold-soft:  #F6EEE2;
  --primary:    var(--ink);       /* buttons, active states */
  --primary-dk: #000000;
  --primary-lt: #333333;
  --dark:       #111111;
  --text:       #111111;
  --text-light: #6B7280;
  --muted:      #6B7280;
  --bg:         #F4F5F9;
  --bg-2:       #FFFFFF;
  --bg-3:       #F3F4F8;
  --light-sand: #ECEDF3;
  --radius:     12px;
  --radius-lg:  20px;
  --shadow:     0 1px 2px rgba(17,17,17,0.04), 0 8px 24px -12px rgba(17,17,17,0.08);
  --shadow-md:  0 2px 4px rgba(17,17,17,0.04), 0 18px 40px -18px rgba(17,17,17,0.18);
  --glow:       radial-gradient(1200px 600px at 0% 0%, #FCEFF0 0%, transparent 60%),
                radial-gradient(1000px 700px at 100% 30%, #E3ECF8 0%, transparent 60%);
}

/* ── Base ── */
body { font-family: 'Poppins', 'Tajawal', system-ui, sans-serif; background: var(--glow), var(--bg); background-attachment: fixed; color: var(--text); }
body.lang-ar, body:not(.lang-fr) { font-family: 'Poppins', 'Tajawal', system-ui, sans-serif; }
h1, h2, h3, h4, body.lang-fr h1, body.lang-fr h2, body.lang-fr h3 { font-family: 'Poppins', 'Tajawal', sans-serif; font-weight: 500; letter-spacing: -0.02em; color: var(--text); }
::selection { background: var(--gold-soft); }

/* ── Buttons: black / white pills ── */
.btn { border-radius: 50px; font-weight: 500; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; border-color: #000; box-shadow: 0 12px 24px -12px rgba(17,17,17,0.6); }
.btn-outline { background: #fff; color: var(--ink); border: 1px solid var(--light-sand) !important; }
.btn-outline:hover { background: #fff; color: var(--ink); border-color: var(--text-light) !important; }
.btn-add-cart { background: var(--ink); }
.btn-add-cart:hover { background: #000; }

/* ── Header: floating white bar, like the admin top bar ── */
.nav { background: transparent; backdrop-filter: none; border: none; padding-top: 12px; }
.nav.scrolled { box-shadow: none; }
.nav-inner {
  background: rgba(255,255,255,0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.7); border-radius: 50px; height: 64px; padding: 0 12px 0 22px; box-shadow: var(--shadow);
}
body:not(.lang-fr) .nav-inner { padding: 0 22px 0 12px; }
.nav-logo span[style] { font-family: 'Poppins', sans-serif !important; font-size: 1.35rem !important; }
.nav-logo span[style] span[style*="primary"] { color: var(--gold) !important; }
.nav-logo svg { stroke: var(--gold); }
.nav-links { gap: 6px; }
.nav-links a { padding: 9px 16px; border-radius: 50px; color: var(--text); font-size: 0.88rem; font-weight: 400; }
.nav-links a::after { display: none; }
.nav-links a:hover { background: var(--bg-3); color: var(--ink); }
.nav-links a.active { background: var(--ink); color: #fff; }
main { padding-top: 88px; }

/* ── Announcement bar & promo banner ── */
.site-announcement { background: var(--ink); font-size: 0.82rem; }
.hm-promo { background: var(--gold-soft); color: var(--ink); margin: 0 auto; max-width: 1200px; border-radius: 50px; margin-top: 8px; font-size: 0.85rem; }
.hm-promo strong { background: #fff; border: 1px dashed var(--gold); color: var(--ink); }
.hm-promo a { color: var(--ink); }

/* ── Sections ── */
.section, .hm-section { background: transparent !important; }
.hm-alt, .min-features-band { background: transparent !important; border: none !important; }
.hm-head::after, .section-min-header div[style*="height: 3px"] { background: var(--gold) !important; }
.min-feat-item { background: #fff !important; border: 1px solid var(--light-sand) !important; border-radius: var(--radius-lg) !important; box-shadow: var(--shadow); }
.min-feat-icon { color: var(--gold) !important; }

/* ── Product cards ── */
.products-grid { gap: 20px; }
.product-card { border-radius: var(--radius-lg); border: 1px solid var(--light-sand); box-shadow: var(--shadow); }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card-img-wrap { aspect-ratio: 1 / 1; margin: 8px; border-radius: 14px; background: var(--bg-3); }
.product-badge { background: rgba(255,255,255,0.92); color: var(--ink); font-weight: 500; text-transform: none; letter-spacing: 0; backdrop-filter: blur(6px); }
.product-badge-featured { background: var(--ink); font-weight: 500; }
.product-card-body { padding: 8px 18px 18px; }
.product-name { font-weight: 500; font-size: 1rem; }
.product-name a:hover { color: var(--gold); }
.product-price { font-family: 'Poppins', sans-serif; color: var(--gold); font-weight: 600; }
.btn-add-cart { padding: 9px 16px; font-weight: 500; }

/* ── Category & step cards, FAQ, CTA ── */
.hm-cat { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.hm-step { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.hm-step::before { background: var(--ink); }
.hm-faq .pd-faq { border-radius: 16px; box-shadow: var(--shadow); }
.hm-cta { background: var(--ink); border-radius: 28px; }
.pd-review { border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* ── Product page ── */
.pd-main-img, .pd-order, .pd-tabs, .pd-trust li, .pd-unavailable { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.pd-order { border: 1px solid var(--light-sand); }
.pd-category, .pd-inline-link, .pd-video-link { color: var(--gold); }
.pd-price strong, .pd-sum-total strong, .pd-sticky strong { color: var(--gold); }
.pd-submit { border-radius: 50px; }
.pd-whatsapp { border-radius: 50px; }
.pd-coupon button { border-radius: 50px; border-color: var(--ink); color: var(--ink); }
.pd-coupon button:hover { background: var(--ink); color: #fff; }
.pd-tab-list button.active { color: var(--ink); border-bottom-color: var(--ink); }
.pd-thumb.active { border-color: var(--ink); }
.pd-field input, .pd-field select, .pd-coupon input { background: var(--bg-3); border-color: var(--light-sand); }

/* ── Footer: white rounded card ── */
footer { background: transparent !important; border: none !important; padding: 24px 0 0 !important; font-family: 'Poppins', 'Tajawal', sans-serif !important; }
footer > .container { background: #fff; border-radius: 28px 28px 0 0; padding-top: 56px; box-shadow: var(--shadow); }
footer h4 { color: var(--ink) !important; font-weight: 500 !important; }
footer a[href*="wa.me"] { background: var(--ink) !important; border-radius: 50px !important; }

/* =========================================
   Hero (hx-*)
   ========================================= */
.hx { padding: 28px 0 56px; }
.hx-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: center; }
.hx-chip {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--light-sand);
  padding: 8px 16px; border-radius: 50px; font-size: 0.8rem; color: var(--text); box-shadow: var(--shadow);
}
.hx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.hx-title { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 500; line-height: 1.08; letter-spacing: -0.035em; margin: 22px 0 18px; max-width: 13ch; }
body:not(.lang-fr) .hx-title { line-height: 1.3; letter-spacing: 0; max-width: 16ch; }
.hx-sub { font-size: 1.05rem; color: var(--text-light); font-weight: 300; line-height: 1.7; max-width: 46ch; }
.hx-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 36px; }
.hx-btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 28px; border-radius: 50px; font-weight: 500; font-size: 0.95rem; transition: var(--transition); }
.hx-btn-dark { background: var(--ink); color: #fff; box-shadow: 0 16px 32px -16px rgba(17,17,17,0.7); }
.hx-btn-dark:hover { transform: translateY(-2px); color: #fff; }
.hx-btn-light { background: #fff; color: var(--ink); border: 1px solid var(--light-sand); box-shadow: var(--shadow); }
.hx-btn-light:hover { border-color: var(--text-light); }
body:not(.lang-fr) .hx-arrow { transform: scaleX(-1); }
.hx-trust { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 560px; }
.hx-trust li { background: #fff; border: 1px solid var(--light-sand); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.hx-trust strong { display: block; font-size: 1rem; font-weight: 600; color: var(--ink); }
.hx-trust span { font-size: 0.72rem; color: var(--text-light); }

.hx-media { position: relative; display: flex; justify-content: center; padding: 12px 40px; }
.hx-reel {
  position: relative; width: min(380px, 100%); aspect-ratio: 9 / 16; max-height: 640px; border-radius: 32px; overflow: hidden;
  background: #111; box-shadow: 0 40px 80px -40px rgba(17,17,17,0.55); border: 6px solid #fff;
}
.hx-reel video, .hx-reel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hx-sound {
  position: absolute; top: 14px; inset-inline-end: 14px; width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(17,17,17,0.55); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px);
}
.hx-insta {
  position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(255,255,255,0.92); color: var(--ink); border-radius: 50px; padding: 11px 14px; font-size: 0.82rem; font-weight: 500; backdrop-filter: blur(8px);
}
.hx-float {
  position: absolute; display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 18px; padding: 10px 14px 10px 10px;
  box-shadow: var(--shadow-md); border: 1px solid var(--light-sand); max-width: 240px;
}
.hx-float-product { bottom: 72px; inset-inline-start: 0; }
.hx-float-product img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--bg-3); }
.hx-float-product div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.hx-float-product span { font-size: 0.68rem; color: var(--text-light); }
.hx-float-product strong { font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-float-product b { font-size: 0.85rem; color: var(--gold); font-weight: 600; direction: ltr; unicode-bidi: isolate; }
.hx-float-badge { top: 64px; inset-inline-end: 0; }
.hx-badge-icon { width: 34px; height: 34px; border-radius: 50%; background: #E6F6EC; color: #12A26B; display: grid; place-items: center; font-weight: 700; }
.hx-float-badge div { display: flex; flex-direction: column; line-height: 1.3; }
.hx-float-badge strong { font-size: 0.82rem; font-weight: 500; }
.hx-float-badge span { font-size: 0.7rem; color: var(--text-light); }

@media (prefers-reduced-motion: reduce) {
  .hx-btn, .product-card, .hm-cat img { transition: none; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hx-grid { gap: 32px; }
  .hx-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  /* mobile menu from 900px (was 600px) so links never overflow the header */
  .nav-links { display: none; position: fixed; top: 84px; left: 16px; right: 16px; background: #fff; flex-direction: column; padding: 12px; gap: 4px;
    border-radius: 20px; box-shadow: var(--shadow-md); border: 1px solid var(--light-sand); z-index: 999; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 16px; }
  .hamburger { display: flex; }
  .nav-inner { margin: 0 4px; }

  .hx { padding-top: 8px; }
  .hx-grid { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .hx-text { display: flex; flex-direction: column; align-items: center; }
  .hx-title, .hx-sub { max-width: none; }
  .hx-ctas { justify-content: center; margin: 24px 0; }
  .hx-media { order: -1; padding: 0 12px; }
  .hx-reel { width: min(320px, 78vw); max-height: 70vh; border-radius: 26px; }
  .hx-float-product { bottom: 24px; inset-inline-start: -4px; transform: scale(0.92); }
  .hx-float-badge { top: 24px; inset-inline-end: -4px; transform: scale(0.92); }
  .hx-trust { width: 100%; }
}
@media (max-width: 480px) {
  .hx-btn { width: 100%; justify-content: center; }
  .hx-ctas { width: 100%; }
  .hx-float-badge { display: none; }
  .hx-float-product { max-width: 200px; }
}

/* Same font everywhere (old rules used a serif for some titles and prices) */
.section-min-header h2, .min-col h2, .cart-header h2, .detail-price, .logo-text-brand, .product-price {
  font-family: 'Poppins', 'Tajawal', sans-serif !important; font-weight: 500;
}
.section-min-header h2 { font-size: clamp(1.7rem, 3vw, 2.2rem) !important; }
/* Tighter spacing between home sections */
.min-features-band, .section[style*="padding: 100px"] { padding: 56px 0 !important; }
.hm-section { padding: 64px 0; }

/* "Why choose AtlasStride" grid: its 4 columns are set inline, which beat the old
   mobile rule and pushed the page wider than phones. */
.min-features-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 16px !important; }
@media (max-width: 900px) { .min-features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 380px) { .min-features-grid { grid-template-columns: minmax(0, 1fr) !important; } }
.hm-promo { overflow-wrap: anywhere; }

/* ── Language switcher (ع / FR / EN) ── */
.lang-pills { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg-3); border-radius: 50px; }
.lang-pills button {
  border: none; background: transparent; color: var(--text-light); cursor: pointer; font: inherit;
  font-size: 0.75rem; font-weight: 500; min-width: 34px; height: 30px; padding: 0 10px; border-radius: 50px; transition: var(--transition);
}
.lang-pills button[lang="ar"] { font-family: 'Tajawal', sans-serif; font-size: 0.82rem; }
.lang-pills button:hover { color: var(--ink); }
.lang-pills button.active { background: var(--ink); color: #fff; }
.nav-actions { gap: 8px; }
@media (max-width: 380px) { .lang-pills button { min-width: 28px; padding: 0 7px; } }

/* Titles on top of photos stay white */
.hm-cat-overlay h3, .hm-cta h2 { color: #fff !important; }

/* 3 trust items (the 30-day returns item was removed) */
.hx-trust { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; max-width: 440px; }
.pd-trust { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .pd-trust { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 380px) { .hx-trust { grid-template-columns: minmax(0, 1fr) !important; } }


/* ── Home: "Our shoes in action" (videos from public/videos) ── */
.vid-strip { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 16px; justify-content: safe center; scrollbar-width: thin; }
.vid-card { position: relative; flex: 0 0 auto; width: min(260px, 70vw); aspect-ratio: 9 / 16; margin: 0; border-radius: 24px; overflow: hidden;
  background: #111; box-shadow: var(--shadow-md); border: 4px solid #fff; scroll-snap-align: center; }
.vid-card video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.vid-sound { position: absolute; bottom: 12px; inset-inline-end: 12px; width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(17,17,17,0.55); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); }

/* ── ▶ Play-again button on videos (they play once, no sound) ── */
.hx-reel, .vid-card { position: relative; }
.vid-replay {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%;
  border: none; cursor: pointer; display: grid; place-items: center; padding-left: 4px;
  background: rgba(255,255,255,0.9); color: var(--ink); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5); transition: transform 0.2s ease;
}
.vid-replay:hover { transform: translate(-50%, -50%) scale(1.06); }
.vid-replay[hidden] { display: none; }

/* ── Reviews: summary, cards, "Write a review" form ── */
.rv-summary { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.rv-card-head { display: flex; align-items: center; gap: 10px; }
.rv-card-head div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.rv-card-head strong { font-weight: 500; }
.rv-card-head div span { font-size: 0.78rem; color: var(--text-light); }
.mini-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-weight: 600; color: #3B2A14; background: linear-gradient(135deg, #F7D9A8, #C9A45D); }
.pd-review footer { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.pd-review footer a { color: var(--gold); font-size: 0.82rem; }

.rv-form-box { max-width: 720px; margin: 28px auto 0; }
.rv-thanks { display: flex; flex-direction: column; gap: 2px; background: #E6F6EC; color: #0B6B45; border-radius: 16px; padding: 14px 18px; margin-bottom: 14px; text-align: center; }
.rv-form-wrap { background: #fff; border: 1px solid var(--light-sand); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.rv-open-btn { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; font-weight: 500; color: var(--ink); }
.rv-open-btn::-webkit-details-marker { display: none; }
.rv-form-wrap[open] .rv-open-btn { border-bottom: 1px solid var(--light-sand); }
.rv-form { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 22px; }
.rv-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--light-sand); border-radius: var(--radius); background: var(--bg-3); font: inherit; font-weight: 400; color: var(--text); resize: vertical; outline: none; }
.rv-form textarea:focus { border-color: var(--ink); }
.rv-help { font-weight: 400; color: var(--text-light); font-size: 0.75rem; }
.rv-submit { align-self: flex-start; padding: 12px 28px; }
.rv-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Star picker: radios in 5→1 order, shown right-to-left so hovering fills to the left */
.rv-stars-input { border: none; padding: 0; margin: 0; }
.rv-stars-input legend { font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; }
.rv-stars-row { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rv-stars-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rv-stars-row label { font-size: 2rem; line-height: 1; color: var(--light-sand); cursor: pointer; transition: color 0.15s ease; padding: 0 2px; }
.rv-stars-row input:checked ~ label,
.rv-stars-row label:hover, .rv-stars-row label:hover ~ label { color: #F2A600; }
.rv-stars-row input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

/* Center review cards when there are only a few */
.hm-reviews { grid-template-columns: repeat(auto-fit, minmax(260px, 360px)); justify-content: center; }
