﻿*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Screen-reader-only content — visually hidden but still announced,
   e.g. the page's single <h1> (kept off-screen since the header logo
   already carries the brand visually). */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Respects the OS/browser "reduce motion" setting — neutralizes every
   animation and transition site-wide (the offers ticker's continuous
   scroll, modal/prompt slide-ins, spinners, etc.) rather than only the
   couple we'd remember to special-case individually. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:root {
  /* Alamdar Auto palette — graphite / white / grey surfaces with a single RED accent,
     taken straight from the logo (the red ring of the Alamdar crest).
     Token names are inherited from the Kuwait fork: --orange is the primary ACCENT
     (buttons with white text, accent text on light backgrounds), not literally orange. */
  --orange: #c1121f;        /* accent on LIGHT surfaces: 6.2:1 on white, carries white text */
  --orange-dark: #8f0d17;
  --orange-light: #ef3b42;  /* brighter red for DARK surfaces: 4.5:1 on --bar */
  --gold: #ef3b42;
  --flag-red: #c1121f;
  --bar: #16191f;           /* header / footer / modal heads */
  --dark: #16191f;
  --charcoal: #0f1115;
  --steel: #1f242c;
  --metal: #2b313a;
  --white: #ffffff;
  --light: #f4f5f7;
  --light2: #eceef1;
  --gray-100: #eceef1;
  --gray-200: #dde1e6;
  /* Carries real text (.products-empty, .empty-cart, .search-overlay-empty,
     .product-price small) and white text on .btn-add-loading, so it has to
     clear 4.5:1. #8a929c managed only 2.88:1 on --light2; this is 4.8:1 on
     --light2 and 5.2:1 on white. */
  --gray-400: #656d77;
  --gray-600: #4b5563;
  --yellow: #f59e0b;        /* status amber (low stock) — deliberately NOT the accent */
  --green: #16a34a;
  --red: #dc2626;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(15,17,21,0.10);
  --shadow-lg: 0 6px 30px rgba(15,17,21,0.18);
  --border: #dde1e6;
  --font-display: 'Barlow Condensed', 'Inter', sans-serif;
}

/* overflow-x:clip (hidden kept as fallback) — unlike hidden it does not turn html/body into a scroll container, which would break position:sticky on the side banners. */
/* NO `scroll-behavior: smooth` here, deliberately (removed 2026-11-11 after
   the owner reported the site "feels capped at 30fps" on a PC while every
   other site scrolled normally). As a rule on <html> it applies to EVERY
   scroll, including the mouse wheel — so each wheel tick got animated to its
   target instead of tracking the wheel, which reads as mushy and slow next
   to native scrolling. It was never dropped frames: measured 165fps with
   zero frames over 20ms on that same page.
   Smooth scrolling is still used where it is actually wanted, from JS that
   asks for it explicitly: the `scrollIntoView({ behavior: 'smooth' })` calls
   and the same-page anchor handler in code/js/06-features.js, both of which
   fall back to 'auto' under prefers-reduced-motion. Don't put it back here. */
html { overflow-x: hidden; overflow-x: clip; touch-action: manipulation; }
/* Category-switch loading flash — covers the viewport for a beat so jumping
   to the filtered products feels like "load then arrive", not a visible
   scroll. See _switchCategoryWithLoading in js/02-catalog-render.js. */
.cat-load-overlay { position: fixed; inset: 0; z-index: 9000; background: var(--light); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease, visibility .18s ease; }
.cat-load-overlay.show { opacity: 1; visibility: visible; pointer-events: all; }
.cat-load-gear { display: block; width: 44px; height: 44px; border-radius: 50%; border: 5px solid var(--gray-200); border-top-color: var(--gold); border-right-color: var(--charcoal); animation: gear-spin .9s linear infinite; }
@keyframes gear-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cat-load-gear { animation: none; } }
* { touch-action: manipulation; }
body { font-family: 'Inter', sans-serif; color: var(--dark); background: var(--light); overflow-x: hidden; overflow-x: clip; max-width: 100vw; overflow-wrap: break-word; word-break: break-word; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.orange { color: var(--orange); }
.section-tag { display: inline-block; background: rgba(193,18,31,0.09); color: var(--orange); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; padding: 5px 14px; border-radius: 4px; margin-bottom: 10px; border: 1px solid rgba(193,18,31,0.2); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: clamp(22px, 3.5vw, 34px); font-weight: 800; color: var(--dark); line-height: 1.2; margin-top: 8px; }

/* ── HEADER ─────────────────────────────────────────────────────────── */
#header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: var(--bar); border-bottom: 3px solid var(--gold); transition: box-shadow 0.3s; }
#header.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.10); }
/* Header spans the full window edge-to-edge (not capped at the 1240px container width)
   so the logo sits at the true left corner and Sign In/language sit at the true right corner. */
#header .container { max-width: 100%; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.logo-wrap { display: flex; align-items: center; text-decoration: none; gap: 10px; }
.logo-img { height: 52px; width: auto; object-fit: contain; border-radius: 50%; background: transparent; padding: 0; box-shadow: none; }
.logo-text-fallback { display: flex; align-items: center; font-size: 21px; font-weight: 900; letter-spacing: -0.5px; }
.logo-dhow { color: #fff; font-family: var(--font-display); letter-spacing: 2px; }
.logo-tech { color: var(--orange); }

#nav { display: flex; gap: clamp(14px, 1.6vw, 26px); }
#nav a { white-space: nowrap; position: relative; color: rgba(255,255,255,0.9); text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: 0.4px; transition: color 0.2s; text-transform: uppercase; padding: 4px 0; }
/* Animated underline on hover/focus — a crisper, more professional cue than
   the old colour-only swap. */
#nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: #fff; border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform 0.22s ease; }
#nav a:hover, #nav a:focus-visible { color: #fff; }
#nav a:hover::after, #nav a:focus-visible::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { #nav a::after { transition: none; } }
/* #navMyOrders / #navSignIn are mobile-dropdown-only shortcuts (the header's
   own Sign In / My Account button already covers desktop) — without this they
   render as a near-invisible link in the middle of the desktop nav row. */
@media (min-width: 1151px) {
  #navMyOrders, #navSignIn { display: none !important; }
}

.header-actions { display: flex; align-items: center; gap: 12px; }
.btn-cart { background: var(--orange); border: none; color: #fff; padding: 9px 18px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; transition: all 0.2s; }
.btn-cart:hover { background: var(--orange-dark); }
#cartCount { background: #fff; color: var(--orange); border-radius: 50%; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; }
.hamburger { display: none; background: none; border: 1px solid rgba(255,255,255,0.3); color: #fff; font-size: 17px; cursor: pointer; padding: 6px 10px; border-radius: 6px; }
.header-search-btn { display: flex; align-items: center; justify-content: center; background: none; border: 1px solid rgba(255,255,255,0.3); color: #fff; font-size: 15px; cursor: pointer; width: 36px; height: 36px; border-radius: 6px; transition: background 0.2s, border-color 0.2s; }
.header-search-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.6); }
/* Inline header search — an expanding dropdown anchored under the icon
   instead of jumping the page to the product grid's own search box. */
.header-search-wrap { position: relative; display: flex; align-items: center; }
.header-search-wrap.open .header-search-btn { background: rgba(255,255,255,0.18); border-color: #fff; }
.header-search-input {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 0; opacity: 0; pointer-events: none;
  background: #fff; color: var(--dark); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 0; font-size: 13px; font-family: inherit;
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
  transition: width 0.22s ease, opacity 0.18s ease, padding 0.22s ease;
  z-index: 1001; outline: none;
}
.header-search-wrap.open .header-search-input { width: 260px; opacity: 1; pointer-events: auto; padding: 10px 14px; }

/* ── HERO LOGO ───────────────────────────────────────────────── */
.hero-logo-wrap { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.hero-logo-img  { height: 84px; width: auto; object-fit: contain; border-radius: 10px; background: transparent; padding: 0; box-shadow: 0 6px 26px rgba(0,0,0,0.45); }
.hero-brand-name { font-size: 38px; font-weight: 900; color: #fff; letter-spacing: 6px; text-transform: uppercase; line-height: 1; text-shadow: 0 2px 16px rgba(0,0,0,0.5); }

/* ── HERO ────────────────────────────────────────────────────── */
#hero { min-height: 72vh; background: var(--bar); display: flex; align-items: center; overflow: hidden; padding-top: 68px; border-bottom: 1px solid var(--border); position: relative; }
#hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, rgba(15,17,21,0.88) 0%, rgba(15,17,21,0.70) 50%, rgba(15,17,21,0.45) 100%); z-index: 1; display: block; }

/* Text on the LEFT — sits above overlay */
.hero-content { flex: 0 0 56%; padding: 80px 40px 80px 0; padding-left: max(20px, calc((100vw - 1200px) / 2)); position: relative; z-index: 2; }

.hero-tag { display: inline-flex; align-items: center; gap: 8px; background: rgba(193,18,31,0.18); color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; padding: 6px 14px; border-radius: 4px; margin-bottom: 22px; border: 1px solid rgba(193,18,31,0.35); }
.hero-content h1 { font-size: clamp(34px, 5.5vw, 62px); font-weight: 900; color: #fff; line-height: 1.08; margin-bottom: 18px; letter-spacing: -1px; }
.hero-content h1 span { color: var(--orange); }
.hero-content p { font-size: 16px; color: rgba(255,255,255,0.82); max-width: 480px; line-height: 1.75; margin-bottom: 36px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 52px; }
.hero-stats { display: flex; gap: 36px; }
.stat { display: flex; flex-direction: column; border-left: 3px solid var(--orange); padding-left: 14px; }
.stat span { font-size: 26px; font-weight: 900; color: #fff; line-height: 1; }
.stat small { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }
.hero-left-ad { margin-top: 32px; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 28px rgba(0,0,0,0.35); }
.hero-left-ad img { width: 100%; height: auto; display: block; border-radius: 12px; }
/* Right column hidden — full.jpg is now the background */
.hero-img-right { display: none; }

/* ── BUTTONS ──────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 14px 26px; border-radius: 7px; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: all 0.2s; letter-spacing: 0.3px; }
.btn-primary { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn-outline { background: transparent; color: var(--dark); border: 2px solid rgba(0,0,0,0.28); }
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }
.full-width { width: 100%; justify-content: center; }

/* Hero buttons — white on dark background */
#hero .btn-primary { background: var(--orange); color: #fff; border-color: var(--orange); }
#hero .btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
#hero .btn-outline { color: #fff; border-color: rgba(255,255,255,0.6); }
#hero .btn-outline:hover { background: rgba(193,18,31,0.25); border-color: #fff; color: #fff; }

/* The red scrolling brand strip that used to sit here was removed on
   2026-11-13 at the owner's request ("u see the read strip moving remove
   that"). @keyframes marquee stays because .offers-track below still
   names it. */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── OFFERS CAROUSEL (images fill the frame, like product cards) ───────── */
#offers { background: var(--dark); padding: 86px 0 20px; }
.offers-band {
  position: relative; width: 100%; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.offers-track { display: flex; gap: 16px; width: max-content; padding: 4px 0; animation: marquee 42s linear infinite; will-change: transform; }
.offers-band:hover .offers-track { animation-play-state: paused; }
.offer-card {
  flex-shrink: 0; width: 210px; background: #fff; border-radius: 14px; overflow: hidden;
  cursor: pointer; display: flex; flex-direction: column;
  box-shadow: 0 4px 16px rgba(0,0,0,.28); transition: transform .2s, box-shadow .2s;
}
.offer-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.offer-card-img { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--light); }
/* Same shimmer skeleton as the main product grid — see css/02-sections.css
   for the shared @keyframes and why (pure CSS, no added cost). */
.offer-card-img:not(.img-ready) { background: linear-gradient(90deg, var(--light) 25%, #ececec 37%, var(--light) 63%); background-size: 400% 100%; animation: skeletonShimmer 1.4s ease-in-out infinite; }
.offer-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: transform .35s ease, opacity 0.25s ease; }
.offer-card-img.img-ready img { opacity: 1; }
.offer-card:hover .offer-card-img img { transform: scale(1.06); }
.offer-tag { position: absolute; top: 8px; left: 8px; z-index: 2; background: var(--orange); color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .04em; padding: 3px 9px; border-radius: 20px; text-transform: uppercase; }
.offer-tag-sale { background: var(--red); }
.offer-card-info { padding: 10px 12px 13px; display: flex; flex-direction: column; gap: 3px; }
.offer-title { font-size: 14px; font-weight: 800; color: var(--dark); line-height: 1.3; }
.offer-sub { font-size: 11.5px; font-weight: 600; color: #777; }
.offer-price-now { color: var(--red); font-weight: 900; font-size: 12.5px; }
.offer-price-was { color: #707070; font-weight: 600; text-decoration: line-through; }


/* Display headings — condensed, automotive feel */
.section-header h2, .intro-heading, .cat-card h3, .footer-brand-name-text { font-family: var(--font-display); letter-spacing: .5px; }
.section-header h2 { font-weight: 800; text-transform: uppercase; }
