/* ================================================
   MAMA'S THREAD — MAIN STYLESHEET
   Design System: Variables, Reset, Typography,
   Global Components (Nav, Footer, WhatsApp, etc.)
   ================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Pinyon+Script&family=Lato:wght@300;400;700&family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* ── Sage Green Palette (brand palette) ── */
  --sage-hint:    #BFCFBB;   /* lightest — tinted white backgrounds */
  --sage-light:   #BFCFBB;   /* alias: borders, subtle fills */
  --sage:         #8EA58C;   /* mid sage — icons, tags, outlines */
  --moss:         #738A6E;   /* moss — secondary elements, hover */
  --evergreen:    #344C3D;   /* deepest — primary buttons, headings */
  --sage-lighter: #DDE8DB;   /* between hint and white */
  --sage-dark:    #344C3D;   /* alias for evergreen */

  /* ── Gray Scale (neutral companion) ── */
  --gray-50:  #F7F8F6;   /* site background — warm gray-green tint */
  --gray-100: #EEF0ED;   /* section alternates, card backgrounds */
  --gray-200: #DCE0DA;   /* dividers, borders */
  --gray-400: #8A9688;   /* muted icons, placeholder text */
  --gray-600: #4A5752;   /* secondary body text */
  --gray-900: #1A2420;   /* headings — near-black with green depth */

  /* ── Mapped aliases (backward-compatible) ── */
  --charcoal:       #1A2420;
  --charcoal-light: #3D4E49;
  --cream:          #F7F8F6;   /* matches gray-50 */
  --cream-dark:     #EEF0ED;

  /* Legacy palette aliases — mapped to sage system, no more warm yellows */
  --champagne:      var(--sage-lighter);
  --champagne-light:#EEF0ED;
  --linen:          var(--sage-lighter);
  --linen-light:    var(--gray-100);
  --camel:          var(--moss);
  --camel-light:    var(--sage-light);
  --mint:           var(--sage-light);
  --mint-light:     var(--sage-lighter);
  --blush-brand:    var(--sage-lighter);
  --peach:          var(--moss);
  --peach-light:    var(--sage-light);
  --blush:          var(--sage-lighter);
  --blush-light:    var(--gray-100);

  --white: #FFFFFF;

  /* ── Text ── */
  --text-primary:   #1A2420;   /* deep charcoal-green */
  --text-secondary: #4A5752;   /* gray-600 */
  --text-light:     #738A6E;   /* moss tone */

  /* Functional */
  --whatsapp-green: #25D366;
  --star-gold:      #C9A84C;   /* warm gold, pairs with greens */
  --error:          #C0392B;
  --success:        #2D6A4F;   /* evergreen success */

  /* Typography */
  --font-logo: 'Pinyon Script', cursive;
  --font-display: 'Lato', sans-serif;
  --font-arabic: 'Noto Naskh Arabic', serif;
  --font-body: 'Lato', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 50px;
  --radius-circle: 50%;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 25px rgba(0,0,0,0.06);
  --shadow-lg: 0 15px 40px rgba(0,0,0,0.08);
  --shadow-hover: 0 20px 50px rgba(0,0,0,0.1);

  /* Transitions */
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.2s ease;
  --transition-slow: 0.6s ease;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 70px;
  --bar-height: 36px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--cream);
  line-height: 1.7;
  overflow-x: hidden;
  padding-top: calc(var(--bar-height) + var(--nav-height));
}

[dir="rtl"] body,
[lang="ar"] body {
  font-family: var(--font-arabic);
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--text-primary);
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6 {
  font-family: var(--font-arabic);
  font-weight: 700;
}

[dir="rtl"] p,
[dir="rtl"] span,
[dir="rtl"] li,
[dir="rtl"] a {
  font-family: var(--font-arabic);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ── Container ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ── Section Spacing ── */
section {
  padding: var(--space-xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-header h2 {
  margin-bottom: var(--space-xs);
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all var(--transition);
  cursor: pointer;
  font-family: var(--font-display);
}

[dir="rtl"] .btn {
  font-family: var(--font-arabic);
  letter-spacing: 0;
}

.btn-primary {
  background: var(--evergreen);
  color: var(--white);
  border: 2px solid var(--evergreen);
}

.btn-primary:hover {
  background: var(--moss);
  border-color: var(--moss);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--evergreen);
  border: 2px solid var(--evergreen);
}

.btn-outline:hover {
  background: var(--evergreen);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-sage {
  background: var(--sage);
  color: var(--white);
  border: 2px solid var(--sage);
  position: relative;
  overflow: hidden;
}

.btn-sage:hover {
  background: var(--moss);
  border-color: var(--moss);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ── Ripple effect on btn-sage click ── */
.btn-sage .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transform: scale(0);
  animation: btnRipple 0.55s linear;
  pointer-events: none;
}

@keyframes btnRipple {
  to { transform: scale(4); opacity: 0; }
}

/* ── Added-to-cart bounce ── */
.btn-sage.added {
  background: var(--moss);
  border-color: var(--moss);
  animation: cartBounce 0.4s ease;
}

@keyframes cartBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.9); }
  70%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.btn-review {
  background: var(--star-gold);
  color: var(--white);
  border: 2px solid var(--star-gold);
}

.btn-review:hover {
  background: #e09515;
  border-color: #e09515;
  transform: translateY(-2px);
}

/* ── Announcement Bar ── */
.announcement-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--bar-height);
  background: var(--evergreen);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  z-index: 1000;
  font-family: var(--font-display);
}

[dir="rtl"] .announcement-bar {
  font-family: var(--font-arabic);
  letter-spacing: 0;
}

/* ── Navigation ── */
.navbar {
  position: fixed;
  top: var(--bar-height);
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  z-index: 999;
  transition: all var(--transition);
  padding: 0 var(--space-md);
}

.navbar.scrolled {
  background: rgba(247, 248, 246, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(52,76,61,0.08);
  height: 60px;
}

.nav-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 56px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
  transition: color var(--transition-fast);
  position: relative;
}

[dir="rtl"] .nav-links a {
  font-family: var(--font-arabic);
  letter-spacing: 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--sage-dark);
  transform: scaleX(0);
  transition: transform var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--evergreen);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.lang-toggle {
  font-family: var(--font-arabic);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: 0.4rem 0.9rem;
  border: 1.5px solid var(--sage-dark);
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  background: transparent;
  cursor: pointer;
}

.lang-toggle:hover {
  background: var(--evergreen);
  color: var(--white);
}

/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  transition: all var(--transition-fast);
  border-radius: 2px;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 998;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  opacity: 0;
  transition: opacity var(--transition);
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

[dir="rtl"] .mobile-menu a {
  font-family: var(--font-arabic);
}

.mobile-menu a:hover {
  color: var(--sage-dark);
}

/* ── Floating WhatsApp Button ── */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: var(--whatsapp-green);
  border-radius: var(--radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 900;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: var(--white);
}

[dir="rtl"] .whatsapp-float {
  right: auto;
  left: 2rem;
}

/* ── Floating Review Button ── */
.review-float {
  position: fixed;
  bottom: 6.5rem;
  right: 2rem;
  background: var(--white);
  border: 2px solid var(--star-gold);
  color: var(--charcoal);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 900;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
}

[dir="rtl"] .review-float {
  font-family: var(--font-arabic);
  right: auto;
  left: 2rem;
}

.review-float:hover {
  background: var(--star-gold);
  color: var(--white);
  transform: translateY(-2px);
}

/* ── Footer ── */
footer {
  background: var(--evergreen);
  color: var(--white);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-brand img {
  height: 36px;
  filter: brightness(2);
  margin-bottom: var(--space-sm);
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

[dir="rtl"] .footer-brand-name {
  font-family: var(--font-arabic);
}

.footer-brand p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-sm);
}

[dir="rtl"] .footer-col h4 {
  font-family: var(--font-arabic);
  letter-spacing: 0;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col ul a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-col ul a:hover {
  color: var(--white);
}

.footer-socials {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.social-icon {
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.social-icon:hover {
  border-color: var(--sage);
  background: rgba(193,207,192,0.15);
}

.social-icon svg {
  width: 18px;
  height: 18px;
  fill: rgba(255,255,255,0.8);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-bottom p {
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
}

/* ── Product Cards ── */
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.product-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

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

.product-info {
  padding: 1.2rem;
}

.product-info h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  font-family: var(--font-display);
}

[dir="rtl"] .product-info h3 {
  font-family: var(--font-arabic);
}

.product-info .price {
  font-size: 0.95rem;
  color: var(--charcoal);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.category-tag {
  display: inline-block;
  background: var(--sage-lighter);
  color: var(--sage-dark);
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  font-family: var(--font-display);
}

[dir="rtl"] .category-tag {
  font-family: var(--font-arabic);
  letter-spacing: 0;
}

.product-info .btn {
  width: 100%;
  justify-content: center;
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
}

/* ── Stars ── */
.stars {
  color: var(--star-gold);
  font-size: 1.4rem;
  letter-spacing: 0.1em;
}

/* ── Section Divider ── */
.divider {
  width: 60px;
  height: 2px;
  background: var(--sage);
  margin: var(--space-sm) auto;
}

/* ── Utility Classes ── */
.text-center { text-align: center; }
.text-sage { color: var(--sage-dark); }
.bg-cream { background: var(--cream); }
.bg-white { background: var(--white); }
.bg-sage-lighter { background: var(--sage-lighter); }
.bg-blush-light { background: var(--blush-light); }

/* ── Responsive ── */
@media (max-width: 768px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 4rem;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: calc(var(--bar-height) + 60px);
  }
}

/* ========================================================
   NEW COMPONENTS — Added March 2026
   ======================================================== */

/* ── Logo font override ── */
.nav-logo-text,
.footer-brand-name,
.logo-script {
  font-family: var(--font-logo) !important;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
}

/* ── Announcement Bar Rotating ── */
.announcement-bar {
  position: relative;
  overflow: hidden;
}
.announcement-bar .bar-messages {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.announcement-bar .bar-msg {
  position: absolute;
  width: 100%;
  text-align: center;
  opacity: 0;
  transition: opacity 0.6s ease;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--bar-height);
}
.announcement-bar .bar-msg.active {
  opacity: 1;
}
.announcement-bar .bar-msg a {
  color: var(--sage-light);
  text-decoration: underline;
  margin-left: 0.4rem;
}
[dir="rtl"] .announcement-bar .bar-msg {
  font-family: var(--font-arabic);
  letter-spacing: 0;
}

/* ── Cart Icon in Nav ── */
.cart-icon {
  position: relative;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
}
.cart-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--charcoal);
  stroke-width: 1.8;
}
.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--sage-dark);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
}
.cart-count.hidden { display: none; }

/* ── Account Icon in Nav ── */
.account-icon {
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
}
.account-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--charcoal);
  stroke-width: 1.8;
}

/* ── Trust / Certifications Strip ── */
.trust-strip {
  background: var(--sage-lighter);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--sage-light);
  border-bottom: 1px solid var(--sage-light);
}
.trust-strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--charcoal);
}
.trust-badge svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.trust-badge .badge-text small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-secondary);
}
[dir="rtl"] .trust-badge {
  font-family: var(--font-arabic);
}

/* ── Certifications Section ── */
.certifications-section {
  padding: var(--space-xl) 0;
  background: var(--cream);
}
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}
.cert-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--sage-light);
}
.cert-card svg, .cert-card img {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-sm);
}
.cert-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  font-family: var(--font-arabic);
}
.cert-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ── Gift Wrapping Section ── */
.gift-section {
  background: linear-gradient(135deg, var(--blush-brand) 0%, var(--peach-light) 100%);
  padding: var(--space-xl) 0;
}
.gift-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}
.gift-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}
.gift-icon-large {
  width: 100px;
  height: 100px;
  background: var(--white);
  border-radius: var(--radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.gift-icon-large svg {
  width: 50px;
  height: 50px;
  fill: var(--sage-dark);
}
.gift-content h2 {
  margin-bottom: var(--space-sm);
}
.gift-content p {
  margin-bottom: var(--space-md);
}
.gift-form {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
}
.gift-form .form-group {
  margin-bottom: var(--space-sm);
}
.gift-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--charcoal);
}
[dir="rtl"] .gift-form label {
  font-family: var(--font-arabic);
}
.gift-form input,
.gift-form textarea,
.gift-form select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--sage-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
  background: var(--cream);
}
[dir="rtl"] .gift-form input,
[dir="rtl"] .gift-form textarea,
[dir="rtl"] .gift-form select {
  font-family: var(--font-arabic);
}
.gift-form input:focus,
.gift-form textarea:focus,
.gift-form select:focus {
  outline: none;
  border-color: var(--sage-dark);
}
.gift-fee {
  background: var(--sage-lighter);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--sage-dark);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  text-align: center;
}

@media (max-width: 768px) {
  .gift-inner { grid-template-columns: 1fr; }
  .gift-visual { display: none; }
}

/* ── Expanded Footer ── */
.footer-grid {
  grid-template-columns: 1.5fr 1fr 1fr 1fr !important;
}
.footer-certifications {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}
.footer-cert-badge {
  background: rgba(178,190,181,0.15);
  border: 1px solid rgba(178,190,181,0.3);
  color: rgba(255,255,255,0.8);
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-arabic);
}
.payment-logos {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}
.payment-logo {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.03em;
}
.payment-logo.mada { color: #00C1DE; border-color: #00C1DE; }
.payment-logo.visa { color: #1A1F71; background: white; border-color: white; }
.payment-logo.mc { color: #EB001B; background: white; border-color: white; }
.payment-logo.apple { color: rgba(255,255,255,0.9); }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr !important; }
}

/* ── Product Page (single product) ── */
.product-page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
  padding: var(--space-xl) 0;
}
.product-gallery {
  position: sticky;
  top: calc(var(--bar-height) + var(--nav-height) + 2rem);
}
.product-main-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1/1;
}
.product-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-details-info h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 0.5rem;
}
.product-details-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: var(--space-sm);
}
.product-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: var(--space-md);
}
.qty-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--cream);
  border: 1.5px solid var(--sage-light);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.5rem;
  width: fit-content;
}
.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--charcoal);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background var(--transition-fast);
}
.qty-btn:hover { background: var(--sage-dark); color: white; }
.qty-display {
  font-weight: 700;
  font-size: 1rem;
  min-width: 2rem;
  text-align: center;
}
.product-features-list {
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0;
}
.product-features-list li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.product-features-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--sage-dark);
  border-radius: 50%;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .product-page-grid { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
}

/* ── Cart Drawer ── */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  background: var(--white);
  z-index: 1001;
  box-shadow: -10px 0 40px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  transition: right var(--transition);
}
.cart-drawer.open { right: 0; }
[dir="rtl"] .cart-drawer {
  right: auto;
  left: -420px;
  transition: left var(--transition);
}
[dir="rtl"] .cart-drawer.open { left: 0; }
.cart-drawer-header {
  padding: var(--space-md);
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-drawer-header h3 {
  font-size: 1.1rem;
  font-family: var(--font-body);
  font-weight: 700;
}
.cart-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--charcoal);
  padding: 0.3rem;
}
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm) var(--space-md);
}
.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--cream-dark);
  align-items: center;
}
.cart-item-img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.cart-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.cart-item-price {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 1.1rem;
}
.cart-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--cream-dark);
}
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.cart-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.cart-empty {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--text-secondary);
}
.cart-empty svg {
  width: 60px;
  height: 60px;
  stroke: var(--sage);
  margin: 0 auto var(--space-sm);
  fill: none;
  stroke-width: 1.5;
}

/* ── Checkout Page ── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
  align-items: start;
}
.checkout-form-section {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-md);
}
.checkout-form-section h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--cream-dark);
  font-family: var(--font-body);
  font-weight: 700;
}
.checkout-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}
.form-group {
  margin-bottom: var(--space-sm);
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--charcoal);
  font-family: var(--font-body);
}
[dir="rtl"] .form-group label { font-family: var(--font-arabic); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--sage-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--cream);
  transition: border-color var(--transition-fast);
}
[dir="rtl"] .form-group input,
[dir="rtl"] .form-group select,
[dir="rtl"] .form-group textarea {
  font-family: var(--font-arabic);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sage-dark);
  background: var(--white);
}
.form-error {
  color: var(--error);
  font-size: 0.78rem;
  margin-top: 0.2rem;
}
.checkout-order-summary {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--bar-height) + var(--nav-height) + 2rem);
}
.checkout-order-summary h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
  font-family: var(--font-body);
  font-weight: 700;
}
.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--cream-dark);
}
.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 0 0;
  font-weight: 700;
  font-size: 1.1rem;
}
.gift-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0;
  cursor: pointer;
}
.gift-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--sage-dark);
  cursor: pointer;
}
.gift-fields {
  background: var(--blush-light);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  margin-top: 0.5rem;
  display: none;
}
.gift-fields.visible { display: block; }
.delivery-options {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.delivery-option {
  flex: 1;
  min-width: 140px;
  border: 2px solid var(--sage-light);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.delivery-option:hover,
.delivery-option.selected {
  border-color: var(--sage-dark);
  background: var(--sage-lighter);
}
.delivery-option .delivery-name { font-weight: 700; font-size: 0.9rem; }
.delivery-option .delivery-price { color: var(--text-secondary); font-size: 0.85rem; }
.tab-switcher {
  display: flex;
  border: 1.5px solid var(--sage-light);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: var(--space-md);
}
.tab-btn {
  flex: 1;
  padding: 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}
[dir="rtl"] .tab-btn { font-family: var(--font-arabic); }
.tab-btn.active {
  background: var(--charcoal);
  color: var(--white);
}

@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-order-summary { position: static; }
}

/* ── Account Page ── */
.account-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
}
.account-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  width: 100%;
}
.account-card h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}
.account-card .subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}
.account-logo {
  text-align: center;
  margin-bottom: var(--space-md);
}
.account-logo img {
  height: 60px;
  margin: 0 auto;
}
.divider-or {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-sm) 0;
}
.divider-or::before,
.divider-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cream-dark);
}
.divider-or span {
  font-size: 0.8rem;
  color: var(--text-light);
}
.success-banner {
  background: var(--mint-light);
  border: 1.5px solid var(--mint);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  text-align: center;
  margin-bottom: var(--space-sm);
}
.success-banner p {
  color: var(--charcoal);
  font-weight: 600;
  font-size: 0.9rem;
}
.discount-code-box {
  background: var(--sage-lighter);
  border: 2px dashed var(--sage-dark);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--charcoal);
  margin: var(--space-sm) 0;
}

/* ── Shop Page Enhancements ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-md);
}
.products-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}
@media (max-width: 1024px) {
  .products-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .products-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .products-row { grid-template-columns: 1fr; }
}

/* ── Notification Toast ── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--charcoal);
  color: var(--white);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 2000;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.toast.show { transform: translateX(-50%) translateY(0); }
[dir="rtl"] .toast { font-family: var(--font-arabic); }

/* ── Moyasar Payment Form ── */
.mysr-form {
  margin-top: var(--space-sm);
}
.payment-section {
  margin-top: var(--space-md);
}

/* ── Blog content ── */
.blog-card-content p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-article-body {
  max-width: 780px;
  margin: 0 auto;
}
.blog-article-body h2 { margin: var(--space-md) 0 var(--space-sm); }
.blog-article-body p { margin-bottom: var(--space-sm); }
.blog-article-body ul {
  padding-left: 1.5rem;
  margin-bottom: var(--space-sm);
  list-style: disc;
}
.blog-article-body ul li {
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
[dir="rtl"] .blog-article-body ul { padding-left: 0; padding-right: 1.5rem; }

/* ── Size Guide Modal ── */
.size-guide-btn {
  background: none;
  border: none;
  color: var(--sage-dark);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 0;
  margin-bottom: var(--space-sm);
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}
table.size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.size-table th {
  background: var(--sage-lighter);
  padding: 0.6rem;
  text-align: left;
  font-weight: 700;
}
[dir="rtl"] table.size-table th { text-align: right; }
table.size-table td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--cream-dark);
}
table.size-table tr:hover td { background: var(--cream); }

/* ── ODM Badge ── */
.odm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 2px solid var(--sage);
  border-radius: var(--radius-pill);
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sage-dark);
  margin: 0.3rem;
}
.odm-badge svg { width: 18px; height: 18px; fill: var(--sage-dark); }
[dir="rtl"] .odm-badge { font-family: var(--font-arabic); }
