/* ==========================================================================
   WETTA SHOPPING - COMPONENTS.CSS
   Cartes produits, badges, pop-up de commande, formulaires
   ========================================================================== */

/* ==========================================================================
   PRODUCT CARD
   ========================================================================== */

.product-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(75, 31, 61, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 32px rgba(75, 31, 61, 0.15);
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #F0E6D8;
}

.product-image-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.product-image-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.product-image-slide.active {
  opacity: 1;
}

.product-image-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image-slide.active img {
  transform: scale(1.08);
}

/* Indicateurs de slides (dots) */
.product-image-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  padding: 5px 10px;
  border-radius: 20px;
}

.product-image-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(75, 31, 61, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-image-dots .dot:hover {
  background: rgba(75, 31, 61, 0.7);
  transform: scale(1.2);
}

.product-image-dots .dot.active {
  background: #4B1F3D;
  width: 20px;
  border-radius: 10px;
}

/* --- Badges --- */
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 5px 12px;
  border-radius: 20px;
  color: #fff;
  z-index: 2;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.badge-new {
  background: linear-gradient(135deg, #A78CA1, #4B1F3D);
}

.badge-promo {
  background: linear-gradient(135deg, #E88CA0, #4B1F3D);
}

.badge-tester {
  background: linear-gradient(135deg, #C9A9D9, #A78CA1);
}

/* --- Contenu carte --- */
.product-info {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: #4B1F3D;
  line-height: 1.3;
}

.product-contenance {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #A78CA1, #4B1F3D);
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.product-description {
  font-size: 0.9rem;
  color: #7A6A75;
  margin-bottom: 6px;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.product-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #4B1F3D;
}

.product-price-old {
  font-size: 0.95rem;
  color: #7A6A75;
  text-decoration: line-through;
}

.buy-btn {
  margin-top: auto;
  background: linear-gradient(135deg, #4B1F3D, #A78CA1);
  color: #fff;
  padding: 12px 0;
  width: 100%;
  border-radius: 40px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  box-shadow: 0 4px 14px rgba(75, 31, 61, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: none;
  cursor: pointer;
}

.buy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(75, 31, 61, 0.35);
}

.buy-btn:active {
  transform: translateY(0) scale(0.97);
}

/* ==========================================================================
   MODAL / POP-UP DE COMMANDE
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(75, 31, 61, 0.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #FFFCF8;
  border-radius: 24px;
  width: 100%;
  max-width: 520px;
  width: 92%;
  padding: 32px 28px;
  position: relative;
  box-shadow: 0 20px 60px rgba(75, 31, 61, 0.35);
  transform: scale(0.85) translateY(20px);
  transition: transform 0.35s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-box {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #4B1F3D;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  transform: rotate(90deg);
  color: #A78CA1;
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.modal-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 8px;
}

.modal-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: #4B1F3D;
  margin-bottom: 6px;
}

.modal-header p {
  font-size: 0.95rem;
  color: #7A6A75;
}

/* --- Formulaire --- */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4B1F3D;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #D9C7B8;
  border-radius: 14px;
  background: #fff;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: #4B1F3D;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-group input::placeholder {
  color: #B8A89D;
  opacity: 0.8;
}

.form-group input:focus {
  outline: none;
  border-color: #A78CA1;
  box-shadow: 0 0 0 4px rgba(167, 140, 161, 0.2);
}

.form-group.has-error input {
  border-color: #e74c3c !important;
  background: #fff8f8 !important;
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.15) !important;
  animation: fieldShake 0.35s ease-in-out;
}

.form-group.is-valid input {
  border-color: #27ae60 !important;
  background: #fbfdfb !important;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.12) !important;
}

.form-error-msg {
  font-size: 0.82rem;
  color: #c0392b;
  margin-top: 5px;
  font-weight: 600;
  display: none;
  line-height: 1.35;
  animation: errorFadeIn 0.25s ease forwards;
}

.form-group.has-error .form-error-msg {
  display: block;
}

@keyframes fieldShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

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

.modal-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #4B1F3D, #A78CA1);
  color: #fff;
  padding: 14px 0;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  margin-top: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(75, 31, 61, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
}

.modal-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(75, 31, 61, 0.4);
}

.modal-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.loader {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* --- Message de succès --- */
.modal-success {
  display: none;
  text-align: center;
  padding: 10px 0;
}

.modal-success.active {
  display: block;
  animation: fadeInUp 0.4s ease;
}

.success-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}

.modal-success h4 {
  font-family: 'Playfair Display', serif;
  color: #4B1F3D;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.modal-success p {
  color: #7A6A75;
  font-size: 0.95rem;
  line-height: 1.6;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 480px) {
  .modal-box {
    padding: 28px 22px;
    border-radius: 20px;
  }

  .product-info {
    padding: 14px 14px 16px;
  }

  .product-name {
    font-size: 1rem;
  }
}


/* ==========================================================================
   BANNIÈRE DE PAGE (Testeurs / Catégorie)
   ========================================================================== */

.page-banner {
  background: linear-gradient(135deg, #FFFCF8 0%, #F0E6D8 60%, #A78CA1 100%);
  text-align: center;
  padding: 70px 20px 50px;
}

.page-banner-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: #4B1F3D;
  margin: 14px 0 10px;
}

.page-banner-content p {
  color: #7A6A75;
  font-size: 1.05rem;
  max-width: 550px;
  margin: 0 auto;
}

.section-subtitle {
  text-align: center;
  color: #7A6A75;
  font-size: 0.95rem;
  margin-top: -24px;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   CARTES INFO TESTEURS
   ========================================================================== */

.tester-info {
  padding-top: 40px;
  padding-bottom: 20px;
}

.tester-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.tester-info-card {
  background: #fff;
  border-radius: 18px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(75, 31, 61, 0.08);
  transition: transform 0.3s ease;
}

.tester-info-card:hover {
  transform: translateY(-6px);
}

.tester-info-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 12px;
}

.tester-info-card h3 {
  font-family: 'Playfair Display', serif;
  color: #4B1F3D;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.tester-info-card p {
  color: #7A6A75;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ==========================================================================
   LIEN NAV ACTIF
   ========================================================================== */

.active-link {
  color: #A78CA1 !important;
}

.active-link::after {
  width: 100% !important;
}

/* ==========================================================================
   FORMULAIRE ENRICHI & LIGNES MULTI-COLONNES
   ========================================================================== */

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #D9C7B8;
  border-radius: 14px;
  background: #fff;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: #4B1F3D;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%234B1F3D%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.form-group select:focus {
  outline: none;
  border-color: #A78CA1;
  box-shadow: 0 0 0 4px rgba(167, 140, 161, 0.2);
}

/* --- Bloc Code Promo --- */
.promo-box {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.promo-input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-apply-promo {
  padding: 0 16px;
  border-radius: 12px;
  background: #4B1F3D;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.btn-apply-promo:hover {
  background: #6B2F58;
}

.promo-status-msg {
  font-size: 0.82rem;
  margin-top: 6px;
  display: none;
}

.promo-status-msg.success {
  color: #27ae60;
  display: block;
}

.promo-status-msg.error {
  color: #c0392b;
  display: block;
}

/* --- Carte Récapitulatif Commande --- */
.order-summary-card {
  background: #FAF7F2;
  border: 1.5px solid #EADBCE;
  border-radius: 16px;
  padding: 16px 18px;
  margin: 18px 0;
  font-size: 0.92rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: #7A6A75;
}

.summary-row.discount-row {
  color: #27ae60;
  font-weight: 600;
}

.summary-divider {
  height: 1px;
  background: #EADBCE;
  margin: 10px 0;
}

.summary-row.total-row {
  font-size: 1.15rem;
  font-weight: 700;
  color: #4B1F3D;
  margin-bottom: 0;
}

.summary-total-amount {
  color: #4B1F3D;
  font-family: 'Playfair Display', serif;
}

/* ==========================================================================
   BARRE DE RECHERCHE & TRI CATALOGUE
   ========================================================================== */

.catalog-controls {
  max-width: 1200px;
  margin: 0 auto 30px auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.search-input-box {
  flex: 1;
  min-width: 260px;
  position: relative;
}

.search-input-box input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  border: 1.5px solid #D9C7B8;
  border-radius: 30px;
  background: #fff;
  font-size: 0.95rem;
  color: #4B1F3D;
  transition: all 0.25s ease;
}

.search-input-box input:focus {
  outline: none;
  border-color: #4B1F3D;
  box-shadow: 0 4px 15px rgba(75, 31, 61, 0.1);
}

.search-icon-svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #7A6A75;
  pointer-events: none;
}

.sort-select-box select {
  padding: 12px 20px;
  border: 1.5px solid #D9C7B8;
  border-radius: 30px;
  background: #fff;
  font-size: 0.9rem;
  color: #4B1F3D;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.sort-select-box select:focus {
  border-color: #4B1F3D;
}

/* ==========================================================================
   BADGES DE STOCK & ÉTAT BOUTONS
   ========================================================================== */

.badge-stock-out {
  background: #c0392b !important;
  color: #fff !important;
}

.buy-btn:disabled,
.btn-buy-detail:disabled {
  background: #BDC3C7 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
}

/* ==========================================================================
   SECTION AVIS CLIENTS & ÉTOILES
   ========================================================================== */

.reviews-section {
  padding: 60px 0;
  background: #FAF7F2;
  margin-top: 50px;
  border-top: 1px solid #EADBCE;
}

.reviews-header {
  text-align: center;
  margin-bottom: 40px;
}

.reviews-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #4B1F3D;
  margin-bottom: 8px;
}

.reviews-summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 8px 18px;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(75, 31, 61, 0.08);
  font-size: 1rem;
  font-weight: 600;
  color: #4B1F3D;
}

.stars-gold {
  color: #F1C40F;
  letter-spacing: 2px;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.review-card {
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(75, 31, 61, 0.06);
  border: 1px solid #F0E6DD;
}

.review-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.review-author {
  font-weight: 700;
  color: #4B1F3D;
}

.review-date {
  font-size: 0.8rem;
  color: #A78CA1;
}

.review-comment {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.6;
}

.add-review-card {
  background: #fff;
  border-radius: 20px;
  padding: 30px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 6px 24px rgba(75, 31, 61, 0.08);
}

.star-rating-selector {
  display: flex;
  gap: 6px;
  font-size: 1.6rem;
  cursor: pointer;
  color: #D9C7B8;
  margin-bottom: 15px;
}

.star-rating-selector span:hover,
.star-rating-selector span.active {
  color: #F1C40F;
}

/* ==========================================================================
   TOAST NOTIFICATIONS (LUXURY FEEDBACK)
   ========================================================================== */

.wetta-toast-container {
  position: fixed;
  top: 28px;
  right: 28px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 420px;
  width: calc(100vw - 56px);
}

.wetta-toast {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: 0 16px 40px rgba(75, 31, 61, 0.16), 0 4px 12px rgba(75, 31, 61, 0.08);
  border: 1.5px solid #E7D6DF;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transform: translateY(-24px) scale(0.94);
  opacity: 0;
  animation: wettaToastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
}

.wetta-toast.hiding {
  opacity: 0;
  transform: translateY(-20px) scale(0.92);
}

.wetta-toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
}

.wetta-toast.toast-success::before {
  background: linear-gradient(180deg, #2E7D32, #4CAF50);
}

.wetta-toast.toast-error::before {
  background: linear-gradient(180deg, #D9534F, #E57373);
}

.wetta-toast.toast-info::before {
  background: linear-gradient(180deg, #C9A571, #4B1F3D);
}

.wetta-toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  flex-shrink: 0;
}

.wetta-toast.toast-success .wetta-toast-icon {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #A5D6A7;
}

.wetta-toast.toast-error .wetta-toast-icon {
  background: #FFEBEE;
  color: #D9534F;
  border: 1px solid #FFCDD2;
}

.wetta-toast.toast-info .wetta-toast-icon {
  background: #FDF7ED;
  color: #C9A571;
  border: 1px solid #E6D2B5;
}

.wetta-toast-content {
  flex: 1;
  min-width: 0;
}

.wetta-toast-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1rem;
  color: #4B1F3D;
  margin-bottom: 2px;
}

.wetta-toast-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: #6E5A69;
  line-height: 1.35;
}

.wetta-toast-close {
  background: transparent;
  border: none;
  color: #A78CA1;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wetta-toast-close:hover {
  color: #4B1F3D;
  transform: scale(1.15);
}

.wetta-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: rgba(75, 31, 61, 0.12);
}

.wetta-toast-progress-bar {
  height: 100%;
  width: 100%;
  animation: wettaToastProgress 4.5s linear forwards;
}

.wetta-toast.toast-success .wetta-toast-progress-bar {
  background: #2E7D32;
}

.wetta-toast.toast-error .wetta-toast-progress-bar {
  background: #D9534F;
}

.wetta-toast.toast-info .wetta-toast-progress-bar {
  background: #C9A571;
}

@keyframes wettaToastSlideIn {
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes wettaToastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

/* Banner de feedback avis */
.review-feedback-banner {
  padding: 14px 20px;
  border-radius: 14px;
  margin-bottom: 18px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.4;
  animation: fadeIn 0.3s ease;
}

.review-feedback-banner.success {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1.5px solid #A5D6A7;
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.08);
}

.review-feedback-banner.error {
  background: #FFEBEE;
  color: #C62828;
  border: 1.5px solid #FFCDD2;
}
