/*
Theme Name:   Maison Alghaith (Thème Enfant)
Theme URI:    https://maisonalghaith.ma
Description:  Thème enfant pour Maison Alghaith — Épices & Produits Naturels
Author:       Maison Alghaith
Template:     flatsome
Version:      1.0.0
*/

/* ═══════════════════════════════════════════════
   VARIABLES COULEURS ALGHAITH
═══════════════════════════════════════════════ */
:root {
  --alghaith-green:       #2C5F2E;
  --alghaith-green-dark:  #1E3A1E;
  --alghaith-green-mid:   #2d5a27;
  --alghaith-gold:        #D4AC0D;
  --alghaith-gold-light:  #e8b86d;
  --alghaith-cream:       #F9F4EC;
  --alghaith-cream-dark:  #F0E8D8;
  --alghaith-brown:       #8B4513;
  --alghaith-text:        #1a1208;
  --alghaith-text-mid:    #4a3728;
  --alghaith-text-light:  #8a7060;
}

/* ═══════════════════════════════════════════════
   BOUTONS PRINCIPAUX
═══════════════════════════════════════════════ */
.button,
.wp-block-button__link,
#place_order,
.woocommerce .button.alt,
.woocommerce button.button.alt {
  background-color: var(--alghaith-green) !important;
  color: #ffffff !important;
  border-color: var(--alghaith-green) !important;
  border-radius: 2px !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.2s ease;
}

.button:hover,
.wp-block-button__link:hover,
#place_order:hover,
.woocommerce .button.alt:hover {
  background-color: var(--alghaith-green-mid) !important;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════
   COULEUR DES PRIX
═══════════════════════════════════════════════ */
.woocommerce span.price,
.woocommerce .woocommerce-Price-amount.amount {
  color: var(--alghaith-green) !important;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════
   HEADER PERSONNALISÉ
═══════════════════════════════════════════════ */
.header-main {
  background-color: var(--alghaith-green-dark) !important;
}

.header-main a,
.header-main .nav > li > a {
  color: rgba(255,255,255,0.85) !important;
}

.header-main a:hover,
.header-main .nav > li > a:hover {
  color: var(--alghaith-gold) !important;
}

/* ═══════════════════════════════════════════════
   FOND GÉNÉRAL
═══════════════════════════════════════════════ */
body {
  background-color: var(--alghaith-cream);
  font-family: 'Jost', sans-serif;
}

/* ═══════════════════════════════════════════════
   TITRES
═══════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--alghaith-green);
}

/* ═══════════════════════════════════════════════
   CARTES PRODUITS
═══════════════════════════════════════════════ */
.product-small .box,
.woocommerce ul.products li.product {
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #ffffff;
}

.product-small .box:hover,
.woocommerce ul.products li.product:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(30,58,30,0.15);
}

/* ═══════════════════════════════════════════════
   BOUTON WHATSAPP FLOTTANT
═══════════════════════════════════════════════ */
.alghaith-whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  background: #25D366;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.alghaith-whatsapp-float:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 28px rgba(37,211,102,0.55);
}

/* Pulse animation */
.alghaith-whatsapp-float::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 14px; height: 14px;
  background: #ff6b6b;
  border-radius: 50%;
  animation: wa-pulse 2s ease-in-out infinite;
}

@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0.6); }
  50%       { box-shadow: 0 0 0 8px rgba(255,107,107,0); }
}

/* ═══════════════════════════════════════════════
   TABLEAU D'ORIGINE PRODUIT
═══════════════════════════════════════════════ */
.alghaith-origin-table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
}

.alghaith-origin-table th {
  background: var(--alghaith-cream-dark);
  color: var(--alghaith-green);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 10px 14px;
  text-align: left;
  width: 40%;
}

.alghaith-origin-table td {
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--alghaith-text-mid);
  border-bottom: 1px solid var(--alghaith-cream-dark);
}

/* ═══════════════════════════════════════════════
   PAGE DE CONFIRMATION DE COMMANDE
═══════════════════════════════════════════════ */
.woocommerce-order-received .entry-title {
  color: var(--alghaith-green);
}

.woocommerce-order-received .woocommerce-notice--success {
  background: var(--alghaith-cream);
  border-left: 4px solid var(--alghaith-green);
}

/* ═══════════════════════════════════════════════
   SUPPORT RTL ARABE
═══════════════════════════════════════════════ */
html[lang="ar"] body {
  font-family: 'Amiri', serif;
  direction: rtl;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 {
  font-family: 'Amiri', serif;
  direction: rtl;
}

html[lang="ar"] .nav > li {
  float: right;
}

/* ═══════════════════════════════════════════════
   MOBILE RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 0 20px 0 !important;
  }

  .alghaith-whatsapp-float {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
  }
}
