/* Style direction: Athletic Editorial Utility — warm paper-white surfaces, ink-black structure, and SportX Action Red used only for action and active states. */
:root {
  --ink: #111214;
  --ink-soft: #303136;
  --red: #f21f2b;
  --red-dark: #ce1220;
  --paper: #fbfaf8;
  --surface: #ffffff;
  --stone: #efede9;
  --stone-dark: #ddd9d3;
  --muted: #77736e;
  --line: #e7e3de;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radius-lg: 24px;
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { margin: 0; min-width: 0; background: var(--paper); color: var(--ink); font-family: "Cairo", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.app-shell { min-height: 100svh; overflow-x: clip; }
.announcement { min-height: 30px; padding: 6px 20px; display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--ink); color: #fff; font: 700 10px/1.4 "Space Grotesk", sans-serif; letter-spacing: .08em; text-transform: uppercase; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(231, 227, 222, .92); background: rgba(251, 250, 248, .94); backdrop-filter: blur(18px); }
.header-inner { width: min(1220px, calc(100% - 48px)); min-height: 74px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand-lockup { display: inline-flex; align-items: baseline; gap: 1px; color: var(--ink); font: 800 24px/1 "Space Grotesk", sans-serif; letter-spacing: -.075em; text-decoration: none; white-space: nowrap; direction: ltr; }
.brand-word { color: var(--ink); }
.brand-x { display: inline-block; color: var(--red); font-size: 1.18em; font-weight: 900; letter-spacing: -.1em; transform: rotate(-7deg); transform-origin: center; }
.desktop-nav { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.nav-link { padding: 10px 13px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 800; text-decoration: none; transition: color .18s var(--ease-out), background .18s var(--ease-out); }
.nav-link:hover, .nav-link.active { background: var(--ink); color: #fff; }
.header-actions { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mobile-track-link { display: none; }
.search-field { position: relative; display: flex; align-items: center; min-width: 0; }
.search-field input { width: 160px; height: 40px; padding: 0 36px 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 700; transition: width .2s var(--ease-out), border-color .2s var(--ease-out); }
.search-field input:focus { width: 205px; border-color: var(--ink); outline: none; }
.search-field input::placeholder { color: var(--muted); opacity: 1; transition: color .2s var(--ease-out); }
.search-icon { position: absolute; inset-inline-end: 13px; width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; pointer-events: none; }
.language-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font: 800 12px/1 "Space Grotesk", sans-serif; transition: background .18s var(--ease-out), color .18s var(--ease-out); }
.language-button:hover { background: var(--stone); }
.cart-button { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px 0 14px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; transition: background .18s var(--ease-out), transform .18s var(--ease-out); }
.cart-button:hover { background: #000; transform: translateY(-1px); }
.cart-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.cart-badge { min-width: 22px; height: 22px; padding: 0 5px; display: inline-grid; place-items: center; border: 2px solid var(--surface); border-radius: 999px; background: var(--red); color: #fff; font: 800 11px/1 "Space Grotesk", sans-serif; box-shadow: 0 2px 7px rgba(242, 31, 43, .45), 0 0 0 1px var(--ink); }

/* Storefront framing */
.hero-section { width: min(1220px, calc(100% - 48px)); margin: 0 auto; padding: 78px 0 64px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(36px, 8vw, 120px); }
.hero-copy { max-width: 660px; }
.hero-kicker, .section-kicker, .product-kicker, .field-kicker, .product-category, .product-card-category { display: block; color: var(--red); font: 800 10px/1.4 "Space Grotesk", sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.hero-kicker { margin-bottom: 18px; }
.hero-copy h1 { margin: 0; max-width: 13ch; font-size: clamp(42px, 7vw, 82px); font-weight: 900; letter-spacing: -.075em; line-height: .98; }
.hero-copy h1 em { color: var(--red); font-style: normal; }
.hero-copy p { max-width: 42ch; margin: 24px 0 26px; color: var(--muted); font-size: 16px; line-height: 1.9; }
.hero-link { display: inline-flex; align-items: center; gap: 15px; padding-bottom: 8px; border-bottom: 2px solid var(--red); font-size: 13px; font-weight: 900; text-decoration: none; }
.hero-link span { color: var(--red); font: 900 18px/1 "Space Grotesk", sans-serif; }
.hero-mark-panel { position: relative; min-height: 360px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(145deg, #fff 4%, var(--stone) 100%); box-shadow: 16px 20px 0 var(--ink); transform: rotate(2.5deg); }
.hero-mark-panel::before, .hero-mark-panel::after { position: absolute; color: rgba(17, 18, 20, .08); font: 900 12px/1 "Space Grotesk", sans-serif; letter-spacing: .18em; }
.hero-mark-panel::before { content: "03 / MOVE"; inset-block-start: 24px; inset-inline-start: 24px; }
.hero-mark-panel::after { content: "EST. 2024"; inset-block-end: 24px; inset-inline-end: 24px; }
.hero-mark { color: var(--red); font: 900 clamp(190px, 25vw, 330px)/.7 "Space Grotesk", sans-serif; letter-spacing: -.2em; transform: rotate(-11deg); text-shadow: 18px 20px 0 rgba(17, 18, 20, .09); }
.hero-panel-label { position: absolute; inset-inline-start: 24px; inset-block-end: 24px; color: var(--ink); font: 800 9px/1 "Space Grotesk", sans-serif; letter-spacing: .12em; }

.collection-section { width: min(1220px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 112px; }
.collection-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.collection-heading h2 { margin: 9px 0 0; font-size: clamp(30px, 4vw, 48px); font-weight: 900; letter-spacing: -.065em; line-height: 1; }
.collection-heading p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.shop-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0 24px; }
.category-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.category-tabs button { display: inline-flex; align-items: center; min-height: 38px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 800; transition: background .18s var(--ease-out), color .18s var(--ease-out), border-color .18s var(--ease-out); }
.category-tabs button:hover, .category-tabs button.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; margin-inline-start: 7px; padding: 0 5px; border-radius: 999px; background: var(--stone); color: var(--muted); font: 800 9px/1 "Space Grotesk", sans-serif; transition: background .18s var(--ease-out), color .18s var(--ease-out); }
.category-tabs button.is-active .tab-count { background: rgba(255, 255, 255, .22); color: #fff; }
.collection-search { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 800; }
.collection-search input { width: 190px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 12px; }
.collection-search input:focus { outline: none; border-color: var(--ink); }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.product-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); background: var(--surface); color: var(--ink); transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out); }
.product-card:hover, .product-card:focus-within { box-shadow: 12px 14px 0 rgba(17, 18, 20, .10); transform: translateY(-4px); }
.product-card.is-soldout:hover, .product-card.is-soldout:focus-within { box-shadow: none; transform: none; }
.product-card-open { all: unset; display: flex; flex-direction: column; width: 100%; min-width: 0; cursor: pointer; color: inherit; text-align: start; }
.product-card-image { position: relative; height: 210px; display: grid; place-items: center; overflow: hidden; background: var(--stone); color: var(--red); font: 900 70px/1 "Space Grotesk", sans-serif; }
.product-card-image img { width: 100%; height: 100%; object-fit: contain; transition: transform .32s var(--ease-out); }
.product-card:hover .product-card-image img { transform: scale(1.045); }
.is-soldout .product-card-image img { filter: grayscale(1); opacity: .5; }
.is-soldout .product-card-image span { opacity: .5; }
.product-card-copy { display: grid; gap: 7px; padding: 16px 16px 18px; }
.product-card-category { color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.product-card-copy strong { min-height: 38px; font-size: 14px; line-height: 1.45; }
.product-card-rating { color: var(--red); font-size: 11px; letter-spacing: .06em; }
.product-card-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.product-card-price b { font: 800 15px/1 "Space Grotesk", sans-serif; }
.product-card-price del { color: #a7a29b; font: 700 11px/1 "Space Grotesk", sans-serif; }
.stock-note { color: var(--red); font: 800 10px/1.4 "Space Grotesk", sans-serif; letter-spacing: .02em; }

.product-badge { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2; padding: 4px 9px; border-radius: 4px; font: 800 9px/1.6 "Space Grotesk", sans-serif; letter-spacing: .07em; text-transform: uppercase; color: #fff; transition: transform .2s var(--ease-out); }
.badge-sale { background: var(--red); box-shadow: 0 2px 8px rgba(242, 31, 43, .4); animation: badgePulse 2.4s infinite ease-in-out; }
.badge-new { background: var(--ink); }
.badge-bestseller { background: var(--stone-dark); color: var(--ink); }
.badge-soldout { background: rgba(17, 18, 20, .55); color: #fff; }
@keyframes badgePulse { 0%, 100% { box-shadow: 0 2px 8px rgba(242, 31, 43, .35); } 50% { box-shadow: 0 2px 14px rgba(242, 31, 43, .7); } }

.card-quick-add { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: 900 18px/1 "Space Grotesk", sans-serif; opacity: 0; transform: translateY(-5px); transition: opacity .18s var(--ease-out), transform .18s var(--ease-out), background .18s var(--ease-out), box-shadow .18s var(--ease-out); }
.product-card:hover .card-quick-add, .product-card:focus-within .card-quick-add, .card-quick-add:focus-visible { opacity: 1; transform: translateY(0); }
.card-quick-add:hover { background: var(--red); box-shadow: 0 4px 12px rgba(242, 31, 43, .45); }
.card-quick-add:active { transform: scale(.9); }

.skeleton-card { border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.skeleton-img { height: 210px; background: linear-gradient(90deg, var(--stone) 25%, var(--stone-dark) 37%, var(--stone) 63%); background-size: 400% 100%; animation: sk-shimmer 1.4s ease-in-out infinite; }
.skeleton-line { height: 10px; margin: 16px 16px 0; border-radius: 4px; background: var(--stone); }
.skeleton-line.short { width: 55%; margin-top: 10px; margin-bottom: 16px; }
@keyframes sk-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

@media (hover: none) {
  .card-quick-add { opacity: 1; transform: none; }
}
.card-arrow { position: absolute; inset-inline-end: 14px; inset-block-end: 15px; color: var(--red); font: 900 18px/1 "Space Grotesk", sans-serif; }
.site-footer { width: min(1220px, calc(100% - 48px)); margin: 0 auto; padding: 25px 0 36px; display: grid; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); }
.site-footer p { margin: 0; font-size: 11px; font-weight: 700; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); font-size: 12px; font-weight: 800; text-decoration: none; transition: color .18s var(--ease-out); }
.footer-nav a:hover { color: var(--ink); }
.footer-lang { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; }
.footer-lang:hover { color: var(--red); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-copyright { color: var(--muted); font: 700 11px/1 "Space Grotesk", sans-serif; }

/* ---- Homepage: mini heading shared by Categories / Featured / Best sellers / New arrivals / Offers / Why SportX ---- */
.mini-heading { padding-bottom: 20px; }
.mini-heading h2 { margin: 9px 0 0; font-size: clamp(26px, 3.4vw, 38px); font-weight: 900; letter-spacing: -.06em; line-height: 1; }
.mini-heading.center { text-align: center; }

/* ---- Categories ---- */
.categories-section { width: min(1220px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 8px; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.category-card { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 20px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: background .18s var(--ease-out), color .18s var(--ease-out), transform .18s var(--ease-out); }
.category-card:hover { background: var(--ink); color: #fff; transform: translateY(-3px); }
.category-card:hover .category-card-count { background: rgba(255, 255, 255, .18); color: #fff; }
.category-card-name { font-size: 15px; font-weight: 800; }
.category-card-count { min-width: 26px; height: 26px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--stone); color: var(--muted); font: 800 11px/1 "Space Grotesk", sans-serif; }

/* ---- Featured / Best sellers / New arrivals / Offers: compact product rows ---- */
.mini-section { width: min(1220px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 8px; }
.mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

/* ---- Why SportX ---- */
.why-section { width: min(1220px, calc(100% - 48px)); margin: 0 auto; padding: 56px 0 8px; }
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.why-card { padding: 26px 22px; border: 1px solid var(--line); background: var(--surface); }
.why-icon { display: block; margin-bottom: 16px; font-size: 26px; }
.why-card h3 { margin: 0 0 8px; font-size: 14px; font-weight: 800; letter-spacing: -.01em; }
.why-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

/* ---- Our Story ---- */
.story-section { width: min(1220px, calc(100% - 48px)); margin: 56px auto 0; padding: 64px 0; display: grid; grid-template-columns: 1.15fr .85fr; align-items: start; gap: clamp(24px, 6vw, 80px); background: var(--ink); color: #fff; }
.story-panel { padding-inline: clamp(24px, 5vw, 64px); }
.story-panel .section-kicker { color: var(--red); }
.story-panel h2 { margin: 14px 0 20px; max-width: 16ch; font-size: clamp(30px, 4.4vw, 52px); font-weight: 900; letter-spacing: -.06em; line-height: 1.05; color: #fff; }
.story-panel p { max-width: 52ch; margin: 0 0 16px; color: rgba(255, 255, 255, .68); font-size: 14px; line-height: 1.9; }
.story-panel p.story-tagline { margin-top: 24px; color: #fff; font: 800 15px/1.6 "Space Grotesk", sans-serif; letter-spacing: -.01em; }
.story-mark { position: sticky; top: 96px; display: grid; place-items: center; overflow: hidden; padding-inline-end: clamp(24px, 5vw, 64px); }
.story-mark span { color: var(--red); font: 900 clamp(140px, 16vw, 220px)/.7 "Space Grotesk", sans-serif; letter-spacing: -.2em; transform: rotate(-9deg); opacity: .9; }
@media (max-width: 780px) { .story-mark { display: none; } }

/* ---- Final CTA ---- */
.cta-section { width: min(1220px, calc(100% - 48px)); margin: 0 auto; padding: 72px 0 84px; text-align: center; }
.cta-section h2 { margin: 0 0 24px; font-size: clamp(30px, 5vw, 50px); font-weight: 900; letter-spacing: -.06em; line-height: 1.05; }
.cta-section h2 em { color: var(--red); font-style: normal; }
.cta-link { justify-content: center; }

/* Product Page overlay and media */
.product-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); background: rgba(17, 18, 20, .58); backdrop-filter: blur(10px); }
.product-sheet {   width: min(990px, 100%); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; overflow: visible; border: 1px solid rgba(255, 255, 255, .36); background: var(--surface); box-shadow: 0 28px 90px rgba(0, 0, 0, .24); }
.product-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--stone-dark) transparent; }
.product-topline { min-height: 56px; padding: 13px 18px 10px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.product-kicker { color: var(--ink); font-size: 9px; letter-spacing: .14em; }
.product-kicker::first-letter { color: var(--red); }
.product-close { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); transition: color .16s var(--ease-out), background .16s var(--ease-out); }
.product-close:hover { background: var(--ink); color: #fff; }
.product-close svg, .size-guide svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.product-layout { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); }
.product-gallery { min-width: 0; padding: 18px 18px 16px; background: var(--stone); }
.main-image-stage { position: relative; width: 100%; aspect-ratio: 1 / 1; min-height: 300px; display: grid; place-items: center; overflow: visible; background: linear-gradient(145deg, #f7f5f2, #e8e4df); }
.detail-main-image { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }
.image-note { position: absolute; z-index: 1; inset-inline-start: 14px; inset-block-start: 14px; padding: 6px 8px; border: 1px solid rgba(17, 18, 20, .1); background: rgba(255, 255, 255, .76); color: var(--ink); font: 800 8px/1 "Space Grotesk", sans-serif; letter-spacing: .12em; }
.thumbnail-rail { display: flex; gap: 9px; max-width: 100%; padding: 13px 0 2px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: var(--stone-dark) transparent; }
.thumbnail { width: 70px; height: 70px; flex: 0 0 70px; padding: 3px; display: grid; place-items: center; border: 2px solid transparent; border-radius: 12px; background: #fff; transition: border-color .18s var(--ease-out), transform .18s var(--ease-out); }
.thumbnail:hover { transform: translateY(-2px); }
.thumbnail.is-active { border-color: var(--red); box-shadow: 0 0 0 2px rgba(242, 31, 43, .13); }
.thumbnail img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery-counter { padding-top: 9px; color: var(--muted); font: 700 10px/1 "Space Grotesk", sans-serif; direction: ltr; text-align: end; }
.product-info { min-width: 0; padding: 30px 30px 26px; display: grid; align-content: start; gap: 26px; }
.product-intro { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.product-category { margin-bottom: 10px; font-size: 9px; }
.product-intro h1 { max-width: 17ch; margin: 0; font-size: clamp(28px, 4vw, 44px); font-weight: 900; letter-spacing: -.07em; line-height: 1.08; }
.price-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.price-row strong { color: var(--ink); font: 900 clamp(22px, 3vw, 30px)/1 "Space Grotesk", sans-serif; letter-spacing: -.055em; }
.price-row del { color: #a6a19b; font: 700 14px/1 "Space Grotesk", sans-serif; }
.discount-tag { padding: 6px 8px; border-radius: 3px; background: rgba(242, 31, 43, .1); color: var(--red-dark); font: 800 9px/1 "Space Grotesk", sans-serif; letter-spacing: .04em; }
.description-block { display: grid; gap: 9px; }
.description-block p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.85; }
.selection-block { display: grid; gap: 12px; }
.selection-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.size-guide { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; }
.size-guide svg { width: 13px; height: 13px; }
.size-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.size-option { min-height: 49px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 800 13px/1 "Space Grotesk", sans-serif; transition: background .18s var(--ease-out), color .18s var(--ease-out), border-color .18s var(--ease-out), transform .18s var(--ease-out); }
.size-option:hover { border-color: var(--ink); transform: translateY(-1px); }
.size-option.is-selected { border-color: var(--ink); background: var(--ink); color: #fff; }
.color-block { display: none; }
.color-block.has-colors { display: grid; }
.color-name { color: var(--muted); font: 800 11px/1 "Space Grotesk", sans-serif; }
.color-options { display: flex; flex-wrap: wrap; gap: 10px; }
.color-option { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; padding: 0; border: 2px solid var(--line); position: relative; cursor: pointer; transition: transform .18s var(--ease-out), border-color .18s var(--ease-out), box-shadow .18s var(--ease-out); }
.color-option:hover { transform: translateY(-1px); }
.color-option.is-selected { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset, 0 0 0 3px var(--ink); }
.color-option.is-selected::after { content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; text-shadow: 0 1px 2px rgba(17, 18, 20, .55); }
.color-option.is-light.is-selected::after { color: #111214; text-shadow: none; }
.quantity-block { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.quantity-control { display: inline-flex; align-items: center; gap: 13px; min-height: 45px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.quantity-control button { width: 35px; height: 35px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--stone); color: var(--ink); font: 700 20px/1 "Space Grotesk", sans-serif; transition: background .16s var(--ease-out), color .16s var(--ease-out); }
.quantity-control button:hover { background: var(--ink); color: #fff; }
.quantity-control output { min-width: 20px; text-align: center; font: 800 14px/1 "Space Grotesk", sans-serif; }

.per-item-variants { display: grid; gap: 10px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--stone); }
.per-item-list { display: grid; gap: 10px; }
.per-item-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.per-item-label { color: var(--ink); font: 800 12px/1 "Space Grotesk", sans-serif; white-space: nowrap; }
.per-item-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.per-item-size { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); font: 700 12px/1 "Cairo", sans-serif; }
.per-item-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.per-item-color { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%; padding: 0; border: 2px solid var(--line); position: relative; cursor: pointer; transition: transform .18s var(--ease-out), border-color .18s var(--ease-out), box-shadow .18s var(--ease-out); }
.per-item-color:hover { transform: translateY(-1px); }
.per-item-color.is-selected { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset, 0 0 0 3px var(--ink); }
.per-item-color.is-selected::after { content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; text-shadow: 0 1px 2px rgba(17, 18, 20, .55); }
.per-item-color.is-light.is-selected::after { color: #111214; text-shadow: none; }
.support-note { display: flex; align-items: center; gap: 9px; padding-top: 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.support-check { width: 20px; height: 20px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: rgba(242, 31, 43, .11); color: var(--red); font-weight: 900; }
.purchase-dock { flex: 0 0 auto; display: flex; align-items: center; gap: 18px; padding: 15px 22px max(15px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .98); box-shadow: 0 -10px 24px rgba(17, 18, 20, .06); }
.purchase-dock-price { display: grid; gap: 5px; min-width: 90px; }
.purchase-dock-price span { color: var(--muted); font: 800 9px/1 "Space Grotesk", sans-serif; letter-spacing: .14em; }
.purchase-dock-price strong { color: var(--ink); font: 900 18px/1 "Space Grotesk", sans-serif; white-space: nowrap; }
.purchase-dock-actions { flex: 1; display: flex; gap: 10px; min-width: 0; }
.add-to-cart-button { min-height: 55px; flex: 1.2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px 0 22px; border: 0; border-radius: 5px; background: var(--red); color: #fff; font-size: 14px; font-weight: 900; box-shadow: 0 12px 26px rgba(242, 31, 43, .2); transition: background .18s var(--ease-out), transform .18s var(--ease-out), box-shadow .18s var(--ease-out); }
.add-to-cart-button:hover { background: var(--red-dark); box-shadow: 0 16px 30px rgba(242, 31, 43, .27); transform: translateY(-1px); }
.add-to-cart-button:active { transform: scale(.98); }
.add-to-cart-button:disabled { cursor: not-allowed; opacity: .6; }
.buy-now-button { min-height: 55px; flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 14px; border: 2px solid var(--ink); border-radius: 5px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 900; white-space: nowrap; transition: background .18s var(--ease-out), color .18s var(--ease-out), transform .18s var(--ease-out); }
.buy-now-button:hover { background: var(--ink); color: #fff; transform: translateY(-1px); }
.buy-now-button:active { transform: scale(.98); }
.buy-now-button:disabled { cursor: not-allowed; opacity: .6; }
.button-arrow { font: 900 21px/1 "Space Grotesk", sans-serif; }

/* Cart */
.cart-scrim { position: fixed; inset: 0; z-index: 40; visibility: hidden; opacity: 0; background: rgba(17, 18, 20, .42); backdrop-filter: blur(5px); transition: opacity .24s var(--ease-out), visibility .24s var(--ease-out); }
.cart-scrim.is-open { visibility: visible; opacity: 1; }
.cart-drawer { position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 50; width: min(420px, calc(100% - 20px)); display: flex; flex-direction: column; background: var(--surface); box-shadow: -16px 0 55px rgba(0, 0, 0, .16); transform: translateX(110%); transition: transform .3s var(--ease-out); }
html[dir="rtl"] .cart-drawer { inset-inline-end: auto; inset-inline-start: 0; transform: translateX(-110%); box-shadow: 16px 0 55px rgba(0, 0, 0, .16); }
.cart-drawer.is-open, html[dir="rtl"] .cart-drawer.is-open { transform: translateX(0); }
.cart-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 20px; border-bottom: 1px solid var(--line); }
.cart-heading h2 { margin: 7px 0 0; font-size: 25px; font-weight: 900; letter-spacing: -.06em; }
.drawer-close { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 24px; line-height: 1; }
.cart-content { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 20px; }
.cart-empty { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; }
.cart-empty svg { width: 48px; height: 48px; fill: none; stroke: var(--red); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.4; }
.cart-empty h3 { margin: 6px 0 0; font-size: 16px; }
.cart-empty p { max-width: 24ch; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.cart-line { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line > img { width: 60px; height: 60px; object-fit: contain; background: var(--stone); }
.cart-line-info { min-width: 0; display: grid; gap: 5px; }
.cart-line-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.cart-line-info span { color: var(--muted); font-size: 10px; font-weight: 700; }
.cart-line-info b { font: 800 12px/1 "Space Grotesk", sans-serif; }
.mini-quantity { display: inline-flex; align-items: center; gap: 5px; }
.mini-quantity button { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; font: 700 14px/1 "Space Grotesk", sans-serif; }
.mini-quantity span { min-width: 15px; text-align: center; font: 800 12px/1 "Space Grotesk", sans-serif; }
.cart-footer { padding: 18px 20px max(18px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fdfcfa; }
.cart-total-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; font-size: 13px; font-weight: 800; }
.cart-total-row strong { font: 900 20px/1 "Space Grotesk", sans-serif; }
.shipping-progress { margin-bottom: 14px; }
.shipping-progress:empty { display: none; }
.shipping-progress-text { margin: 0 0 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.shipping-progress-text b { color: var(--ink); font-weight: 800; }
.shipping-progress-track { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; }
.shipping-progress-fill { height: 100%; border-radius: 999px; background: var(--red); transition: width .3s var(--ease-out); }
.shipping-progress-done { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 6px; background: rgba(46, 160, 67, .12); color: #1c7a34; font-size: 11px; font-weight: 800; }
.drawer-checkout { width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border: 0; border-radius: 5px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 900; }
.drawer-checkout:disabled { cursor: not-allowed; opacity: .42; }
.drawer-checkout span { color: var(--red); font: 900 20px/1 "Space Grotesk", sans-serif; }
.cart-footer p { margin: 10px 0 0; color: var(--muted); text-align: center; font-size: 10px; font-weight: 700; }
.toast { position: fixed; inset-inline: 20px; inset-block-end: max(20px, env(safe-area-inset-bottom)); z-index: 90; width: fit-content; max-width: calc(100% - 40px); margin: 0 auto; padding: 12px 16px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: 0 14px 35px rgba(0, 0, 0, .18); font-size: 12px; font-weight: 800; animation: toast-in .22s var(--ease-out) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 980px) {
  .header-inner, .hero-section, .collection-section, .categories-section, .mini-section, .why-section, .story-section, .cta-section, .track-section, .site-footer { width: min(100% - 36px, 760px); }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-section { grid-template-columns: 1fr; text-align: center; }
  .story-mark { display: none; }
  .desktop-nav { display: none; }
  .mobile-track-link { display: inline-flex; align-items: center; gap: 6px; margin-inline: auto; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; transition: background .18s var(--ease-out); }
  .mobile-track-link:hover { background: var(--stone); }
  .hero-section { grid-template-columns: 1fr; padding-top: 56px; }
  .hero-mark-panel { min-height: 300px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .announcement { min-height: 28px; padding: 6px 12px; gap: 8px; row-gap: 3px; font-size: 8px; letter-spacing: .06em; flex-wrap: wrap; }
  .header-inner { width: calc(100% - 28px); min-height: 62px; gap: 9px; }
  .brand-lockup { font-size: 20px; }
  .header-actions { gap: 6px; }
  .mobile-track-link { padding: 6px 12px; font-size: 11px; }
  /* ---------- FIXED: garbled/overlapping search box on mobile ----------
     `color: transparent` below only hides typed input text — it has no
     effect on the placeholder, which browsers render in their own
     default color by default. With no ::placeholder rule anywhere in
     this file, "ابحث..." kept rendering at full opacity inside the
     collapsed 38px icon-only box, overlapping the search icon. These
     two rules hide/reveal the placeholder in sync with everything else
     that already animates here (width, background, border, color). */
  .search-field input { width: 38px; padding: 0; border-color: transparent; background: transparent; color: transparent; }
  .search-field input::placeholder { color: transparent; }
  .search-field input:focus { width: 132px; padding-inline: 12px 32px; border-color: var(--ink); background: #fff; color: var(--ink); }
  .search-field input:focus::placeholder { color: var(--muted); }
  .search-icon { inset-inline: 11px auto; width: 18px; height: 18px; }
  .language-button { width: 36px; height: 36px; font-size: 11px; }
  .cart-button { min-height: 38px; gap: 5px; padding-inline: 9px; }
  .cart-icon { width: 18px; height: 18px; }
  .cart-label { display: none; }
  .cart-badge { min-width: 21px; height: 21px; font-size: 10px; }
  .hero-section { width: calc(100% - 28px); grid-template-columns: 1fr; gap: 35px; padding: 48px 0 52px; }
  .hero-copy h1 { font-size: clamp(42px, 13vw, 62px); }
  .hero-copy p { margin-block: 18px 21px; font-size: 14px; line-height: 1.8; }
  .hero-mark-panel { min-height: 200px; box-shadow: 10px 12px 0 var(--ink); }
  .hero-mark { font-size: 190px; }
  .hero-panel-label { inset-inline-start: 16px; inset-block-end: 16px; }
  .hero-mark-panel::before { inset-block-start: 16px; inset-inline-start: 16px; }
  .hero-mark-panel::after { inset-block-end: 16px; inset-inline-end: 16px; }
  .collection-section, .categories-section, .mini-section, .why-section, .story-section, .cta-section, .site-footer { width: calc(100% - 28px); }
  .collection-section { padding-bottom: 78px; }
  .category-grid, .mini-grid, .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .category-card { padding: 16px 12px; }
  .story-panel h2 { font-size: clamp(28px, 9vw, 40px); }
  .cta-section h2 { font-size: clamp(24px, 8vw, 34px); }
  .collection-heading { align-items: start; flex-direction: column; gap: 12px; padding-bottom: 18px; }
  .collection-heading h2 { font-size: 32px; }
  .collection-heading p { margin: 0; }
  .shop-controls { align-items: stretch; flex-direction: column; gap: 13px; padding-block: 15px 19px; }
  .category-tabs { overflow-x: auto; padding-bottom: 2px; flex-wrap: nowrap; }
  .category-tabs button { flex: 0 0 auto; }
  .collection-search { justify-content: space-between; }
  .collection-search input { flex: 1; width: auto; }
  .product-grid { gap: 10px; }
  .product-card-image { height: 155px; }
  .product-card-copy { gap: 6px; padding: 12px 11px 15px; }
  .product-card-copy strong { min-height: 42px; font-size: 12px; }
  .product-card-price { display: grid; gap: 4px; }
  .card-arrow { inset-inline-end: 10px; inset-block-end: 13px; font-size: 15px; }
  .site-footer { align-items: start; flex-direction: column; gap: 13px; padding-bottom: 26px; }

  .product-overlay { align-items: flex-end; padding: 0; }
  .product-sheet { position: relative; width: 100%; max-height: calc(100dvh - 8px); border-inline: 0; border-bottom: 0; border-radius: 20px 20px 0 0; }
  .product-sheet::before { content: ""; position: absolute; inset-block-start: 8px; inset-inline: 0; width: 38px; height: 4px; margin: 0 auto; border-radius: 999px; background: var(--stone-dark); pointer-events: none; }
  .product-topline { min-height: 52px; padding: 16px 16px 8px; }
  .product-close { width: 36px; height: 36px; }
  .product-layout { display: block; }
  .product-gallery { display: grid; grid-template-rows: auto auto auto; padding: 16px 16px 14px; }
  .main-image-stage { min-width: 0; width: 100%; aspect-ratio: 1 / 1; height: auto; max-height: 58vh; min-height: 0; overflow: visible; }
  .detail-main-image { min-width: 0; min-height: 0; }
  .image-note { inset-inline-start: 11px; inset-block-start: 11px; padding: 6px 7px; font-size: 7px; }
  .thumbnail-rail { min-height: 70px; align-items: center; gap: 9px; padding-top: 14px; }
  .thumbnail { width: 60px; height: 60px; flex-basis: 60px; border-radius: 10px; }
  .gallery-counter { padding-top: 8px; font-size: 9px; }
  .product-info { gap: 24px; padding: 24px 18px 28px; }
  .product-intro { padding-bottom: 20px; }
  .product-intro h1 { max-width: none; font-size: clamp(27px, 8vw, 36px); line-height: 1.13; }
  .price-row { gap: 9px; margin-top: 16px; }
  .price-row strong { font-size: 26px; }
  .price-row del { font-size: 12px; }
  .discount-tag { padding: 5px 7px; font-size: 8px; }
  .description-block p { font-size: 13px; line-height: 1.75; }
  .selection-block { gap: 14px; padding-top: 20px; border-top: 1px solid var(--line); }
  .size-options { gap: 8px; }
  .size-option { min-height: 48px; }
  .color-option { width: 34px; height: 34px; }
  .quantity-block { padding-top: 18px; border-top: 1px solid var(--line); }
  .per-item-variants { padding: 12px; }
  .per-item-row { gap: 8px; }
  .quantity-control { min-height: 44px; }
  .quantity-control button { width: 35px; height: 35px; }
  .support-note { margin-top: 2px; font-size: 10px; line-height: 1.5; }
  .purchase-dock { gap: 12px; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  .purchase-dock-price { min-width: 72px; gap: 4px; }
  .purchase-dock-price span { font-size: 8px; }
  .purchase-dock-price strong { font-size: 16px; }
  .purchase-dock-actions { gap: 8px; }
  .add-to-cart-button { min-height: 52px; padding-inline: 15px 14px; font-size: 12px; }
  .buy-now-button { min-height: 52px; padding-inline: 10px; font-size: 11px; }
  .button-arrow { font-size: 19px; }
  .cart-drawer { width: min(100%, 410px); }

  .track-section { width: calc(100% - 28px); padding: 8px 0 68px; }
  .track-form { flex-direction: column; }
  /* flex: 1 1 180px (base rule) sets flex-basis on the MAIN axis. Once the
     form switches to flex-direction: column above, the main axis becomes
     vertical, so that 180px basis (plus flex-grow: 1 pulling in any extra
     space) starts controlling height instead of width — overriding
     height: 46px and blowing the inputs up to 180px+ tall. Resetting to
     flex: 0 0 auto here lets height: 46px take over again. */
  .track-form input, .track-form button { width: 100%; flex: 0 0 auto; }
  .track-timeline { padding: 24px 16px 6px; }
  .track-details { grid-template-columns: 1fr; padding: 16px; }

  .checkout-overlay { align-items: flex-end; padding: 0; }
  .checkout-sheet { position: relative; width: 100%; max-height: calc(100dvh - 8px); border-inline: 0; border-bottom: 0; border-radius: 20px 20px 0 0; }
  .checkout-topline { min-height: 52px; padding: 16px 16px 8px; }
  .checkout-details { padding: 20px 18px 24px; }
  .order-summary { padding: 20px 18px 24px; }
}

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

/* ---- Checkout field styles (shared by the split checkout overlay) ---- */
.checkout-field { display: grid; gap: 4px; }
.checkout-field label { font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.checkout-field input { height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 700; }
.checkout-field input:focus { outline: none; border-color: var(--ink); }
.checkout-field select { height: 42px; padding: 0 34px 0 14px; border: 1px solid var(--line); border-radius: 5px; background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2377736e" stroke-width="2.4" stroke-linecap="round"><path d="m6 9 6 6 6-6"/></svg>') no-repeat left 12px center; background-size: 13px; color: var(--ink); font-size: 13px; font-weight: 700; appearance: none; -webkit-appearance: none; }
html[dir="rtl"] .checkout-field select { padding: 0 14px 0 34px; background-position: right 12px center; }
.checkout-field select:invalid { color: var(--muted); }
.checkout-field select:focus { outline: none; border-color: var(--ink); }
.checkout-checkbox { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--ink); cursor: pointer; margin-top: -6px; }
.checkout-checkbox input { width: 16px; height: 16px; accent-color: var(--ink); }
.shipping-rates-card { display: grid; gap: 9px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--stone); }
.shipping-rates-head { display: flex; align-items: center; gap: 7px; font: 800 11px/1 "Cairo", sans-serif; color: var(--ink); }
.shipping-rates-list { display: grid; gap: 6px; }
.shipping-rate-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--muted); transition: background .16s var(--ease-out), color .16s var(--ease-out); }
.shipping-rate-row b { font: 800 12px/1 "Space Grotesk", sans-serif; color: var(--ink); }
.shipping-rate-row.is-active { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.shipping-rate-row.is-active b { color: var(--red); }
.shipping-rates-note { margin: 0; color: var(--muted); font-size: 10px; font-weight: 700; }
.empty-note { grid-column: 1 / -1; text-align: center; padding: 40px 16px; color: var(--muted); font-size: 13px; font-weight: 700; }

/* ---- Order tracking section ---- */
.track-section { width: min(820px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 100px; }
.track-heading { max-width: 52ch; margin-bottom: 26px; }
.track-heading h2 { margin: 8px 0 10px; font-size: clamp(26px, 3.6vw, 36px); font-weight: 900; letter-spacing: -.055em; }
.track-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.track-form { display: flex; flex-wrap: wrap; gap: 10px; padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.track-form input { flex: 1 1 180px; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 700; }
.track-form input:focus { outline: none; border-color: var(--ink); }
.track-form button { flex: 0 0 auto; min-height: 46px; padding: 0 20px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 5px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 900; transition: background .18s var(--ease-out); }
.track-form button:hover { background: var(--red); }
.track-form button b { color: var(--red); font: 900 17px/1 "Space Grotesk", sans-serif; }
.track-form button:hover b { color: #fff; }
.track-result { margin-top: 18px; }
.track-message { padding: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; text-align: center; }
.track-message.is-error { border-color: rgba(242, 31, 43, .3); color: var(--red-dark); background: rgba(242, 31, 43, .05); }
.track-card { border: 1px solid var(--line); background: var(--surface); }
.track-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.track-card-head b { font: 900 16px/1 "Space Grotesk", sans-serif; }
.track-card-head span { color: var(--muted); font-size: 11px; font-weight: 700; }
.track-cancelled { padding: 16px 20px; background: rgba(242, 31, 43, .08); color: var(--red-dark); font-size: 12px; font-weight: 800; }
.track-timeline { display: flex; padding: 26px 20px 8px; }
.track-step { position: relative; flex: 1; padding-inline-end: 12px; text-align: start; }
.track-step::before { content: ""; position: absolute; top: 5px; inset-inline-start: 0; width: 100%; height: 2px; background: var(--line); }
.track-step:last-child::before { width: 50%; }
.track-step::after { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--line); border: 2px solid var(--surface); }
.track-step b { display: block; margin-top: 18px; font-size: 11px; font-weight: 800; color: var(--muted); }
.track-step span { display: block; margin-top: 3px; color: var(--muted); font: 700 9px/1.4 "Space Grotesk", sans-serif; direction: ltr; text-align: start; }
.track-step.done::before { background: var(--ink); }
.track-step.done::after { background: var(--ink); }
.track-step.active b { color: var(--ink); }
.track-step.active::after { background: var(--red); box-shadow: 0 0 0 4px rgba(242, 31, 43, .16); }
.track-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px 20px; border-top: 1px solid var(--line); }
.track-details div { display: grid; gap: 3px; }
.track-details span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.track-details b { font-size: 13px; font-weight: 800; }

/* ---- Split checkout overlay ---- */
.checkout-overlay { position: fixed; inset: 0; z-index: 65; display: flex; align-items: center; justify-content: center; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); background: rgba(17, 18, 20, .58); backdrop-filter: blur(10px); }
.checkout-sheet { width: min(980px, 100%); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; border: 1px solid rgba(255, 255, 255, .36); background: var(--surface); box-shadow: 0 28px 90px rgba(0, 0, 0, .24); }
.checkout-topline { min-height: 56px; padding: 13px 18px 10px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.checkout-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--stone-dark) transparent; }
.checkout-columns { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); }
.checkout-details { min-width: 0; display: grid; align-content: start; gap: 14px; padding: 26px 30px 30px; }
.checkout-details h2 { margin: 0 0 4px; font-size: 20px; font-weight: 900; letter-spacing: -.04em; }
.order-summary { min-width: 0; display: grid; align-content: start; gap: 14px; padding: 26px 26px 30px; border-inline-start: 1px solid var(--line); background: #fdfcfa; }
.order-summary h2 { margin: 0; font-size: 15px; font-weight: 900; letter-spacing: -.02em; }
.order-summary-items { display: grid; gap: 2px; max-height: 300px; overflow-y: auto; }
.order-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 800; }
.order-summary-row strong { font: 900 20px/1 "Space Grotesk", sans-serif; }
.order-summary-row.muted { padding-top: 0; border-top: 0; color: var(--muted); font-size: 12px; }
.order-summary-row.muted b { font: 800 12px/1 "Space Grotesk", sans-serif; color: var(--ink); }
.order-summary-row.muted b.is-free { color: var(--red); }
.checkout-note { margin: 0; color: var(--muted); text-align: center; font-size: 10px; font-weight: 700; }
.checkout-success { display: grid; justify-items: center; gap: 6px; max-width: 420px; margin: 0 auto; padding: 64px 30px; text-align: center; }
.success-icon { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 50%; background: rgba(242, 31, 43, .1); color: var(--red); font: 900 26px/1 "Space Grotesk", sans-serif; }
.checkout-success h2 { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -.04em; }
.checkout-success p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.checkout-success strong { font: 900 26px/1 "Space Grotesk", sans-serif; letter-spacing: -.02em; }
.checkout-success .hero-link { margin-top: 12px; }
.success-confirm-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 16px; width: 100%; }
.confirm-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px; font: 800 12.5px "Cairo", sans-serif; text-decoration: none; border: 1px solid var(--line, #eee); transition: .2s; }
.confirm-btn.wa { background: #25d366; color: #fff; border-color: #25d366; }
.confirm-btn.wa:hover { background: #1fb959; }
.confirm-btn.sms { background: transparent; color: var(--ink, #111); }
.confirm-btn.sms:hover { border-color: var(--ink, #111); }

@media (max-width: 860px) {
  .checkout-columns { grid-template-columns: 1fr; }
  .order-summary { border-inline-start: 0; border-top: 1px solid var(--line); }
}

/* ---- Mobile cascade fix ----
   The shared @media (max-width: 640px) block above (line ~308) sits
   earlier in this file than the .track-form / .checkout-sheet base
   rules (~437-500). With equal selector specificity, CSS lets the
   LATER rule in source order win, regardless of media-query nesting —
   so those later base declarations were silently overriding these
   mobile-only ones on every phone-width screen. Visible symptoms:
   the tracking-form inputs inheriting the base rule's
   `flex: 1 1 180px`, which — once the form becomes a column on
   mobile — turns that 180px flex-basis into ~180px of HEIGHT instead
   of width, and the checkout sheet failing to dock to the bottom of
   the screen / keeping desktop padding. Redeclaring the conflicting
   properties here, after every rule that conflicts with them, is the
   minimal fix (no need to reorder the whole file). ---- */
@media (max-width: 640px) {
  .track-section { width: calc(100% - 28px); padding: 8px 0 68px; }
  .track-form input { flex: 0 0 auto; }
  .track-timeline { padding: 24px 16px 6px; }
  .track-details { grid-template-columns: 1fr; padding: 16px; }
  .checkout-overlay { align-items: flex-end; padding: 0; }
  .checkout-sheet { position: relative; width: 100%; max-height: calc(100dvh - 8px); border-inline: 0; border-bottom: 0; border-radius: 20px 20px 0 0; }
  .checkout-topline { min-height: 52px; padding: 16px 16px 8px; }
  .checkout-details { padding: 20px 18px 24px; }
  .order-summary { padding: 20px 18px 24px; }
}

/* ==========================================================================
   SPORTX SIGNATURE WAITING & LOADING SCREEN (SPORT BLACK, X RED, NO EMOJIS)
   ========================================================================== */
.sportx-loader-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(9, 11, 16, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease, transform 0.4s ease;
}
.sportx-loader-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.03);
}
.sportx-loader-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 34px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.4);
  animation: loaderCardPop 0.5s cubic-bezier(0.16, 1.15, 0.32, 1);
  min-width: 250px;
}
.sportx-loader-spinner-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.sportx-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid #f1f2f4;
  border-top-color: #ff1a23;
  border-right-color: rgba(255, 26, 35, 0.4);
  animation: sportxSpin 0.9s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
  box-shadow: 0 0 16px rgba(255, 26, 35, 0.2);
}
.sportx-loader-inner-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff1a23;
  box-shadow: 0 0 12px rgba(255, 26, 35, 0.6);
  animation: sportxDotPulse 1.4s ease-in-out infinite alternate;
}
.sportx-loader-title {
  font-family: 'Space Grotesk', 'Cairo', sans-serif;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  direction: ltr !important;
  unicode-bidi: isolate;
  gap: 4px;
}
.sportx-loader-title .brand-sport {
  color: #000000 !important;
  font-weight: 900;
}
.sportx-loader-title .brand-x {
  color: #ff1a23 !important;
  font-weight: 900;
  text-shadow: 0 0 14px rgba(255, 26, 35, 0.4);
}
.sportx-loader-bar {
  width: 130px;
  height: 3px;
  background: #f0f2f5;
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  margin: 12px 0 10px;
}
.sportx-loader-progress {
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #ff1a23, transparent);
  border-radius: 99px;
  position: absolute;
  animation: sportxBar 1.2s ease-in-out infinite;
}
.sportx-loader-caption {
  font: 700 12px 'Cairo', sans-serif;
  color: #666666;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sportx-loader-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.sportx-loader-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ff1a23;
  display: inline-block;
  animation: dotPulse 1.2s infinite ease-in-out both;
}
.sportx-loader-dots i:nth-child(1) { animation-delay: -0.32s; }
.sportx-loader-dots i:nth-child(2) { animation-delay: -0.16s; }
.sportx-loader-dots i:nth-child(3) { animation-delay: 0s; }

/* Inline Waiting Badge for Buttons & Actions */
.sportx-waiting-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #000000;
  padding: 4px 12px;
  border-radius: 99px;
  font: 800 13px 'Space Grotesk', 'Cairo', sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.sportx-waiting-badge .txt-sport {
  color: #000000 !important;
}
.sportx-waiting-badge .txt-x {
  color: #ff1a23 !important;
}
.sportx-waiting-badge .sportx-mini-spin {
  width: 12px;
  height: 12px;
  border: 2px solid #e5e7eb;
  border-top-color: #ff1a23;
  border-radius: 50%;
  animation: sportxSpin 0.7s linear infinite;
  display: inline-block;
}

@keyframes sportxSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes sportxDotPulse {
  0% { transform: scale(0.7); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 1; }
}
@keyframes sportxBar {
  0% { left: -50%; }
  100% { left: 110%; }
}
@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1.2); opacity: 1; }
}
@keyframes loaderCardPop {
  from { opacity: 0; transform: scale(0.9) translateY(14px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
