/* ============================================================
   Atlas Drapeaux — Main Stylesheet
   Structure:
   1. CSS Custom Properties (Design Tokens)
   2. Reset & Base
   3. Utilities & Helpers
   4. Layout
   5. Navbar
   6. Hero
   7. Marquee Strip
   8. Products
   9. About
   10. Testimonials
   11. Contact
   12. Footer
   13. Animations & Keyframes
   14. Media Queries
   ============================================================ */


/* ============================================================
   1. CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Colour palette */
  --clr-white:        #ffffff;
  --clr-offwhite:     #faf9f8;
  --clr-surface:      #f5f3f0;
  --clr-border:       #e8e3dd;
  --clr-text-light:   #9a958e;
  --clr-text-muted:   #6b6560;
  --clr-text:         #2c2825;
  --clr-black:        #1a1714;

  /* Moroccan patriotic palette */
  --clr-accent:       #c1121f;   /* Moroccan flag red */
  --clr-accent-dark:  #9b0e18;
  --clr-accent-light: #fde8e8;
  --clr-green:        #006233;   /* Moroccan flag green (star) */
  --clr-green-light:  #e6f4ec;

  /* Typography */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radius */
  --radius-sm:   0.375rem;
  --radius-md:   0.75rem;
  --radius-lg:   1.25rem;
  --radius-xl:   2rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(44,40,37,.06), 0 1px 2px rgba(44,40,37,.04);
  --shadow-md:  0 4px 16px rgba(44,40,37,.08), 0 2px 6px rgba(44,40,37,.04);
  --shadow-lg:  0 12px 40px rgba(44,40,37,.12), 0 4px 12px rgba(44,40,37,.06);
  --shadow-xl:  0 24px 64px rgba(44,40,37,.16);

  /* Transitions */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast:  150ms;
  --duration-base:  300ms;
  --duration-slow:  500ms;
  --duration-xslow: 800ms;

  /* Layout */
  --container-max: 1200px;
  --navbar-h:      72px;
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--clr-text);
  background-color: var(--clr-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: 1rem;
}

:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ============================================================
   3. UTILITIES & HELPERS
   ============================================================ */

/* Section eyebrow label */
.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: var(--space-3);
}

/* Section titles */
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--clr-text);
  margin-bottom: var(--space-5);
}

/* Centred section header block */
.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto var(--space-12);
}

.section-sub {
  color: var(--clr-text-muted);
  font-size: 1.05rem;
  max-width: 440px;
  margin: 0 auto;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition:
    background-color var(--duration-base) var(--ease-out),
    color            var(--duration-base) var(--ease-out),
    border-color     var(--duration-base) var(--ease-out),
    box-shadow       var(--duration-base) var(--ease-out),
    transform        var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn:active { transform: scale(0.97); }

/* Primary — Moroccan red */
.btn--primary {
  background-color: var(--clr-accent);
  color: var(--clr-white);
  box-shadow: 0 4px 16px rgba(193,18,31,.25);
}
.btn--primary:hover {
  background-color: var(--clr-accent-dark);
  box-shadow: 0 8px 24px rgba(193,18,31,.35);
  transform: translateY(-1px);
}

/* Outline */
.btn--outline {
  background-color: transparent;
  color: var(--clr-text);
  border: 1.5px solid var(--clr-border);
}
.btn--outline:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  background-color: var(--clr-accent-light);
  transform: translateY(-1px);
}

/* Ghost (used on hero dark/gradient bg) */
.btn--ghost {
  background-color: transparent;
  color: var(--clr-text);
  border: 1.5px solid rgba(44,40,37,0.3);
}
.btn--ghost:hover {
  background-color: rgba(44,40,37,0.06);
  border-color: var(--clr-text);
}

/* Full width */
.btn--full { width: 100%; }

/* Spinner inside btn */
.btn__spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn--loading .btn__label  { display: none; }
.btn--loading .btn__spinner { display: block; }


/* ============================================================
   4. LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

section { padding-block: var(--space-24); }


/* ============================================================
   5. NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--navbar-h);
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition:
    border-color     var(--duration-base) var(--ease-out),
    box-shadow       var(--duration-base) var(--ease-out),
    background-color var(--duration-base) var(--ease-out);
}

/* Scrolled state — added via JS */
.navbar.is-scrolled {
  border-color: var(--clr-border);
  box-shadow: var(--shadow-sm);
}

.navbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.navbar__logo {
  flex-shrink: 0;
  transition: opacity var(--duration-fast);
}
.navbar__logo:hover { opacity: 0.75; }
.navbar__logo img {
  height: 160px;
  width: auto;
  object-fit: contain;
  display: block;
}

.navbar__nav { flex: 1; }

.navbar__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
}

.navbar__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  letter-spacing: 0.02em;
  position: relative;
  transition: color var(--duration-fast);
}

/* Red underline hover effect */
.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--clr-accent);
  transition: width var(--duration-base) var(--ease-out);
}
.navbar__link:hover             { color: var(--clr-text); }
.navbar__link:hover::after,
.navbar__link.is-active::after  { width: 100%; }
.navbar__link.is-active         { color: var(--clr-text); }

.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: var(--radius-sm);
  transition: background-color var(--duration-fast);
}
.hamburger:hover { background-color: var(--clr-surface); }

.hamburger__line {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: var(--clr-text);
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform var(--duration-base) var(--ease-out),
    opacity   var(--duration-base) var(--ease-out),
    width     var(--duration-base) var(--ease-out);
}

.hamburger.is-open .hamburger__line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.is-open .hamburger__line:nth-child(2) { opacity: 0; width: 0; }
.hamburger.is-open .hamburger__line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* ============================================================
   6. HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--navbar-h);
  /* Warm Moroccan-inspired gradient: off-white → subtle red tint */
  background: linear-gradient(135deg, var(--clr-offwhite) 0%, var(--clr-surface) 55%, var(--clr-accent-light) 100%);
}

/* Decorative blobs */
.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
}
.hero__blob--1 {
  width: min(560px, 75vw);
  height: min(560px, 75vw);
  /* Red-tinted blob top-right */
  background: radial-gradient(circle, rgba(193,18,31,0.18) 0%, transparent 70%);
  top: -10%;
  right: -8%;
  animation: blobFloat 12s ease-in-out infinite alternate;
}
.hero__blob--2 {
  width: min(380px, 55vw);
  height: min(380px, 55vw);
  /* Green-tinted blob bottom-left */
  background: radial-gradient(circle, rgba(0,98,51,0.12) 0%, transparent 70%);
  bottom: -8%;
  left: -4%;
  animation: blobFloat 16s ease-in-out infinite alternate-reverse;
}

/* ── Hero two-column layout ── */
.hero__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  position: relative;
  z-index: 1;
  padding-block: var(--space-20);
}

/* Text column */
.hero__content {
  /* flex column inherits from grid cell */
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-accent-dark);
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
/* Decorative red line before eyebrow */
.hero__eyebrow::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1.5px;
  background-color: var(--clr-accent);
  flex-shrink: 0;
}

.hero__headline {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 5.5vw, 4.8rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--clr-text);
  margin-bottom: var(--space-6);
}
.hero__headline--accent {
  color: var(--clr-accent);   /* Moroccan red */
  font-style: italic;
}

.hero__sub {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--clr-text-muted);
  max-width: 440px;
  margin-bottom: var(--space-8);
  line-height: 1.75;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

/* Trust signal strip */
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  padding-top: var(--space-6);
  border-top: 1px solid var(--clr-border);
}
.hero__trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--clr-text-muted);
}
.hero__trust-icon {
  color: var(--clr-green);   /* Green checkmark — Moroccan star colour */
  font-size: 0.9rem;
  font-weight: 700;
}

/* ── Hero image column (right) ── */
.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__image-wrap {
  position: relative;
  width: 67%;
  max-width: 480px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  /* Subtle floating animation — mimics a flag gently moving */
  animation: heroFloat 7s ease-in-out infinite;
  top: -30px;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Slight zoom on load for visual polish */
  transition: transform var(--duration-xslow) var(--ease-out);
}
.hero__image-wrap:hover .hero__image { transform: scale(1.04); }

/* Badge overlaid on hero image: "Made in Morocco" */
.hero__image-badge {
  position: absolute;
  bottom: var(--space-5);
  left: var(--space-5);
  background-color: rgba(26,23,20,0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--clr-white);
}
.hero__image-badge-star {
  font-size: 1.1rem;
  color: var(--clr-green);   /* Moroccan star: green */
}
.hero__image-badge-text {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
}

/* Rotating badge (corner) */
.hero__badge {
  position: absolute;
  bottom: var(--space-16);
  right: var(--space-12);
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background-color: var(--clr-accent);  /* Red badge */
  color: var(--clr-white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: fadeInUp 0.8s var(--ease-out) 1s both;
  z-index: 2;
  box-shadow: 0 8px 24px rgba(193,18,31,.35);
}
.hero__badge-text {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* Scroll indicator */
.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-10);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  z-index: 1;
}
.hero__scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--clr-accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
.hero__scroll-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-text-light);
}


/* ============================================================
   7. MARQUEE STRIP
   ============================================================ */
.marquee-strip {
  background-color: var(--clr-text);
  color: var(--clr-white);
  padding-block: var(--space-4);
  overflow: hidden;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  animation: marqueeScroll 30s linear infinite;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.marquee-dot {
  color: var(--clr-accent);   /* Red separators */
  font-size: 1.2em;
}


/* ============================================================
   8. PRODUCTS
   ============================================================ */
.products { background-color: var(--clr-white); }

/* Filter tabs */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-12);
}

.filter-tab {
  padding: 0.75rem 1.4rem;
  min-height: 44px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--clr-border);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  background-color: transparent;
  transition:
    background-color var(--duration-base) var(--ease-out),
    color            var(--duration-base) var(--ease-out),
    border-color     var(--duration-base) var(--ease-out),
    transform        var(--duration-fast) var(--ease-out);
}
.filter-tab:hover    { border-color: var(--clr-accent); color: var(--clr-accent); }
.filter-tab.active   {
  background-color: var(--clr-accent);
  color: var(--clr-white);
  border-color: var(--clr-accent);
}
.filter-tab:active   { transform: scale(0.97); }

/* ── Product Grid: 4 col desktop · 2 tablet · 1 mobile ─── */
.products__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  align-items: stretch;
}

/* ── Product Card ─────────────────────────────────────────── */
.product-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--clr-white);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition:
    box-shadow var(--duration-base) var(--ease-out),
    transform  var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
  will-change: transform;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-8px);
  border-color: transparent;
}

/* Hidden cards (filtered out) */
.product-card.is-hidden { display: none; }

/* ── Image ── */
.product-card__image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;   /* landscape — flags are horizontal */
  background-color: var(--clr-surface);
  flex-shrink: 0;
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 380ms var(--ease-out);
}
.product-card:hover .product-card__image { transform: scale(1.08); }

/* Overlay with "View Details" pill */
.product-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,23,20,0.55) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: var(--space-5);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}
.product-card:hover .product-card__overlay { opacity: 1; }

.product-card__quick-add {
  background-color: var(--clr-white);
  color: var(--clr-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.55rem 1.5rem;
  border-radius: var(--radius-full);
  transform: translateY(10px);
  transition:
    transform         var(--duration-base) var(--ease-out),
    background-color  var(--duration-fast),
    color             var(--duration-fast);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.product-card:hover .product-card__quick-add { transform: translateY(0); }
.product-card__quick-add:hover {
  background-color: var(--clr-accent);
  color: var(--clr-white);
}

/* Badges */
.product-card__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background-color: var(--clr-white);
  color: var(--clr-text);
  box-shadow: var(--shadow-sm);
}
.product-card__badge--new {
  background-color: var(--clr-green);
  color: var(--clr-white);
}
.product-card__badge--sale {
  background-color: var(--clr-accent);
  color: var(--clr-white);
}

/* ── Card info ── */
.product-card__info {
  padding: var(--space-4) var(--space-5) var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__category {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-text-light);
  margin-bottom: var(--space-2);
  display: block;
}

.product-card__name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: var(--space-2);
  line-height: 1.25;
}

.product-card__desc {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  /* Clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;   /* push footer/order to the bottom */
}

/* Price row */
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}

.product-card__price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-accent);   /* Moroccan red highlight */
  letter-spacing: -0.01em;
}

.product-card__old-price {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--clr-text-light);
  text-decoration: line-through;
  margin-left: 5px;
}

/* ── Clickable product image link ── */
.product-card__image-link {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
}
.product-card__image-link:focus-visible {
  outline: 3px solid var(--clr-accent);
  outline-offset: -3px;
}

/* ── Low stock badge ── */
.product-card__badge--low-stock {
  background-color: #f59e0b;
  color: #fff;
}

/* ── Unit price + wholesale note ── */
.product-card__unit-price {
  font-size: 0.72rem;
  color: var(--clr-text-muted);
  margin-top: 0.2rem;
}
.product-card__wholesale-note {
  font-size: 0.68rem;
  color: var(--clr-text-light);
  margin-top: 0.35rem;
  font-style: italic;
}

/* Load more */
.products__load-more {
  text-align: center;
  margin-top: var(--space-16);
}


/* ============================================================
   9. ABOUT
   ============================================================ */
.about { background-color: var(--clr-offwhite); }

.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-12), 6vw, var(--space-24));
  align-items: center;
}

/* Image column */
.about__visual { position: relative; }

.about__image-frame {
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-xl);
}

.about__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-xslow) var(--ease-out);
}
.about__image-frame:hover .about__image { transform: scale(1.04); }

/* Floating stat cards */
.about__stat-card {
  position: absolute;
  background-color: var(--clr-white);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-lg);
  text-align: center;
  min-width: 130px;
}
.about__stat-card--1 { top: var(--space-8);    right: calc(-1 * var(--space-8)); }
.about__stat-card--2 { bottom: var(--space-8); left:  calc(-1 * var(--space-8)); }

.about__stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--clr-accent);   /* Red number */
  line-height: 1;
  margin-bottom: var(--space-1);
}
.about__stat-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
}

/* Text column */
.about__body {
  color: var(--clr-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-5);
}

.about__pillars {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-block: var(--space-8) var(--space-10);
}
.about__pillar {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.about__pillar-icon {
  font-size: 0.9rem;
  color: var(--clr-green);   /* Moroccan star: green */
  margin-top: 3px;
  flex-shrink: 0;
}
.about__pillar strong {
  display: block;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: var(--space-1);
}
.about__pillar p {
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
}


/* ============================================================
   10. TESTIMONIALS
   ============================================================ */
.testimonials { background-color: var(--clr-white); }

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.testimonial-card {
  background-color: var(--clr-offwhite);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition:
    transform  var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.testimonial-card__stars {
  color: var(--clr-accent);   /* Red stars */
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-5);
}

.testimonial-card__body {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--clr-text);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.testimonial-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--clr-border);
  flex-shrink: 0;
}
.testimonial-card__avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  border: none;
  letter-spacing: 0.04em;
}
.testimonial-card__author strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--clr-text);
}
.testimonial-card__author span {
  font-size: 0.78rem;
  color: var(--clr-text-light);
}


/* ============================================================
   11. CONTACT
   ============================================================ */
.contact { background-color: var(--clr-surface); }

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(var(--space-12), 6vw, var(--space-20));
  align-items: start;
}

.contact__body {
  color: var(--clr-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-8);
  font-size: 1.05rem;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.contact__details li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}
.contact__detail-icon {
  font-size: 1rem;
  color: var(--clr-accent);
  margin-top: 3px;
  width: 20px;
  flex-shrink: 0;
}
.contact__details a,
.contact__details span {
  color: var(--clr-text-muted);
  font-size: 0.95rem;
  transition: color var(--duration-fast);
}
.contact__details a:hover { color: var(--clr-text); }

/* Form */
.contact-form {
  background-color: var(--clr-white);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  box-shadow: var(--shadow-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--clr-text);
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  background-color: var(--clr-offwhite);
  color: var(--clr-text);
  font-size: 0.95rem;
  transition:
    border-color     var(--duration-fast),
    background-color var(--duration-fast),
    box-shadow       var(--duration-fast);
  appearance: none;
}
.form-input::placeholder { color: var(--clr-text-light); }
.form-input:focus {
  outline: none;
  border-color: var(--clr-accent);
  background-color: var(--clr-white);
  box-shadow: 0 0 0 3px rgba(193,18,31,0.12);
}
.form-input.is-error { border-color: #e74c3c; }
[data-theme="dark"] .form-input.is-error { border-color: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,.15); }

.form-textarea { resize: vertical; min-height: 130px; }
.form-select   { cursor: pointer; min-height: 44px; }

.form-error {
  font-size: 0.78rem;
  color: #e74c3c;
  min-height: 1rem;
}
[data-theme="dark"] .form-error { color: #f87171; }

.form-success {
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  color: #166534;
  font-size: 0.9rem;
  font-weight: 500;
  animation: fadeInUp var(--duration-base) var(--ease-out) both;
}


/* ============================================================
   12. FOOTER
   ============================================================ */
.footer {
  background-color: var(--clr-text);
  color: var(--clr-white);
  padding-top: var(--space-20);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: var(--space-20);
  padding-bottom: var(--space-16);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer__brand .navbar__logo {
  display: inline-block;
  margin-bottom: var(--space-5);
}

.footer__tagline {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: var(--space-6);
  max-width: 260px;
}

.footer__contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer__contact-link {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--duration-fast);
}
.footer__contact-link:hover { color: var(--clr-white); }

/* Keep .footer__social for backward compat but hide empty */
.footer__social {
  display: flex;
  gap: var(--space-4);
}
.footer__social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  transition:
    background-color var(--duration-fast),
    border-color     var(--duration-fast),
    color            var(--duration-fast),
    transform        var(--duration-fast);
}
.footer__social-link svg { width: 16px; height: 16px; }
.footer__social-link:hover {
  background-color: var(--clr-accent);   /* Red on hover */
  border-color: var(--clr-accent);
  color: var(--clr-white);
  transform: translateY(-2px);
}

.footer__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.footer__col-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-white);
  margin-bottom: var(--space-6);
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer__col a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  transition: color var(--duration-fast), padding-left var(--duration-fast);
}
.footer__col a:hover {
  color: var(--clr-white);
  padding-left: var(--space-2);
}

.footer__bottom { padding-block: var(--space-6); }

.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.footer__bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}
.footer__legal {
  display: flex;
  gap: var(--space-6);
}
.footer__legal a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
  transition: color var(--duration-fast);
}
.footer__legal a:hover { color: var(--clr-white); }


/* ============================================================
   13. ANIMATIONS & KEYFRAMES
   ============================================================ */

/* ── Scroll reveal base state ── */
/* Only hide elements when JS has loaded; fallback = always visible */
body.js-loaded .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity   420ms var(--ease-out),
    transform 420ms var(--ease-out);
}
.reveal.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Stagger delays (set via JS data-delay attribute) */
.reveal[data-delay="1"] { transition-delay:  60ms; }
.reveal[data-delay="2"] { transition-delay: 110ms; }
.reveal[data-delay="3"] { transition-delay: 160ms; }
.reveal[data-delay="4"] { transition-delay: 210ms; }
.reveal[data-delay="5"] { transition-delay: 260ms; }

/* ── Hero initial fade-in (runs once on page load) ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp var(--duration-xslow) var(--ease-out) forwards;
}
.delay-1 { animation-delay: 0.25s; }
.delay-2 { animation-delay: 0.45s; }
.delay-3 { animation-delay: 0.65s; }
.delay-4 { animation-delay: 0.85s; }

/* ── Keyframes ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Decorative blob movement */
@keyframes blobFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, -30px) scale(1.05); }
}

/* Rotating corner badge */
@keyframes badgeSpin {
  to { transform: rotate(360deg); }
}

/* Scroll line pulse */
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(0.7); }
}

/* Marquee continuous scroll */
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Hero image gentle float — mimics a flag in the breeze */
@keyframes heroFloat {
  0%,  100% { transform: translateY(0px); }
  50%        { transform: translateY(-14px); }
}

/* Button spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ============================================================
   14. MEDIA QUERIES  (Mobile-first breakpoints)
   ============================================================ */

/* ── Hamburger nav: ≤ 1024px (tablet + small laptop) ── */
@media (max-width: 1024px) {

  .navbar__link::after { display: none; }

  .navbar__nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 85vw);
    height: 100dvh;
    background-color: var(--clr-white);
    border-left: 1px solid var(--clr-border);
    padding: calc(var(--navbar-h) + var(--space-10)) var(--space-6) var(--space-8);
    transform: translateX(110%);
    opacity: 0;
    visibility: hidden;
    transition:
      transform  350ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity    350ms ease-in-out,
      visibility 0ms  linear 350ms;
    z-index: 1001;
    box-shadow: -16px 0 56px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
  }

  .navbar__nav.is-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    transition:
      transform  350ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity    350ms ease-in-out,
      visibility 0ms  linear 0ms;
  }

  .navbar__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--clr-border);
  }

  .navbar__link {
    font-size: 1rem;
    font-weight: 500;
    padding: var(--space-4) var(--space-2);
    color: var(--clr-text-muted);
    border-bottom: 1px solid var(--clr-border);
    display: flex;
    align-items: center;
    transition: color var(--duration-fast), padding-left var(--duration-fast);
  }

  .navbar__link:hover,
  .navbar__link.is-active { color: var(--clr-accent); padding-left: var(--space-4); }

  .hamburger { display: flex; }
  .navbar__actions .btn--outline { display: none; }
}

/* ── Tablet: ≤ 900px ── */
@media (max-width: 900px) {

  section { padding-block: var(--space-16); }

  /* Hero: stack to single column */
  .hero__layout {
    grid-template-columns: 1fr;
    gap: var(--space-10);
    padding-block: var(--space-16) var(--space-10);
  }
  .hero__image-wrap {
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
    animation: none;   /* no float on tablet — cleaner UX */
  }

  /* Products: 2 columns */
  .products__grid { grid-template-columns: repeat(2, 1fr); }

  /* Testimonials: 1 column */
  .testimonials__grid { grid-template-columns: 1fr; gap: var(--space-5); }

  /* About: stack */
  .about__inner {
    grid-template-columns: 1fr;
    gap: var(--space-16);
  }
  .about__visual  { max-width: 460px; margin: 0 auto; }
  .about__stat-card--1 { right: 0; }
  .about__stat-card--2 { left: 0; }

  /* Contact: stack */
  .contact__inner { grid-template-columns: 1fr; }

  /* Footer */
  .footer__inner { grid-template-columns: 1fr; gap: var(--space-12); }
  .footer__links { grid-template-columns: repeat(3, 1fr); }

  /* Hide corner badge at mid sizes */
  .hero__badge         { display: none; }
}

/* ── Large mobile: ≤ 640px ── */
@media (max-width: 640px) {

  section { padding-block: var(--space-12); }

  /* ── Tighten navbar spacing so all icons fit in one line ── */
  .navbar__inner   { gap: 0.5rem; }
  .navbar__actions { gap: 0.375rem; }
  .navbar__logo img { height: 140px; }
  .lang-btn        { padding: 0.2rem 0.4rem; }

  /* ── Show only the inactive language button; hide full label text ── */
  .lang-btn.active,
  .lang-btn--current { display: none !important; }
  .lang-label        { display: none !important; }

  /* ── Disable desktop underline on mobile links ── */
  .navbar__link::after { display: none; }

  /* ── Nav panel: slides in from the RIGHT ── */
  .navbar__nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 85vw);
    height: 100dvh;
    background-color: var(--clr-white);
    border-left: 1px solid var(--clr-border);
    /* Top padding accounts for navbar height so links start below it */
    padding: calc(var(--navbar-h) + var(--space-10)) var(--space-6) var(--space-8);
    /* Start fully off-screen right, hidden from tab order */
    transform: translateX(110%);
    opacity: 0;
    visibility: hidden;
    /* Closing: slide + fade, then hide from accessibility */
    transition:
      transform  350ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity    350ms ease-in-out,
      visibility 0ms  linear 350ms;
    z-index: 1001;
    box-shadow: -16px 0 56px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
  }

  /* Open: panel slides in and becomes interactive */
  .navbar__nav.is-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    /* Opening: make accessible immediately, then animate */
    transition:
      transform  350ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity    350ms ease-in-out,
      visibility 0ms  linear 0ms;
  }

  /* Links stacked vertically, full width */
  .navbar__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--clr-border);
  }
  .navbar__link {
    font-size: 1rem;
    font-weight: 500;
    padding: var(--space-4) var(--space-2);
    color: var(--clr-text-muted);
    border-bottom: 1px solid var(--clr-border);
    display: flex;
    align-items: center;
    transition: color var(--duration-fast), padding-left var(--duration-fast);
  }
  .navbar__link:hover,
  .navbar__link.is-active { color: var(--clr-accent); padding-left: var(--space-4); }

  .hamburger { display: flex; }
  .navbar__actions .btn--outline { display: none; }

  /* Hero */
  .hero__headline          { font-size: clamp(2.2rem, 9vw, 3rem); }
  .hero__image-wrap        { width: 100%; max-width: 100%; aspect-ratio: 4 / 3; }
  .hero__scroll-indicator  { display: none; }
  .hero__trust             { gap: var(--space-4); }

  /* Products: 1 column */
  .products__grid          { grid-template-columns: 1fr; }
  .filter-tabs             { gap: var(--space-2); }

  /* Contact form */
  .form-row                { grid-template-columns: 1fr; }
  .contact-form            { padding: var(--space-6); }

  /* Footer */
  .footer__links           { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
  .footer__bottom-inner    { flex-direction: column; text-align: center; }

  /* Section header */
  .section-header          { margin-bottom: var(--space-8); }
}

/* ── Small mobile: ≤ 380px ── */
@media (max-width: 380px) {
  .footer__links        { grid-template-columns: 1fr; }
  .hero__cta            { flex-direction: column; }
  .hero__cta .btn       { width: 100%; justify-content: center; }
  .hero__trust          { flex-direction: column; gap: var(--space-3); }
}


/* ============================================================
   15. MOBILE OVERLAY
   ============================================================ */

/*
 * Semi-transparent backdrop that appears behind the slide-in nav panel.
 * Clicking it closes the menu. Only rendered on mobile (≤ 640px).
 */
.mobile-overlay {
  display: none;               /* hidden on desktop */
  position: fixed;
  inset: 0;
  z-index: 998;                /* below navbar (1000) so hamburger stays clickable */
  background-color: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  cursor: pointer;
  pointer-events: none;        /* non-interactive until menu opens */
  transition:
    background-color 350ms ease-in-out,
    backdrop-filter  350ms ease-in-out;
}

/* Visible state — activated when menu opens */
.mobile-overlay.is-visible {
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  pointer-events: auto;
}

@media (max-width: 640px) {
  .mobile-overlay { display: block; }
}


/* ============================================================
   16. THEME TOGGLE BUTTON
   ============================================================ */

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--clr-text-muted);
  /* Smooth icon rotation on hover */
  transition:
    background-color var(--duration-fast),
    color            var(--duration-fast),
    transform        var(--duration-base) var(--ease-out);
}
.theme-toggle:hover {
  background-color: var(--clr-surface);
  color: var(--clr-text);
  transform: rotate(22deg) scale(1.1);
}
.theme-toggle svg { width: 18px; height: 18px; }

/* Icon visibility — swap moon ↔ sun based on active theme */
.theme-toggle__sun  { display: none; }   /* hidden in light mode  */
.theme-toggle__moon { display: block; }  /* visible in light mode */

[data-theme="dark"] .theme-toggle__sun  { display: block; }  /* visible in dark mode  */
[data-theme="dark"] .theme-toggle__moon { display: none; }   /* hidden in dark mode   */


/* ============================================================
   17. DARK MODE
   ============================================================ */

/*
 * Applied to <html data-theme="dark"> by JavaScript.
 * Every component that uses var(--clr-*) automatically inherits
 * the dark values. A handful of components use hardcoded colours
 * and need explicit overrides below.
 */

/* ── Dark palette tokens ── */
[data-theme="dark"] {
  --clr-white:        #0f172a;   /* page / section background   */
  --clr-offwhite:     #131e36;   /* alternate section background */
  --clr-surface:      #1e293b;   /* card & input background      */
  --clr-border:       #2d3a4f;   /* subtle dividers              */
  --clr-text-light:   #475569;   /* very muted / placeholder     */
  --clr-text-muted:   #94a3b8;   /* secondary text               */
  --clr-text:         #e2e8f0;   /* primary text (soft white)    */
  --clr-black:        #060d1c;   /* deepest background           */

  /* Accent colours stay vibrant — they pop on dark backgrounds */
  --clr-accent-light: rgba(193, 18, 31, 0.18);
  --clr-green-light:  rgba(0, 98, 51, 0.18);

  /* Heavier shadows in dark mode for depth */
  --shadow-sm: 0 1px 3px  rgba(0, 0, 0, 0.5),  0 1px 2px  rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6),  0 2px 6px  rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.7), 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.8);
}

/* ── Navbar — hardcoded rgba white needs dark equivalent ── */
[data-theme="dark"] .navbar {
  background-color: rgba(15, 23, 42, 0.96);
}
[data-theme="dark"] .navbar.is-scrolled {
  box-shadow: 0 1px 0 var(--clr-border), var(--shadow-sm);
}

/* ── Marquee strip — uses var(--clr-text) as bg which flips to light ── */
[data-theme="dark"] .marquee-strip {
  background-color: var(--clr-black);
  color: #e2e8f0;
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}

/* ── Footer — background and all text use explicit hex, no CSS vars,
      because var(--clr-white) and var(--clr-text) both flip in dark mode ── */
[data-theme="dark"] .footer {
  background-color: #060d1c !important;
  color: #e2e8f0 !important;
}
[data-theme="dark"] .footer__inner {
  border-bottom-color: rgba(226, 232, 240, 0.08) !important;
}

/* Logo */
[data-theme="dark"] .navbar__logo img {
  filter: brightness(1.1);
}

/* Section headings */
[data-theme="dark"] .footer__col-title {
  color: #e2e8f0 !important;
}

/* Footer links */
[data-theme="dark"] .footer__col a {
  color: rgba(226, 232, 240, 0.6) !important;
}
[data-theme="dark"] .footer__col a:hover {
  color: #e2e8f0 !important;
}

/* Social icons */
[data-theme="dark"] .footer__social-link {
  border-color: rgba(226, 232, 240, 0.2) !important;
  color: rgba(226, 232, 240, 0.6) !important;
}

/* Tagline */
[data-theme="dark"] .footer__tagline {
  color: rgba(226, 232, 240, 0.5) !important;
}

/* Bottom bar copyright */
[data-theme="dark"] .footer__bottom p {
  color: rgba(226, 232, 240, 0.4) !important;
}

/* Legal links */
[data-theme="dark"] .footer__legal a {
  color: rgba(226, 232, 240, 0.4) !important;
}
[data-theme="dark"] .footer__legal a:hover {
  color: #e2e8f0 !important;
}

/* ── Ghost button — hardcoded rgba dark border ── */
[data-theme="dark"] .btn--ghost {
  border-color: rgba(226, 232, 240, 0.25);
  color: var(--clr-text);
}
[data-theme="dark"] .btn--ghost:hover {
  background-color: rgba(226, 232, 240, 0.08);
  border-color: rgba(226, 232, 240, 0.5);
}

/* ── Hero gradient background adapts via vars automatically ── */
/* ── Hero image dark badge already uses dark rgba — fine as-is ── */

/* ── Mobile nav panel in dark mode ── */
[data-theme="dark"] .navbar__nav {
  background-color: var(--clr-surface);
  border-left-color: var(--clr-border);
  box-shadow: -16px 0 56px rgba(0, 0, 0, 0.5);
}

/* ── Cart badge ring in dark mode ── */
[data-theme="dark"] .mini-cart__count {
  border-color: var(--clr-surface);
}
/* ── Lang buttons in dark mode ── */
[data-theme="dark"] .lang-btn.active {
  background: rgba(193, 18, 31, 0.22);
}

/* ── Mini-cart item remove hover in dark mode ── */
[data-theme="dark"] .mini-cart__item-remove:hover {
  background-color: rgba(193, 18, 31, 0.15);
  color: var(--clr-accent);
}

/* ── Product card overlay text stays white — fine ── */
/* ── About stat cards use var(--clr-white) — auto-adapts ── */

/* ── Form inputs ── */
[data-theme="dark"] .form-input:focus {
  background-color: var(--clr-offwhite);
  box-shadow: 0 0 0 3px rgba(193, 18, 31, 0.2);
}
[data-theme="dark"] .form-input {
  background-color: var(--clr-surface);
  border-color: var(--clr-border);
  color: var(--clr-text);
}
[data-theme="dark"] .form-success {
  background-color: rgba(0, 98, 51, 0.15);
  border-color: rgba(0, 98, 51, 0.35);
  color: #86efad;
}

/* ── About stat cards — var(--clr-white) remaps to dark page bg, fix explicitly ── */
[data-theme="dark"] .about__stat-card {
  background-color: #1e293b;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

/* ── Contact form panel — same issue, use explicit bg ── */
[data-theme="dark"] .contact-form {
  background-color: #1e293b;
}

/* ── Testimonial card already uses offwhite/surface vars — auto-adapts ── */


/* ============================================================
   18. SMOOTH THEME TRANSITION
   ============================================================ */

/*
 * Added by JS as a short-lived class (~320ms) during the theme toggle.
 * Forces smooth colour transitions on all elements without permanently
 * overriding component-specific transitions.
 */
.is-switching-theme,
.is-switching-theme * {
  transition:
    background-color 300ms ease-in-out,
    color            300ms ease-in-out,
    border-color     300ms ease-in-out,
    box-shadow       300ms ease-in-out !important;
}


/* ============================================================
   19. B2B ORDER SYSTEM
       – Product card order controls (qty stepper + add button)
       – Mini-cart dropdown widget
       – Order confirmation modal
   ============================================================ */

/* ── Size selector ── */
.product-card__sizes {
  margin-bottom: 0.75rem;
  padding: 0.6rem 0 0;
  border-top: 1px solid #ede9e3;
}
.product-card__size-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a958e;
  margin-bottom: 0.5rem;
}
.product-card__size-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.size-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 32px;
  padding: 0 0.65rem;
  border: 1.5px solid #ddd8d2;
  border-radius: 8px;
  background: #fff;
  font-size: 0.73rem;
  font-weight: 600;
  color: #6b6560;
  cursor: pointer;
  transition:
    border-color 130ms ease,
    background   130ms ease,
    color        130ms ease,
    box-shadow   130ms ease;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  line-height: 1;
}
.size-btn:hover {
  border-color: #c1121f;
  color: #c1121f;
  background: #fde8e8;
}
.size-btn.active {
  border-color: #c1121f;
  background: #c1121f;
  color: #fff;
  box-shadow: 0 2px 8px rgba(193,18,31,.3);
}
.size-alert {
  display: block;
  font-size: 0.68rem;
  color: #c1121f;
  margin-top: 0.35rem;
  min-height: 1em;
  font-weight: 500;
}
[data-theme="dark"] .product-card__sizes {
  border-top-color: #2d3a4f;
}
[data-theme="dark"] .size-btn {
  background: #1e293b;
  border-color: #2d3a4f;
  color: #94a3b8;
}
[data-theme="dark"] .size-btn:hover {
  border-color: #c1121f;
  color: #f87171;
  background: rgba(193,18,31,.12);
}
[data-theme="dark"] .size-btn.active {
  background: #c1121f;
  border-color: #c1121f;
  color: #fff;
}
[data-theme="dark"] .size-btn--oos:hover {
  border-color: #2d3a4f;
  color: #475569;
  background: #1e293b;
}

/* ── Qty stepper + Add-to-Order controls on product cards ── */
.product-card__order {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--clr-border);
  margin-top: 0.75rem;
}

.product-card__qty-wrap {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.product-card__qty-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
}

.product-card__qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--clr-border);
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--clr-white);
}

.qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  line-height: 1;
  background: none;
  border: none;
  color: var(--clr-text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 150ms ease, color 150ms ease;
}
.qty-btn:hover {
  background-color: var(--clr-accent-light);
  color: var(--clr-accent);
}

.product-card__qty-input {
  width: 38px;
  height: 32px;
  border: none;
  border-left:  1px solid var(--clr-border);
  border-right: 1px solid var(--clr-border);
  text-align: center;
  font-size: 0.8125rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--clr-text);
  background-color: var(--clr-white);
  padding: 0;
  -moz-appearance: textfield;
  appearance: textfield;
}
.product-card__qty-input::-webkit-inner-spin-button,
.product-card__qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

/* Add to Order button */
.btn--order {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background-color: var(--clr-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 200ms ease, transform 150ms ease, opacity 200ms ease;
}
.btn--order:hover:not(:disabled) {
  background-color: #a00f1a;
  transform: translateY(-1px);
}
.btn--order:disabled {
  opacity: 0.7;
  cursor: default;
}
.btn--order--added {
  background-color: var(--clr-green) !important;
}

/* ── Mini cart widget ── */
.mini-cart {
  position: relative;
}

.mini-cart__toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--clr-border);
  border-radius: 50%;
  color: var(--clr-text);
  cursor: pointer;
  transition: border-color 200ms ease, background-color 200ms ease, color 200ms ease;
}
.mini-cart__toggle svg {
  width: 18px;
  height: 18px;
}
.mini-cart__toggle:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
}

/* Count badge */
.mini-cart__count {
  position: absolute;
  top: -4px;
  right: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background-color: var(--clr-accent);
  border-radius: 999px;
  border: 2px solid var(--clr-white);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 200ms ease, transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.mini-cart__count.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Dropdown panel */
.mini-cart__dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 340px;
  max-height: 520px;
  background-color: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* hidden state */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity     250ms ease,
    transform   250ms ease,
    visibility  0ms   linear 250ms;
  z-index: 1100;
}
.mini-cart__dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity     250ms ease,
    transform   250ms ease,
    visibility  0ms   linear 0ms;
}

.mini-cart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--clr-border);
  flex-shrink: 0;
}

.mini-cart__title {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--clr-text);
}

.mini-cart__clear-btn {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 150ms ease;
}
.mini-cart__clear-btn:hover {
  color: var(--clr-accent);
}

/* Items list */
.mini-cart__items {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
  max-height: 260px;
}

.mini-cart__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--clr-border);
  transition: background-color 150ms ease;
}
.mini-cart__item:last-child {
  border-bottom: none;
}
.mini-cart__item:hover {
  background-color: var(--clr-offwhite);
}

.mini-cart__item-info {
  flex: 1;
  min-width: 0;
}

.mini-cart__item-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--clr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-cart__item-detail {
  font-size: 0.75rem;
  color: var(--clr-text-muted);
  margin-top: 2px;
}

.mini-cart__item-subtotal {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--clr-accent);
  white-space: nowrap;
}

.mini-cart__item-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--clr-text-light);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background-color 150ms ease, color 150ms ease;
}
.mini-cart__item-remove:hover {
  background-color: var(--clr-accent-light);
  color: var(--clr-accent);
}

/* Empty state */
.mini-cart__empty {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--clr-text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Footer (totals + confirm button) */
.mini-cart__footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--clr-border);
  background-color: var(--clr-offwhite);
  flex-shrink: 0;
}

.mini-cart__totals {
  margin-bottom: 0.875rem;
}

.mini-cart__total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--clr-text-muted);
  margin-bottom: 0.375rem;
}
.mini-cart__total-row--grand {
  font-size: 0.9375rem;
  color: var(--clr-text);
  margin-bottom: 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--clr-border);
}

/* Full-width button utility (also used on modal submit) */
.btn--full {
  width: 100%;
}

/* ── Order Confirmation Modal ── */
.order-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  /* hidden state */
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 0ms linear 300ms;
}
.order-modal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 300ms ease, visibility 0ms linear 0ms;
}

.order-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.order-modal__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  background-color: var(--clr-white);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
  transform: translateY(24px) scale(0.97);
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
.order-modal.is-open .order-modal__panel {
  transform: translateY(0) scale(1);
}

.order-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--clr-border);
  position: sticky;
  top: 0;
  background-color: var(--clr-white);
  z-index: 1;
}

.order-modal__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--clr-text);
  margin: 0;
}

.order-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid var(--clr-border);
  border-radius: 50%;
  color: var(--clr-text-muted);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}
.order-modal__close:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  background-color: var(--clr-accent-light);
}

.order-modal__body {
  padding: 1.5rem;
}

.order-modal__section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  margin-bottom: 0.75rem;
}

.order-modal__summary {
  margin-bottom: 1.75rem;
}

.order-modal__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.order-modal__table th {
  text-align: left;
  padding: 0.5rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  border-bottom: 1px solid var(--clr-border);
}
.order-modal__table td {
  padding: 0.625rem 0.625rem;
  color: var(--clr-text);
  border-bottom: 1px solid var(--clr-border);
  vertical-align: middle;
}
.order-modal__table tbody tr:last-child td {
  border-bottom: none;
}
.order-modal__table-total td {
  padding: 0.75rem 0.625rem;
  border-top: 2px solid var(--clr-border);
  border-bottom: none;
}
/* Right-align qty + subtotal columns */
.order-modal__table th:nth-child(2),
.order-modal__table td:nth-child(2) {
  text-align: center;
}
.order-modal__table th:last-child,
.order-modal__table td:last-child {
  text-align: right;
}

.order-modal__form {
  display: flex;
  flex-direction: column;
}

/* Success state */
.order-modal__success {
  padding: 3rem 1.5rem;
  text-align: center;
}

.order-modal__success-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.75rem;
  color: #fff;
  background-color: var(--clr-green);
  border-radius: 50%;
}

.order-modal__success h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 0.625rem;
}

.order-modal__success p {
  font-size: 0.9375rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto 1.5rem;
}

/* ── Responsive: mini-cart dropdown goes full-width on small screens ── */
@media (max-width: 400px) {
  .mini-cart__dropdown {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 80dvh;
    border-radius: 16px 16px 0 0;
    transform: translateY(20px);
  }
  .mini-cart__dropdown.is-open {
    transform: translateY(0);
  }
}

/* ── Dark mode overrides for B2B components ── */
[data-theme="dark"] .product-card__qty-stepper {
  background-color: var(--clr-surface);
}
[data-theme="dark"] .product-card__qty-input {
  background-color: var(--clr-surface);
  color: var(--clr-text);
}
[data-theme="dark"] .mini-cart__dropdown {
  background-color: #1e293b;
  border-color: #2d3a4f;
}
[data-theme="dark"] .mini-cart__footer {
  background-color: #0f172a;
  border-top-color: #2d3a4f;
}
[data-theme="dark"] .mini-cart__item:hover {
  background-color: #131e36;
}
[data-theme="dark"] .mini-cart__title         { color: #e2e8f0; }
[data-theme="dark"] .mini-cart__item-name      { color: #e2e8f0; }
[data-theme="dark"] .mini-cart__item-detail    { color: #94a3b8; }
[data-theme="dark"] .mini-cart__item-subtotal  { color: #e2e8f0; }
[data-theme="dark"] .mini-cart__total-row      { color: #94a3b8; }
[data-theme="dark"] .mini-cart__total-row--grand { color: #e2e8f0; }
[data-theme="dark"] .order-modal__panel {
  background-color: var(--clr-surface);
}
[data-theme="dark"] .order-modal__header {
  background-color: var(--clr-surface);
}

/* ══════════════════════════════════════════════════════════════
   BIDIRECTIONAL LAYOUT OVERRIDES
   RTL (Arabic) is the default. These rules flip layout for
   LTR (French) and reinforce RTL where physical properties
   need explicit direction.
   ══════════════════════════════════════════════════════════════ */

/* ── Navbar ── */
[dir="ltr"] .navbar__actions {
  flex-direction: row-reverse;
}

/* ── Language switcher ── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.lang-btn {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  color: var(--clr-text-muted);
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease;
}
.lang-btn:hover {
  color: var(--clr-text);
  background: var(--clr-border);
}
.lang-btn.active {
  color: var(--clr-accent);
  background: rgba(193, 18, 31, 0.08);
}

/* ── Cart dropdown: RTL opens left-aligned, LTR right-aligned ── */
[dir="rtl"] .mini-cart__dropdown {
  left: 0;
  right: auto;
}
[dir="ltr"] .mini-cart__dropdown {
  right: 0;
  left: auto;
}

/* ── Product card badge: RTL pins to right, LTR keeps left ── */
[dir="rtl"] .product-card__badge {
  left: auto;
  right: 0.75rem;
}

/* ── Product card old-price margin ── */
[dir="rtl"] .product-card__old-price {
  margin-left: 0;
  margin-right: 6px;
}

/* ── Collection search icon (inline SVG, positioned absolutely) ── */
[dir="rtl"] .collection-search svg {
  left: auto;
  right: 0.8rem;
}
[dir="rtl"] .collection-search__input {
  padding-left: 1rem;
  padding-right: 2.4rem;
}

/* ── Collection count label ── */
[dir="rtl"] .collection-count {
  margin-left: 0;
  margin-right: auto;
}
[dir="ltr"] .collection-count {
  margin-right: 0;
  margin-left: auto;
}
