/* ==============================================================================
   style.css - Styles for Moroccan COD Multi-Product Store
   ==============================================================================
   Color Palette:
   - #0F172A : Primary text (headings, big text, paragraphs, dark backgrounds)
   - #F6F6F6 : Alternating background (#ffffff <-> #F6F6F6) and text on dark backgrounds
   - #2A3F71 : Alt text (subheadlines, category tags, labels, subtitles on white/alt)
   - #15803D : CTAs, high-attention items, prices, primary buttons, badges
   ============================================================================== */

:root {
  /* High Attention & CTAs */
  --primary: #15803d;
  --primary-hover: #166534;
  --primary-light: #dcfce7;
  --primary-dark: #14532d;

  /* Alt text, Subheadlines & Secondary elements */
  --secondary: #2a3f71;
  --secondary-hover: #1e2e54;
  --secondary-light: #eef2f9;

  /* Big Text, Paragraphs, Headings & Dark Accents */
  --text-main: #0f172a;
  --text-sub: #2a3f71;
  --text-muted: #536485;
  --text-on-dark: #f6f6f6;

  /* Background Switching (#ffffff <-> #F6F6F6) */
  --bg-page: #f6f6f6;
  --bg-card: #ffffff;
  --bg-alt: #f6f6f6;

  /* Soft Borders */
  --border: #e2e8f0;
  --border-light: #ededed;

  /* Specific Accents */
  --accent-red: #ef4444; /* Urgency badge */
  --accent-amber: #f59e0b; /* Rating stars */
  --whatsapp: #25d366; /* WhatsApp brand */
  --whatsapp-hover: #1eb956;

  /* Radii & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg:
    0 10px 15px -3px rgba(15, 23, 42, 0.08),
    0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl:
    0 20px 25px -5px rgba(15, 23, 42, 0.1),
    0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==============================================================================
   Inter Font Family Declarations
   ============================================================================== */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter/Inter_18pt-Thin.ttf") format("truetype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter/Inter_18pt-Thin.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter/Inter_18pt-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter/Inter_18pt-Regular.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter/Inter_18pt-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter/Inter_18pt-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter/Inter_18pt-Bold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter/Inter_18pt-Bold.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ==============================================================================
   Cairo Font Family (Arabic Headlines)
   ============================================================================== */
@font-face {
  font-family: "Cairo";
  src: url("fonts/Cairo/Cairo-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cairo";
  src: url("fonts/Cairo/Cairo-Bold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cairo";
  src: url("fonts/Cairo/Cairo-Bold.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ==============================================================================
   Almarai Font Family (Arabic Subheadlines, Body, and Small Texts)
   ============================================================================== */
@font-face {
  font-family: "Almarai";
  src: url("fonts/Almarai/Almarai-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Almarai";
  src: url("fonts/Almarai/Almarai-Regular.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Almarai";
  src: url("fonts/Almarai/Almarai-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Almarai";
  src: url("fonts/Almarai/Almarai-Bold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-main);
}

p {
  color: var(--text-main);
}

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

button,
input,
select,
textarea {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==============================================================================
   1. TOP ANNOUNCEMENT BAR (Dark background #0F172A with text #F6F6F6)
   ============================================================================== */
.announcement-bar {
  background-color: #0f172a;
  color: #f6f6f6;
  padding: 9px 16px;
  font-size: 0.86rem;
  font-weight: 500;
  text-align: center;
  position: relative;
  z-index: 1010;
}

.announcement-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.announcement-tag {
  background: rgba(246, 246, 246, 0.18);
  color: #f6f6f6;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ==============================================================================
   2. STICKY HEADER (White background switching with #F6F6F6)
   ============================================================================== */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

/* Logo */
.store-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0f172a;
  flex-shrink: 0;
  transition: opacity var(--transition-fast);
}

.store-logo:hover {
  opacity: 0.9;
}

.logo-img {
  height: 42px;
  width: auto;
  max-width: 48px;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-weight: 800;
  font-size: 1.35rem;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1;
}

.logo-badge {
  background: #15803d;
  color: #f6f6f6;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.25);
}

/* Search Bar (Alt Background #F6F6F6) */
.search-wrapper {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background-color: #f6f6f6;
  font-size: 0.9rem;
  color: #0f172a;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  background-color: #ffffff;
  border-color: #15803d;
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #2a3f71;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #2a3f71;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  display: none;
}

.search-clear-btn:hover {
  color: #0f172a;
}

/* Cart Button & Badge */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-cart-trigger {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #f6f6f6;
  border: 1.5px solid var(--border);
  color: #0f172a;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-cart-trigger:hover {
  background-color: #ffffff;
  border-color: #2a3f71;
  color: #2a3f71;
}

.btn-cart-trigger svg {
  color: #0f172a;
}

.cart-count-badge {
  background-color: #15803d;
  color: #f6f6f6;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cart-count-badge.has-items {
  animation: pulseBadge 0.3s ease-out;
}

@keyframes pulseBadge {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

/* ==============================================================================
   3. TRUST STRIP (Alternating section #F6F6F6 with text #0F172A & #2A3F71)
   ============================================================================== */
.trust-strip {
  background: #f6f6f6;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trust-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: #15803d;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
}

.trust-desc {
  font-size: 0.76rem;
  color: #2a3f71;
  font-weight: 500;
}

/* ==============================================================================
   3.5 HERO SLIDESHOW / PROMOTIONAL CAROUSEL (STATIC 3 SLIDES)
   Desktop: 1920 x 600 px (3.2:1)
   Mobile:  1080 x 1080 px (1:1 square)
   ============================================================================== */
.hero-slider-section {
  padding: 18px 0 6px;
}

.hero-slider {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  background: #0F172A;
  user-select: none;
  outline: none;
}

.hero-slides-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 600;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease-in-out, visibility 0.45s ease-in-out;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  pointer-events: auto;
}

.hero-slide-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.hero-slide-link picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Navigation Arrows */
.hero-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  color: #F6F6F6;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0;
}

.hero-slider:hover .hero-slider-arrow,
.hero-slider:focus-within .hero-slider-arrow {
  opacity: 1;
}

.hero-slider-arrow:hover {
  background: #15803D;
  border-color: #15803D;
  color: #F6F6F6;
  transform: translateY(-50%) scale(1.08);
}

.hero-slider-arrow.prev {
  left: 16px;
}

.hero-slider-arrow.next {
  right: 16px;
}

/* Dots Indicator */
.hero-slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-full);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s ease;
}

.hero-dot.active {
  width: 28px;
  background: #15803D;
}

.hero-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.85);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hero-slider-section {
    padding: 12px 0 4px;
  }
  .hero-slides-wrapper {
    aspect-ratio: 1 / 1; /* 1080 x 1080 square mobile banner */
  }
  .hero-slider-arrow {
    opacity: 0.85; /* Always visible on mobile */
    width: 36px;
    height: 36px;
  }
  .hero-slider-arrow.prev {
    left: 8px;
  }
  .hero-slider-arrow.next {
    right: 8px;
  }
  .hero-slider-dots {
    bottom: 12px;
    padding: 4px 10px;
    gap: 6px;
  }
  .hero-dot {
    width: 8px;
    height: 8px;
  }
  .hero-dot.active {
    width: 22px;
  }
}

/* ==============================================================================
   4. CATEGORY FILTER PILLS
   ============================================================================== */
.category-section {
  padding: 20px 0 10px;
}

.category-pills-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-pills-wrapper::-webkit-scrollbar {
  display: none;
}

.category-pill {
  background: #ffffff;
  border: 1.5px solid var(--border);
  color: #2a3f71;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.category-pill:hover {
  border-color: #2a3f71;
  color: #0f172a;
  background: #f6f6f6;
}

.category-pill.active {
  background: #2a3f71;
  border-color: #2a3f71;
  color: #f6f6f6;
  box-shadow: 0 4px 12px rgba(42, 63, 113, 0.25);
}

.category-pill .pill-count {
  background: rgba(42, 63, 113, 0.1);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

.category-pill.active .pill-count {
  background: rgba(246, 246, 246, 0.25);
  color: #f6f6f6;
}

/* Section Header */
.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 20px;
}

.catalog-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
}

.catalog-count-label {
  font-size: 0.88rem;
  color: #2a3f71;
  font-weight: 600;
}

/* ==============================================================================
   5. PRODUCT GRID & CARDS (#ffffff cards on #F6F6F6 page)
   ============================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 60px;
}

@media (max-width: 1080px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.product-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: #ccc;
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #f6f6f6;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .card-img {
  transform: scale(1.05);
}

.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ef4444;
  color: #f6f6f6;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  letter-spacing: 0.3px;
  z-index: 2;
}

.cod-mini-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: #0f172a;
  color: #f6f6f6;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
}

/* Card Body */
.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: #ffffff;
}

.card-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #2a3f71;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
}

.card-title a {
  color: #0f172a;
}

.card-title a:hover {
  color: #2a3f71;
}

/* Price Box */
.card-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 12px;
}

.price-current {
  font-size: 1.2rem;
  font-weight: 800;
  color: #15803d;
}

.price-old {
  font-size: 0.85rem;
  color: #8896ab;
  text-decoration: line-through;
}

/* Card Actions */
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.btn-primary-order {
  width: 100%;
  background: #15803d;
  color: #f6f6f6;
  border: none;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.2);
  text-decoration: none;
}

.btn-primary-order:hover {
  background: #166534;
  color: #f6f6f6;
}

.btn-add-cart-card {
  width: 100%;
  background: #f6f6f6;
  border: 1.5px solid #2a3f71;
  color: #2a3f71;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-add-cart-card:hover {
  background: #15803d;
  border-color: #15803d;
  color: #f6f6f6;
}

.btn-add-cart-card svg {
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.btn-add-cart-card:hover svg {
  transform: scale(1.1);
}

.btn-add-cart-icon {
  background: #f6f6f6;
  border: 1px solid var(--border);
  color: #2a3f71;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.btn-add-cart-icon:hover {
  background: #15803d;
  border-color: #15803d;
  color: #f6f6f6;
}

/* ==============================================================================
   6. SKELETON CARDS
   ============================================================================== */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-shimmer {
  background: linear-gradient(90deg, #f6f6f6 25%, #e5e7eb 50%, #f6f6f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.skeleton-media {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.skeleton-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-tag {
  width: 60px;
  height: 12px;
  border-radius: 4px;
}

.skeleton-title {
  width: 90%;
  height: 16px;
  border-radius: 4px;
}

.skeleton-title-short {
  width: 65%;
  height: 16px;
  border-radius: 4px;
}

.skeleton-price {
  width: 80px;
  height: 22px;
  border-radius: 4px;
  margin-top: 8px;
}

.skeleton-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.skeleton-btn {
  flex: 1;
  height: 38px;
  border-radius: var(--radius-md);
}

.skeleton-btn-square {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
}

/* ==============================================================================
   7. SLIDE-OUT CART DRAWER & COD FORM
   ============================================================================== */
.cod-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.cod-drawer-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.cod-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  box-shadow: -6px 0 28px rgba(15, 23, 42, 0.2);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  color: #0f172a;
}

.cod-drawer.is-open {
  transform: translateX(0);
}

.cod-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.cod-drawer-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
}

.cod-drawer-item-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2a3f71;
}

.cod-drawer-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  color: #2a3f71;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.cod-drawer-close:hover {
  background: #f6f6f6;
  color: #0f172a;
}

/* Shipping Meter */
.cod-shipping-meter {
  background: #f6f6f6;
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  font-size: 0.84rem;
  color: #0f172a;
}

.cod-shipping-meter.is-free {
  background: #dcfce7;
  color: #14532d;
}

.cod-shipping-meter-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 6px;
}

.cod-shipping-meter-fill {
  height: 100%;
  background: #15803d;
  transition: width 0.35s ease;
}

/* Drawer Body */
.cod-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  -webkit-overflow-scrolling: touch;
}

.cod-drawer-section-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #2a3f71;
  margin-bottom: 12px;
}

.cod-cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cod-cart-item-img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: #f6f6f6;
  flex-shrink: 0;
}

.cod-cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cod-cart-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0 0 2px;
  line-height: 1.3;
  color: #0f172a;
}

.cod-cart-item-variant {
  display: inline-block;
  font-size: 0.75rem;
  color: #2a3f71;
  background: #f6f6f6;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-bottom: 4px;
  font-weight: 600;
}

.cod-cart-item-price {
  font-weight: 800;
  color: #15803d;
  font-size: 0.95rem;
}

.cod-cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.cod-qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.cod-qty-btn {
  background: none;
  border: none;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
}

.cod-qty-btn:hover {
  background: #f6f6f6;
}

.cod-qty-val {
  width: 28px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.cod-cart-item-del {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  font-weight: 600;
}

.cod-empty-cart {
  text-align: center;
  padding: 48px 16px;
}

.cod-empty-cart svg {
  width: 60px;
  height: 60px;
  stroke: #2a3f71;
  margin-bottom: 12px;
}

.cod-btn-continue {
  display: inline-block;
  background: #15803d;
  color: #f6f6f6;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  margin-top: 10px;
}

/* Direct COD Form inside Drawer */
.cod-checkout-wrapper {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px dashed #15803d;
}

.cod-checkout-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #2a3f71;
  margin-bottom: 14px;
}

.cod-checkout-header svg {
  color: #15803d;
}

.cod-form-group {
  margin-bottom: 16px;
}

.cod-form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.cod-field-hint {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

.cod-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.cod-input-wrapper.is-textarea {
  align-items: flex-start;
}

.cod-field-icon {
  position: absolute;
  inset-inline-start: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  pointer-events: none;
  z-index: 2;
  transition: color 0.2s ease;
}

.cod-field-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
}

.cod-input-wrapper.is-textarea .cod-field-icon {
  top: 16px;
}

.cod-input-wrapper:focus-within .cod-field-icon {
  color: #15803d;
}

.cod-form-input,
.cod-form-select,
.cod-form-textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  padding-inline-start: 48px;
  padding-inline-end: 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.98rem;
  color: #0f172a;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.cod-form-input::placeholder,
.cod-form-textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
  font-size: 0.95rem;
}

.cod-form-input:focus,
.cod-form-select:focus,
.cod-form-textarea:focus {
  background-color: #ffffff;
  border-color: #15803d;
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15);
}

.cod-form-textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.5;
}

.cod-form-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 42px;
}

/* Other City Address Hint Callout (Displays when "Autre ville..." is selected) */
.other-city-address-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin: 4px 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #166534;
  animation: hintSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[dir="rtl"] .other-city-address-hint {
  text-align: right;
  border-right: 4px solid #15803d;
}

[dir="ltr"] .other-city-address-hint {
  text-align: left;
  border-left: 4px solid #15803d;
}

.other-city-address-hint .hint-icon {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

.other-city-address-hint .hint-text {
  line-height: 1.45;
  color: #14532d;
}

@keyframes hintSlideIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cod-form-textarea.highlight-pulse {
  border-color: #15803d !important;
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.25) !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.cod-input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.cod-phone-prefix {
  position: absolute;
  left: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2a3f71;
  pointer-events: none;
}

.cod-input-padded {
  padding-left: 80px !important;
}

.cod-form-input.is-valid {
  border-color: #15803d;
}

.cod-form-input.is-invalid {
  border-color: #ef4444;
}

.cod-drawer-totals-box {
  background: #f6f6f6;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 14px 0;
}

.cod-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #2a3f71;
  margin-bottom: 4px;
  font-weight: 500;
}

.cod-summary-row.total {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.cod-total-price {
  color: #15803d;
  font-weight: 800;
}

.cod-badge-free {
  background: #dcfce7;
  color: #14532d;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.cod-form-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.cod-btn-checkout {
  width: 100%;
  background: #15803d;
  color: #f6f6f6;
  border: none;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.3);
  transition:
    transform 0.15s ease,
    background 0.2s ease;
}

.cod-btn-checkout:hover {
  background: #166534;
}

.btn-subtext {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.95;
  margin-top: 2px;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  margin-bottom: 4px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==============================================================================
   8. FLOATING WHATSAPP BUTTON (CIRCULAR ICON ONLY - BOTTOM-RIGHT)
   ============================================================================== */
.whatsapp-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: auto;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--whatsapp);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  padding: 0;
  transition:
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.whatsapp-floating-btn:hover {
  background-color: var(--whatsapp-hover);
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.55);
  color: #ffffff;
}

.whatsapp-floating-btn .whatsapp-text {
  display: none !important;
}

.whatsapp-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.whatsapp-icon-wrap svg {
  width: 28px;
  height: 28px;
}

/* ==============================================================================
   9. EMPTY SEARCH & FOOTER
   ============================================================================== */
.no-results-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--border);
  color: #2a3f71;
}

.no-results-box h3 {
  color: #0f172a;
}

.store-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 22px 0;
  margin-top: 40px;
  font-size: 0.88rem;
  color: #2A3F71;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copyright {
  margin: 0;
  color: #2A3F71;
  font-weight: 500;
}

.footer-links {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-links a {
  color: #2A3F71;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: #15803D;
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

/* ==============================================================================
   PRIVACY POLICY PAGE
   ============================================================================== */
.privacy-wrapper {
  max-width: 760px;
  margin: 40px auto 70px;
  padding: 0 16px;
}

.privacy-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 44px 38px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #15803d;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.privacy-header-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.25;
}

.privacy-lead {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2a3f71;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1.5px dashed var(--border);
  line-height: 1.4;
}

.privacy-section {
  margin-bottom: 24px;
}

.privacy-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.privacy-section-text {
  font-size: 0.96rem;
  color: #0f172a;
  line-height: 1.65;
}

.privacy-callout-box {
  background: #f6f6f6;
  border-left: 4px solid #15803d;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 30px 0 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2a3f71;
  display: flex;
  align-items: center;
  gap: 12px;
}

.privacy-updated-date {
  font-size: 0.85rem;
  color: #536485;
  margin-top: 16px;
  font-style: italic;
}

.privacy-cta-wrapper {
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.btn-privacy-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #15803d;
  color: #f6f6f6;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.25);
  transition: var(--transition);
  cursor: pointer;
}

.btn-privacy-cta:hover {
  background: #166534;
  color: #f6f6f6;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .privacy-card {
    padding: 28px 20px;
  }
  .privacy-header-title {
    font-size: 1.5rem;
  }
  .privacy-lead {
    font-size: 1rem;
  }
  .btn-privacy-cta {
    width: 100%;
  }
}

/* ==============================================================================
   404 ERROR PAGE STYLES
   ============================================================================== */
.error-404-wrapper {
  max-width: 620px;
  margin: 50px auto 80px;
  padding: 0 16px;
  text-align: center;
}

.error-404-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 52px 32px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.error-404-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.error-404-number {
  font-size: 6.5rem;
  font-weight: 900;
  line-height: 1;
  color: #0F172A;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.error-404-number span.highlight {
  color: #15803D;
}

.error-404-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 12px;
  line-height: 1.3;
}

.error-404-desc {
  font-size: 1rem;
  color: #2A3F71;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.error-404-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.btn-404-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #15803D;
  color: #F6F6F6;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 34px;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.25);
  transition: var(--transition);
  min-width: 260px;
}

.btn-404-home:hover {
  background: #166534;
  color: #F6F6F6;
  transform: translateY(-1px);
}

.btn-404-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2A3F71;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  transition: color var(--transition-fast);
}

.btn-404-secondary:hover {
  color: #15803D;
}

@media (max-width: 640px) {
  .error-404-card {
    padding: 36px 20px;
  }
  .error-404-number {
    font-size: 4.5rem;
  }
  .error-404-title {
    font-size: 1.35rem;
  }
  .btn-404-home {
    width: 100%;
    min-width: auto;
  }
}

/* ==============================================================================
   10. PRODUCT DETAIL PAGE & MOROCCAN FUNNEL STANDARD
   ============================================================================== */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  margin: 30px auto 60px;
  align-items: start;
}

@media (max-width: 960px) {
  .product-detail-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 16px;
  }
}

/* Gallery & Thumbnails Container */
.product-gallery-sticky {
  position: sticky;
  top: 86px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 960px) {
  .product-gallery-sticky {
    position: static;
  }
}

.product-gallery-layout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

/* Vertical Thumbnails Column (Left) */
.gallery-thumbnails-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 76px;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.gallery-thumbnails-col::-webkit-scrollbar {
  width: 4px;
}
.gallery-thumbnails-col::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.gallery-thumb-btn {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: #f6f6f6;
  padding: 2px;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  position: relative;
}

.gallery-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.gallery-thumb-btn:hover {
  border-color: #2a3f71;
  transform: translateY(-1px);
}

.gallery-thumb-btn.is-active {
  border-color: #15803d; /* Attention highlight */
  box-shadow: 0 0 0 2px rgba(21, 128, 61, 0.35);
}

/* Main Large Image (Right) */
.product-main-media {
  flex: 1;
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: #f6f6f6;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.product-main-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.gallery-counter-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #0f172a;
  color: #f6f6f6;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  z-index: 3;
  letter-spacing: 0.5px;
  direction: ltr;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
  font-size: 1.25rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  transition: all 0.2s ease;
  opacity: 0;
}

.product-main-media:hover .gallery-nav-btn {
  opacity: 1;
}

.gallery-nav-btn:hover {
  background: #ffffff;
  color: #15803d;
  transform: translateY(-50%) scale(1.08);
}

.gallery-nav-btn.prev {
  left: 10px;
}
.gallery-nav-btn.next {
  right: 10px;
}

/* Product Info Column */
.product-info-column {
  display: flex;
  flex-direction: column;
}

.product-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #2a3f71;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f6f6f6;
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  width: fit-content;
  margin-bottom: 10px;
}

.product-main-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 10px;
  scroll-margin-top: 70px;
}

.rating-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.stars-gold {
  color: #f59e0b;
  font-size: 1rem;
  letter-spacing: 2px;
}

.rating-badge-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: #2a3f71;
}

.verified-buyers-tag {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Pricing Row */
.product-price-box {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.product-price-current {
  font-size: 1.85rem;
  font-weight: 800;
  color: #15803d;
}

.product-price-old {
  font-size: 1.15rem;
  color: #8896ab;
  text-decoration: line-through;
}

.product-savings-pill {
  background: #dcfce7;
  color: #15803d;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* Scarcity Indicator */
.scarcity-box {
  background: #f6f6f6;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 20px;
}

.scarcity-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.scarcity-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #15803d;
  border-radius: 50%;
  animation: pulseBadge 1.2s infinite;
}

.scarcity-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 6px;
}

.scarcity-fill {
  height: 100%;
  background: #15803d;
  width: 25%;
  border-radius: var(--radius-full);
}

.product-description-text {
  font-size: 0.96rem;
  line-height: 1.75;
  color: #0f172a;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  white-space: pre-line; /* Preserves line breaks & bullet lists from Google Sheets */
  word-break: break-word;
}

/* Variants */
.variants-wrapper {
  margin-bottom: 24px;
}

.variants-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #2a3f71;
  margin-bottom: 10px;
}

.variants-label span.required {
  color: #ef4444;
}

.variants-pills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.variant-pill-btn {
  background: #ffffff;
  border: 2px solid var(--border);
  color: #2a3f71;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.variant-pill-btn:hover {
  border-color: #2a3f71;
  background: #f6f6f6;
  color: #0f172a;
}

.variant-pill-btn.is-selected {
  border-color: #2a3f71;
  background: #2a3f71;
  color: #f6f6f6;
  box-shadow: 0 2px 8px rgba(42, 63, 113, 0.25);
}

.variant-pill-btn .check-icon {
  display: none;
}

.variant-pill-btn.is-selected .check-icon {
  display: inline;
}

/* Embedded Funnel Box (Dashed Green Attention Border) */
.cod-funnel-box {
  background: #ffffff;
  border: 2.5px dashed #15803d;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 8px 30px rgba(21, 128, 61, 0.08);
  margin-bottom: 28px;
  position: relative;
}

.cod-funnel-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.cod-funnel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cod-funnel-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.cod-funnel-subtitle {
  font-size: 0.88rem;
  color: #2a3f71;
  font-weight: 500;
}

/* Bundle Cards */
.bundle-selector-group {
  margin-bottom: 20px;
}

.bundle-group-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #2a3f71;
  margin-bottom: 10px;
}

.bundle-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bundle-radio-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f6f6f6;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition);
}

.bundle-radio-card:hover {
  border-color: #2a3f71;
  background: #ffffff;
}

.bundle-radio-card.is-active {
  border-color: #15803d;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.15);
}

.bundle-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bundle-radio-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #2a3f71;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.bundle-radio-card.is-active .bundle-radio-circle {
  border-color: #15803d;
}

.bundle-radio-card.is-active .bundle-radio-circle::after {
  content: "";
  width: 10px;
  height: 10px;
  background: #15803d;
  border-radius: 50%;
}

.bundle-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bundle-badge-hot {
  background: #15803d;
  color: #f6f6f6;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.bundle-price-tag {
  font-weight: 800;
  font-size: 1.15rem;
  color: #15803d;
  text-align: right;
  flex-shrink: 0;
}

.bundle-savings-note {
  font-size: 0.72rem;
  font-weight: 700;
  color: #15803d;
  display: block;
}

/* Funnel Summary Box */
.funnel-order-summary {
  background: #f6f6f6;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 18px 0;
}

.funnel-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #2a3f71;
  margin-bottom: 6px;
  font-weight: 500;
}

.funnel-summary-row.total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1.5px dashed var(--border);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.funnel-total-num {
  color: #15803d;
  font-weight: 800;
}

/* Primary CTA Button (High Attention) */
@keyframes ctaGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.45);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(21, 128, 61, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(21, 128, 61, 0);
  }
}

.btn-funnel-submit {
  width: 100%;
  background: #15803d;
  color: #f6f6f6;
  border: none;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-shadow: 0 6px 20px rgba(21, 128, 61, 0.35);
  animation: ctaGlow 2s infinite;
  transition:
    transform 0.15s ease,
    background 0.2s ease;
  text-decoration: none;
}

.btn-funnel-submit:hover {
  background: #166534;
  transform: translateY(-2px);
}

.btn-funnel-submit:active {
  transform: scale(0.99);
}

.btn-funnel-subtext {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.95;
}

.btn-funnel-add-cart {
  width: 100%;
  background: #f6f6f6;
  color: #2a3f71;
  border: 1.5px solid var(--border);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  transition: var(--transition);
}

.btn-funnel-add-cart:hover {
  background: #ffffff;
  border-color: #2a3f71;
  color: #0f172a;
}

.funnel-trust-badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.funnel-badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #2a3f71;
}

.funnel-badge-item svg {
  color: #15803d;
  flex-shrink: 0;
}

/* ==============================================================================
   11. STICKY MOBILE BOTTOM BAR
   ============================================================================== */
.sticky-mobile-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 990;
  background: #ffffff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.12);
  padding: 10px 16px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 768px) {
  .sticky-mobile-bar.is-visible {
    display: flex;
    transform: translateY(0);
  }
  body.page-product .logo-text,
  .product-header-logo-text {
    display: none !important;
  }
}

.sticky-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sticky-bar-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #f6f6f6;
  flex-shrink: 0;
}

.sticky-bar-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.sticky-bar-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: #15803d;
}

.sticky-bar-btn {
  background: #15803d;
  color: #f6f6f6;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.3);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.sticky-bar-btn:hover {
  background: #166534;
}

.sticky-bar-btn:active {
  transform: scale(0.98);
}

/* Mobile Adjustments */
@media (max-width: 640px) {
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .header-inner {
    height: 60px;
  }
  .store-logo {
    font-size: 1.1rem;
    gap: 6px;
  }
  .logo-img {
    height: 34px;
    max-width: 38px;
  }
  .logo-text {
    font-size: 1.1rem;
  }
  body.page-product .logo-text,
  .product-header-logo-text {
    display: none !important;
  }
  .search-wrapper {
    max-width: 180px;
  }
  .search-input {
    height: 38px;
    font-size: 0.82rem;
    padding-left: 34px;
    padding-right: 28px;
  }
  .search-icon {
    left: 10px;
  }
  .btn-cart-trigger span.cart-label {
    display: none;
  }
  .whatsapp-floating-btn span.whatsapp-text {
    display: none;
  }
  .whatsapp-floating-btn {
    padding: 12px;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    justify-content: center;
    bottom: 20px;
    right: 20px;
    left: auto;
  }
  body:has(.sticky-mobile-bar.is-visible) .whatsapp-floating-btn,
  body.has-sticky-bar .whatsapp-floating-btn {
    bottom: 84px;
  }
  .card-actions {
    gap: 5px;
    margin-top: 8px;
  }
  .btn-primary-order {
    padding: 7px 6px;
    font-size: 0.78rem;
    gap: 4px;
  }
  .btn-add-cart-card {
    padding: 6px 6px;
    font-size: 0.74rem;
    gap: 4px;
  }
}

/* ==============================================================================
   12. CUSTOM CANVA LANDING PAGE STACK (SEAMLESS ZERO-GAP VISUAL FUNNEL)
   ============================================================================== */
.canva-landing-section {
  max-width: 900px;
  margin: 10px auto 50px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
  .canva-landing-section {
    width: calc(100% + 32px) !important;
    max-width: calc(100% + 32px) !important;
    margin-left: -16px !important;
    margin-right: -16px !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
  }

  .canva-landing-header {
    border-radius: 0 !important;
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .canva-slide-img {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
  }

  .canva-inline-cta-wrap {
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
  }
}

.canva-landing-header {
  background: #0F172A;
  color: #F6F6F6;
  text-align: center;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.canva-images-stack {
  display: flex;
  flex-direction: column;
  gap: 0; /* Zero gap so Canva slices connect seamlessly! */
  line-height: 0;
}

.canva-slide-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.canva-inline-cta-wrap {
  padding: 20px 16px;
  background: #F6F6F6;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}

.btn-canva-scroll-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 460px;
  background: #15803D;
  color: #F6F6F6;
  font-size: 1.08rem;
  font-weight: 800;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(21, 128, 61, 0.35);
  animation: ctaGlow 2s infinite;
  transition: transform 0.15s ease, background 0.2s ease;
  font-family: inherit;
}

.btn-canva-scroll-cta:hover {
  background: #166534;
  transform: translateY(-2px);
}

/* Pure Ad Funnel Mode (?id=xxx&mode=lp) */
body.is-lp-mode {
  padding-top: 48px;
}

@media (max-width: 640px) {
  body.is-lp-mode {
    padding-top: 56px;
  }
}

/* 1. Hide the entire navbar with the logo */
body.is-lp-mode .sticky-header {
  display: none !important;
}

/* 2. Keep only the top announcement bar above the header and make it fixed */
body.is-lp-mode .announcement-bar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.2);
}

body.is-lp-mode .btn-funnel-add-cart {
  display: none !important;
}

body.is-lp-mode .product-detail-layout {
  display: flex;
  flex-direction: column;
  max-width: 900px;
  margin: 16px auto 50px;
}

body.is-lp-mode .product-gallery-sticky {
  position: static !important;
  top: auto !important;
  width: 100%;
  margin-bottom: 24px;
  order: 1;
  z-index: 1;
}

body.is-lp-mode .product-info-column {
  width: 100%;
  order: 2;
}

body.is-lp-mode {
  padding-bottom: 70px;
}

/* Sticky Action Bar for &mode=lp (Mobile & Desktop) */
@media (min-width: 769px) {
  body.is-lp-mode .sticky-mobile-bar {
    display: flex;
    left: 50%;
    right: auto;
    width: 100%;
    max-width: 900px;
    transform: translateX(-50%) translateY(100%);
    border-radius: 12px 12px 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.12);
    padding: 10px 20px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  body.is-lp-mode .sticky-mobile-bar.is-visible {
    transform: translateX(-50%) translateY(0);
  }

  body.is-lp-mode .sticky-bar-title {
    max-width: 380px;
    font-size: 0.95rem;
  }

  body.is-lp-mode .sticky-bar-price {
    font-size: 1.05rem;
  }

  body.is-lp-mode .sticky-bar-btn {
    padding: 10px 24px;
    font-size: 0.95rem;
  }

  body.is-lp-mode .sticky-bar-img {
    width: 48px;
    height: 48px;
  }
}

/* ==============================================================================
   Scroll-Down Side Guides for &mode=lp (Desktop Only)
   Placed in the empty left/right margins next to the gallery on desktop fold.
   Bouncing down arrow with text; fades out after 220px scroll.
   ============================================================================== */
.lp-scroll-guide {
  display: none !important;
}

@media (min-width: 1260px) {
  body.is-lp-mode .lp-scroll-guide {
    display: flex !important;
    position: fixed;
    top: 45%;
    transform: translateY(-50%);
    z-index: 900;
    cursor: pointer;
    text-decoration: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  body.is-lp-mode .lp-scroll-guide.lp-scroll-guide-left {
    right: calc(50% + 470px);
    left: auto;
  }

  body.is-lp-mode .lp-scroll-guide.lp-scroll-guide-right {
    left: calc(50% + 470px);
    right: auto;
  }

  body.is-lp-mode .lp-scroll-guide.is-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(calc(-50% - 24px)) scale(0.92) !important;
  }

  .lp-scroll-guide-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 14px 12px 12px;
    width: 136px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    transition: all 0.25s ease;
    user-select: none;
  }

  .lp-scroll-guide:hover .lp-scroll-guide-inner {
    transform: translateY(-4px);
    border-color: #10b981;
    background: #ffffff;
    box-shadow: 0 14px 28px -4px rgba(16, 185, 129, 0.2), 0 6px 10px -2px rgba(15, 23, 42, 0.06);
  }

  .lp-scroll-guide-icon {
    font-size: 1.35rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
  }

  .lp-scroll-guide-text {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    text-align: center;
    font-family: inherit;
  }

  [dir="rtl"] .lp-scroll-guide-text {
    font-family: "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-weight: 700 !important;
    text-align: center !important;
  }

  .lp-scroll-guide-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #059669;
    border: 1.5px solid rgba(16, 185, 129, 0.3);
    animation: lpArrowBounce 1.4s infinite ease-in-out;
  }

  @keyframes lpArrowBounce {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(6px);
    }
  }
}

/* ==============================================================================
   Language Switcher Button
   ============================================================================== */
.btn-lang-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background-color: #ffffff;
  border: 1.5px solid var(--border);
  color: #0f172a;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  text-decoration: none;
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  white-space: nowrap;
}

.btn-lang-switcher:hover {
  background-color: #f6f6f6;
  border-color: #2a3f71;
  color: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
}

.btn-lang-switcher:active {
  transform: translateY(0);
}

.btn-lang-switcher .lang-flag {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-block;
}

.btn-lang-switcher .lang-label {
  font-weight: 700;
  letter-spacing: 0.2px;
}

@media (max-width: 640px) {
  .btn-lang-switcher {
    padding: 6px 10px;
    font-size: 0.8rem;
    gap: 5px;
  }
}

/* ==============================================================================
   Navigation Back Link (Header & Return Links)
   In Arabic (RTL), flex-direction: row-reverse places the arrow on the left of text
   ============================================================================== */
.nav-back-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: #2a3f71;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-back-link:hover {
  color: #15803d;
}

.nav-back-link svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.nav-back-link:hover svg {
  transform: translateX(-3px);
}

[dir="rtl"] .nav-back-link,
body.rtl .nav-back-link {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-back-link:hover svg,
body.rtl .nav-back-link:hover svg {
  transform: translateX(-3px);
}

[dir="rtl"] .btn-privacy-cta,
body.rtl .btn-privacy-cta {
  flex-direction: row-reverse;
}

/* ==============================================================================
   Fullscreen Language Transition Loading Overlay
   ============================================================================== */
.i18n-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.i18n-loading-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.i18n-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}

.i18n-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e2e8f0;
  border-top-color: #15803d;
  border-radius: 50%;
  animation: i18nSpin 0.8s linear infinite;
}

@keyframes i18nSpin {
  to {
    transform: rotate(360deg);
  }
}

.i18n-loader-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.3px;
  font-family: inherit;
}

/* ==============================================================================
   Arabic Typography: Cairo (Headlines) & Almarai (Subheadlines, Body, Small Texts)
   ============================================================================== */
[dir="rtl"],
html[lang="ar"],
html[lang="ar"] body {
  text-align: right;
  font-family: "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

/* 1. Cairo Font for all Arabic Headlines & High-Emphasis Titles */
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
[dir="rtl"] .catalog-title,
[dir="rtl"] .product-main-title,
[dir="rtl"] .cod-funnel-title,
[dir="rtl"] .thankyou-title,
[dir="rtl"] .privacy-header-title,
[dir="rtl"] .error-404-title,
[dir="rtl"] .hero-slide-heading,
[dir="rtl"] .canva-landing-header,
[dir="rtl"] .card-title,
[dir="rtl"] .card-title a,
[dir="rtl"] .bundle-group-label,
[dir="rtl"] .privacy-section-title,
[dir="rtl"] .details-card-title,
[dir="rtl"] .order-details-title,
[dir="rtl"] .error-404-number {
  font-family: "Cairo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.35;
}

/* 2. Almarai Font for Subheadlines, Descriptions, Cards, Form Elements & Small Texts */
[dir="rtl"] p,
[dir="rtl"] span,
[dir="rtl"] a,
[dir="rtl"] button,
[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] textarea,
[dir="rtl"] label,
[dir="rtl"] .cod-funnel-subtitle,
[dir="rtl"] .product-description-text,
[dir="rtl"] .privacy-lead,
[dir="rtl"] .privacy-section-text,
[dir="rtl"] .thankyou-arabic,
[dir="rtl"] .error-404-desc,
[dir="rtl"] .bundle-title,
[dir="rtl"] .bundle-savings-note,
[dir="rtl"] .bundle-card-left,
[dir="rtl"] .card-category,
[dir="rtl"] .category-pill,
[dir="rtl"] .trust-item-title,
[dir="rtl"] .trust-item-desc,
[dir="rtl"] .footer-copyright,
[dir="rtl"] .footer-links,
[dir="rtl"] .detail-row,
[dir="rtl"] .detail-label,
[dir="rtl"] .detail-val,
[dir="rtl"] .i18n-loader-text,
[dir="rtl"] .scarcity-header,
[dir="rtl"] .phone-notice-text,
[dir="rtl"] .wa-confirm-tip,
[dir="rtl"] .btn-funnel-submit,
[dir="rtl"] .btn-funnel-add-cart,
[dir="rtl"] .btn-canva-scroll-cta,
[dir="rtl"] .btn-lp-floating,
[dir="rtl"] .btn-lang-switcher,
[dir="rtl"] .cart-label,
[dir="rtl"] .announcement-content,
[dir="rtl"] .price-current,
[dir="rtl"] .price-old,
[dir="rtl"] .product-price-current,
[dir="rtl"] .funnel-order-summary {
  font-family: "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0;
}

/* Subheadlines emphasis */
[dir="rtl"] .cod-funnel-subtitle,
[dir="rtl"] .privacy-lead,
[dir="rtl"] .thankyou-arabic,
[dir="rtl"] .trust-item-title,
[dir="rtl"] .bundle-title {
  font-weight: 700;
}

/* RTL Header & Search */
[dir="rtl"] .search-icon {
  left: auto;
  right: 14px;
}

[dir="rtl"] .search-clear-btn {
  right: auto;
  left: 12px;
}

[dir="rtl"] .search-input {
  padding: 0 42px 0 40px;
  text-align: right;
}

/* RTL Field Icons & Padding */
[dir="rtl"] .cod-field-icon {
  right: 16px;
  left: auto;
}

[dir="rtl"] .cod-form-input,
[dir="rtl"] .cod-form-select,
[dir="rtl"] .cod-form-textarea {
  padding-right: 48px;
  padding-left: 16px;
  text-align: right;
}

[dir="rtl"] .cod-form-select {
  background-position: left 16px center;
  padding-left: 42px;
}

[dir="ltr"] .cod-field-icon {
  left: 16px;
  right: auto;
}

[dir="ltr"] .cod-form-input,
[dir="ltr"] .cod-form-select,
[dir="ltr"] .cod-form-textarea {
  padding-left: 48px;
  padding-right: 16px;
  text-align: left;
}

[dir="ltr"] .cod-form-select {
  background-position: right 16px center;
  padding-right: 42px;
}

/* RTL Phone Input Legacy */
[dir="rtl"] .cod-phone-prefix {
  left: auto;
  right: 12px;
  direction: ltr;
}

[dir="rtl"] .cod-input-padded {
  padding-left: 14px !important;
  padding-right: 86px !important;
  direction: ltr;
  text-align: right;
}

/* RTL Cart Drawer */
[dir="rtl"] .cod-drawer {
  right: auto;
  left: 0;
  transform: translateX(-100%);
  box-shadow: 6px 0 28px rgba(15, 23, 42, 0.2);
}

[dir="rtl"] .cod-drawer.is-open {
  transform: translateX(0);
}

[dir="rtl"] .cod-drawer-close {
  margin-right: auto;
  margin-left: 0;
}

[dir="rtl"] .cart-count-badge {
  right: auto;
  left: -6px;
}

/* RTL Mini Badges & Badges */
[dir="rtl"] .discount-badge {
  left: 12px !important;
  right: auto !important;
}

[dir="rtl"] .gallery-counter-badge {
  left: auto !important;
  right: 14px !important;
  direction: ltr !important;
}

[dir="rtl"] .cod-mini-badge {
  right: auto;
  left: 12px;
}

/* RTL Arrows in Slider */
[dir="rtl"] .hero-slider-arrow.prev {
  left: auto;
  right: 16px;
  transform: translateY(-50%) rotate(180deg);
}

[dir="rtl"] .hero-slider-arrow.next {
  right: auto;
  left: 16px;
  transform: translateY(-50%) rotate(180deg);
}

/* RTL Gallery navigation */
[dir="rtl"] .gallery-nav-btn.prev {
  left: auto;
  right: 12px;
}

[dir="rtl"] .gallery-nav-btn.next {
  right: auto;
  left: 12px;
}

/* RTL Product Detail Back & Actions */
[dir="rtl"] .btn-primary-order svg {
  transform: rotate(180deg);
}

[dir="rtl"] .sticky-bar-info {
  text-align: right;
}

[dir="rtl"] .phone-notice-box {
  text-align: right;
}

[dir="rtl"] .order-details-box {
  text-align: right;
}

[dir="rtl"] .privacy-card {
  text-align: right;
}

[dir="rtl"] .privacy-section-title {
  justify-content: flex-start;
}

[dir="rtl"] .error-404-card {
  text-align: center;
}

