/* Eclara main.css — Clean Clinical Luxury Marocain — mobile-first, RTL */
:root {
  --blanc: #FAF7F2;
  --sauge: #7A8B6F;
  --or: #C9A86A;
  --texte: #2B2B2B;
  --radius: 14px;
  --shadow-soft: 0 4px 16px rgba(0,0,0,0.07);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: 'Tajawal', system-ui, sans-serif;
  color: var(--texte);
  background: var(--blanc);
  font-size: 17px;
  line-height: 1.7;
}

body { max-width: 100vw; overflow-x: hidden; }

.ltr { direction: ltr; text-align: left; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  min-height: 54px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  line-height: 1.3;
  font-family: inherit;
  transition: opacity 0.2s, transform 0.15s;
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-or { background: var(--or); color: white; }
.btn-sauge { background: var(--sauge); color: white; }
.btn-full { width: 100%; display: block; }

/* Pulse animation on primary CTAs */
@keyframes btn-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}
.btn-or.btn-full,
.btn-sauge.btn-full {
  animation: btn-pulse 2.5s ease-in-out infinite;
}
.btn-or.btn-full:hover,
.btn-sauge.btn-full:hover {
  animation: none;
  transform: translateY(-1px);
}

/* ============================================================
   FORM INPUTS — 16px prevents iOS zoom
   ============================================================ */
input, select, textarea {
  font-size: 16px;
  font-family: inherit;
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  background: white;
  color: var(--texte);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--sauge);
  box-shadow: 0 0 0 3px rgba(122,139,111,0.15);
}

/* ============================================================
   STICKY TOP BAR
   ============================================================ */
.sticky-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--sauge);
  color: white;
  text-align: center;
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ============================================================
   ZELLIGE SVG DIVIDER
   ============================================================ */
.zellige-divider {
  display: block;
  width: 100%;
  height: 40px;
  border: none;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='40'><path d='M0 20 L20 0 L40 20 L20 40 Z M40 20 L60 0 L80 20 L60 40 Z' fill='none' stroke='%237A8B6F' stroke-width='1' opacity='0.12'/></svg>");
  background-repeat: repeat-x;
  background-position: center;
  margin: 0;
}

/* ============================================================
   SECTION SPACING
   ============================================================ */
.section {
  padding: 40px 20px;
}
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
}
@media (min-width: 768px) {
  .section {
    padding: 64px 24px;
    max-width: 720px;
    margin: 0 auto;
  }
}

/* ============================================================
   HERO SECTION (p.php)
   ============================================================ */
.hero {
  text-align: center;
  padding: 0 0 40px 0;
}
.hero-img-wrap {
  width: 100%;
  margin-bottom: 28px;
  line-height: 0;
}
.hero-img-wrap img {
  width: 100%;
  max-width: 100%;
  border-radius: 0;
  display: block;
}
.hero-content {
  padding: 0 20px;
  max-width: 720px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}
.hero .hero-angle {
  font-size: 1.1rem;
  color: var(--sauge);
  margin-bottom: 18px;
  line-height: 1.6;
}
.price-row {
  margin-bottom: 24px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
}
.price-old {
  text-decoration: line-through;
  color: var(--or);
  font-size: 1rem;
}
.price-new {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--sauge);
}
.hero-cta-wrap {
  max-width: 400px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero {
    padding: 0 0 64px 0;
  }
  .hero-img-wrap img {
    max-width: 600px;
    margin: 0 auto;
    border-radius: var(--radius);
    display: block;
  }
  .hero h1 {
    font-size: 2.25rem;
  }
}

/* ============================================================
   FORM SECTION
   ============================================================ */
.form-section {
  padding: 40px 20px;
}
@media (min-width: 768px) {
  .form-section {
    padding: 64px 24px;
    max-width: 720px;
    margin: 0 auto;
  }
}
.form-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.form-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Bundle contents box */
.bundle-box {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.9rem;
}
.bundle-box ul {
  margin-top: 8px;
  padding-right: 20px;
}
.bundle-box li { margin-bottom: 4px; }

/* Bump offer */
.bump-offer {
  background: #FFF8EE;
  border: 1px solid var(--or);
  border-radius: 8px;
  padding: 10px 14px;
}
.bump-offer label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  width: 100%;
}
.bump-offer input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
}

/* ============================================================
   QTY SELECTOR
   ============================================================ */
.qty-options { display: flex; gap: 8px; }
.qty-option { flex: 1; }
.qty-option label {
  display: block;
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 70px;
  font-size: 0.9rem;
}
.qty-option label:hover { border-color: var(--sauge); }
.qty-option input { display: none; }
.qty-option input:checked + label {
  border-color: var(--sauge);
  background: var(--sauge);
  color: white;
}
.qty-option input:checked + label .qty-price { color: white; }
.qty-discount {
  background: #e8f4e8;
  color: #27AE60;
  font-size: .75rem;
  padding: 2px 6px;
  border-radius: 10px;
  margin-right: 4px;
}

/* ============================================================
   BENEFITS
   ============================================================ */
.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  text-align: center;
}
.benefit-item {
  padding: 18px 10px;
  background: white;
  border-radius: var(--radius);
  font-size: 0.88rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  line-height: 1.5;
}

/* ============================================================
   STORY SECTION
   ============================================================ */
.story-text {
  line-height: 1.8;
  font-size: 1rem;
  color: #444;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-wrap {
  padding-right: 0;
  padding-left: 0;
}
.testimonials-head {
  padding-right: 20px;
  padding-left: 20px;
}
.testimonials {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 16px 20px 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.testimonials::-webkit-scrollbar { height: 4px; }
.testimonials::-webkit-scrollbar-track { background: #eee; }
.testimonials::-webkit-scrollbar-thumb { background: var(--sauge); border-radius: 2px; }

.testimonial-card {
  flex: 0 0 280px;
  background: white;
  border-radius: 16px;
  padding: 20px;
  scroll-snap-align: start;
  box-shadow: var(--shadow-soft);
}
.testimonial-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.testimonial-stars {
  margin-right: auto;
  color: var(--or);
  font-size: 0.9rem;
}
.testimonial-name { font-weight: 700; font-size: 0.95rem; }
.testimonial-city { font-size: .8rem; color: #777; }
.testimonial-text { font-size: .9rem; line-height: 1.7; }

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sauge);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .testimonials {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow-x: unset;
    padding: 16px 0;
  }
  .testimonial-card { flex: unset; }
  .testimonials-wrap.section {
    padding-right: 24px;
    padding-left: 24px;
  }
  .testimonials-head { padding: 0; }
}

/* ============================================================
   INGREDIENTS
   ============================================================ */
.ingredients-list { list-style: none; }
.ingredients-list li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
  direction: ltr;
  text-align: left;
}
.ingredients-list li::before {
  content: '•';
  color: var(--sauge);
  margin-right: 8px;
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-list details {
  border-bottom: 1px solid #E8E0D5;
  padding: 14px 0;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 0;
  transition: padding 0.2s;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '▼';
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: transform 0.25s ease;
  color: var(--sauge);
  display: inline-block;
}
.faq-list details[open] summary::after {
  transform: rotate(180deg);
}
.faq-list details p {
  padding-top: 10px;
  color: #555;
  line-height: 1.7;
  font-size: 0.93rem;
}

/* ============================================================
   URGENCY BLOCK
   ============================================================ */
.urgency {
  background: #FFF3CD;
  border: 1px solid #FFECB5;
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
}
.urgency p { margin-bottom: 6px; }
.urgency p:last-child { margin-bottom: 0; }

/* ============================================================
   STICKY BOTTOM CTA (mobile only)
   ============================================================ */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99;
  padding: 12px 16px;
  background: rgba(250,247,242,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #E8E0D5;
}
@media (min-width: 768px) { .sticky-cta { display: none; } }

/* ============================================================
   QUIZ BADGE
   ============================================================ */
.quiz-badge {
  display: inline-block;
  background: var(--or);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash { padding: 12px 16px; margin: 8px 16px; border-radius: 8px; font-weight: 500; }
.flash-error { background: #FFE0E0; color: #C0392B; }
.flash-success { background: #E0F5E0; color: #27AE60; }

/* ============================================================
   PRODUCT GRID (index.php)
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 16px;
}
@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}
.product-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--texte);
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.13);
}
.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f0ede8;
  display: block;
}
.product-card .card-body { padding: 14px; }
.card-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
}
.card-angle {
  font-size: .85rem;
  color: #666;
  margin-bottom: 8px;
}
.card-price {
  color: var(--sauge);
  font-weight: 700;
}
.card-price-old {
  color: #999;
  font-size: .85rem;
  text-decoration: line-through;
  margin-left: 4px;
}
.card-cta {
  margin-top: 10px;
}

/* ============================================================
   QUIZ
   ============================================================ */
.quiz-card { display: none; }
.quiz-card.active { display: block; }
.progress-bar { height: 4px; background: #eee; border-radius: 2px; margin-bottom: 24px; }
.progress-fill {
  height: 100%;
  background: var(--sauge);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.quiz-option {
  display: block;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 8px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  text-align: right;
  font-size: 1rem;
  transition: all 0.15s;
  font-family: inherit;
}
.quiz-option:hover, .quiz-option.selected {
  border-color: var(--sauge);
  background: #f0f4f0;
}

/* ============================================================
   WHATSAPP FLOAT
   ============================================================ */
.wa-float {
  position: fixed;
  bottom: 80px;
  left: 16px;
  z-index: 999;
  background: #25D366;
  color: white;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.1); }
