/* ════════════════════════════════════════════════════════
   PAGE PRODUIT — single-product.css
   Zyra Shop · Côte d'Ivoire
════════════════════════════════════════════════════════ */

/* ── Reset wrap ── */
.sp-wrap {
  background: #f5f5f5;
  min-height: 100vh;
  padding-bottom: 100px;
}

/* ══ HEADER ════════════════════════════════════════════ */
.sp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.sp-header-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
}
.sp-header-actions {
  display: flex;
  gap: 8px;
}
.sp-back,
.sp-share-btn,
.sp-fav-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #f5f5f5;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #1a1a1a;
  transition: background .15s;
}
.sp-back svg,
.sp-share-btn svg { stroke: #1a1a1a; fill: none; stroke-width: 2; width: 18px; height: 18px; }
.sp-fav-btn svg   { stroke: #1a1a1a; fill: none; stroke-width: 2; width: 18px; height: 18px; transition: all .2s; }
.sp-fav-btn.active svg { stroke: #e63946; fill: #e63946; }

/* ══ GALERIE ════════════════════════════════════════════ */
.sp-gallery {
  position: relative;
  background: #fff;
  overflow: hidden;
}
.sp-slides {
  display: flex;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.sp-slide {
  flex: 0 0 100%;
  aspect-ratio: 1 / 0.85;
  overflow: hidden;
}
.sp-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sp-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.sp-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,.25);
  cursor: pointer;
  transition: all .2s;
}
.sp-dot.active {
  background: #ff5a1f;
  width: 22px;
  border-radius: 4px;
}

/* ══ BODY ════════════════════════════════════════════════ */
.sp-body {
  padding: 0 0 16px;
}

/* ── Bloc blanc principal ── */
.sp-body > * {
  background: #fff;
}

.sp-cat {
  display: inline-block;
  padding: 16px 16px 0;
  font-size: 11px;
  font-weight: 600;
  color: #ff5a1f;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.sp-title {
  padding: 6px 16px 0;
  font-size: 20px;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.3;
  margin: 0;
}

/* ── Meta ── */
.sp-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
}
.sp-stars {
  display: flex;
  align-items: center;
  gap: 3px;
}
.sp-star {
  width: 16px; height: 16px;
}
.sp-star.full    { fill: #f59e0b; stroke: #f59e0b; }
.sp-star.half    { fill: url(#half); stroke: #f59e0b; }
.sp-star.empty   { fill: #e5e7eb; stroke: #e5e7eb; }
.sp-rating-num {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  margin-left: 4px;
}
.sp-reviews { font-size: 12px; color: #888; }
.sp-sales   { font-size: 12px; color: #888; display: flex; align-items: center; gap: 3px; }
.sp-fire    { font-size: 13px; }

/* ── Prix ── */
.sp-pricing {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 16px 0;
}
.sp-price {
  font-size: 26px;
  font-weight: 900;
  color: #ff5a1f;
  letter-spacing: -.5px;
}
.sp-regular {
  font-size: 15px;
  color: #bbb;
  text-decoration: line-through;
}
.sp-savings {
  display: inline-block;
  margin: 6px 16px 14px;
  background: #fff0eb;
  color: #ff5a1f;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
}

/* ── Badges livraison ── */
.sp-delivery-badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 16px 14px;
  padding: 14px;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
}
.sp-delivery-badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
}
.sp-delivery-badge svg {
  width: 22px; height: 22px;
  stroke: #ff5a1f; fill: none; stroke-width: 1.8;
  flex-shrink: 0; margin-top: 1px;
}
.sp-delivery-badge strong { display: block; font-size: 12px; font-weight: 700; color: #1a1a1a; }
.sp-delivery-badge span   { display: block; font-size: 11px; color: #888; }

/* ── Paiements ── */
.sp-payment-section {
  padding: 14px 16px;
  border-top: 1px solid #f5f5f5;
}
.sp-payment-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px;
}
.sp-payment-icons {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.sp-pay-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #888;
  text-align: center;
}
.sp-pay-icon img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.sp-pay-livraison svg { background: #f0faf4; border-radius: 8px; padding: 6px; width: 36px; height: 36px; }

.sp-trust-badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.sp-trust-badges span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #666;
}
.sp-trust-badges svg { stroke: #888; fill: none; stroke-width: 2; flex-shrink: 0; }

/* ── Variantes ── */
.sp-variants-section {
  padding: 14px 16px;
  border-top: 1px solid #f5f5f5;
}
.sp-attr-group { margin-bottom: 14px; }
.sp-attr-label {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px;
}
.sp-attr-options { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-attr-opt {
  padding: 7px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
  transition: all .15s;
  color: #1a1a1a;
}
.sp-attr-opt.active {
  border-color: #ff5a1f;
  background: #fff5f0;
  color: #ff5a1f;
  font-weight: 600;
}

/* ── Stock ── */
.sp-stock {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  border-top: 1px solid #f5f5f5;
}
.sp-stock-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sp-stock.in-stock  { color: #16a34a; }
.sp-stock.in-stock  .sp-stock-dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
.sp-stock.out-stock { color: #dc2626; }
.sp-stock.out-stock .sp-stock-dot { background: #ef4444; }

/* ── Quantité ── */
.sp-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid #f5f5f5;
}
.sp-qty-label { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.sp-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}
.sp-qty-btn {
  width: 38px; height: 38px;
  border: none;
  background: #f5f5f5;
  font-size: 20px;
  cursor: pointer;
  color: #1a1a1a;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
  line-height: 1;
}
.sp-qty-btn:active { background: #e5e7eb; }
.sp-qty-val {
  width: 40px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  background: #fff;
}

/* ── Actions ── */
.sp-actions {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid #f5f5f5;
}
.sp-btn-cart {
  width: 100%;
  padding: 16px;
  background: #ff5a1f;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, transform .1s;
}
.sp-btn-cart svg { stroke: #fff; fill: none; stroke-width: 2; }
.sp-btn-cart:active { transform: scale(.98); background: #e04d15; }
.sp-btn-cart.disabled { background: #e5e7eb; color: #999; cursor: not-allowed; }
.sp-btn-cart.loading  { opacity: .7; pointer-events: none; }

.sp-btn-buy {
  width: 100%;
  padding: 16px;
  background: #fff;
  color: #ff5a1f;
  border: 2px solid #ff5a1f;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: background .15s;
}
.sp-btn-buy:active { background: #fff5f0; }

.sp-return-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #888;
}
.sp-return-note svg { stroke: #888; fill: none; stroke-width: 2; }

/* ══ PANNEAU PAIEMENT ════════════════════════════════════ */
.sp-payment-panel {
  margin: 8px 0 0;
  padding: 20px 16px 24px;
  background: #fff;
}
.sp-panel-step {
  font-size: 17px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 4px;
}
.sp-panel-sub {
  font-size: 13px;
  color: #888;
  margin: 0 0 16px;
}
.sp-pay-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.sp-pay-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: #fff;
  position: relative;
}
.sp-pay-opt input[type="radio"] {
  width: 20px; height: 20px;
  accent-color: #ff5a1f;
  flex-shrink: 0;
  cursor: pointer;
}
.sp-pay-opt.active {
  border-color: #ff5a1f;
  background: #fff9f7;
}
.sp-pay-opt-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 8px;
}
.sp-pay-opt-info { display: flex; flex-direction: column; gap: 2px; }
.sp-pay-opt-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}
.sp-pay-opt-name em { font-style: normal; font-size: 11px; color: #22c55e; font-weight: 500; }
.sp-pay-opt-desc { font-size: 12px; color: #888; }
.sp-pay-opt-logo { display: flex; align-items: center; flex-shrink: 0; }
.sp-pay-opt-logo img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.sp-logo-livraison svg { background: #f0faf4; border-radius: 8px; padding: 6px; width: 40px; height: 40px; }
.sp-logo-cards { gap: 4px; }

.sp-btn-validate {
  width: 100%;
  padding: 17px;
  background: #ff5a1f;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, transform .1s;
  box-shadow: 0 4px 16px rgba(255,90,31,.3);
}
.sp-btn-validate svg { stroke: #fff; fill: none; stroke-width: 2; }
.sp-btn-validate:active { transform: scale(.98); background: #e04d15; }

/* ══ SECTIONS ACCORDÉON ══════════════════════════════════ */
.sp-description-section,
.sp-specs-section,
.sp-reviews-section {
  margin-top: 8px;
  background: #fff;
}
.sp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  border-bottom: 1px solid #f5f5f5;
  user-select: none;
}
.sp-chevron {
  width: 18px; height: 18px;
  stroke: #888; fill: none; stroke-width: 2;
  transition: transform .25s;
}
.sp-chevron.open { transform: rotate(180deg); }

.sp-description-body,
.sp-specs-body,
.sp-reviews-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.sp-description-body.open,
.sp-specs-body.open,
.sp-reviews-body.open { max-height: 2000px; }

.sp-description-body { padding: 0 16px; }
.sp-description-body.open { padding: 16px; }
.sp-description-body p { font-size: 14px; line-height: 1.7; color: #444; margin: 0 0 10px; }

.sp-short-desc { font-size: 14px; color: #444; line-height: 1.7; margin-bottom: 12px; }
.sp-attrs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sp-attrs-table tr { border-bottom: 1px solid #f5f5f5; }
.sp-attrs-table tr:last-child { border-bottom: none; }
.sp-attr-key { padding: 10px 16px; color: #888; font-weight: 500; width: 40%; }
.sp-attr-val { padding: 10px 16px; color: #1a1a1a; font-weight: 600; }

.sp-specs-body.open  { padding: 16px 0; }
.sp-reviews-body.open { padding: 16px; }

/* Résumé notes */
.sp-rating-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f5f5f5;
}
.sp-rating-big {
  font-size: 48px;
  font-weight: 900;
  color: #1a1a1a;
  line-height: 1;
}
.sp-rating-right { display: flex; flex-direction: column; gap: 6px; }
.sp-stars-row { display: flex; gap: 3px; }
.sp-stars-row .sp-star { width: 18px; height: 18px; }
.sp-rating-right span { font-size: 12px; color: #888; }

/* WooCommerce comments override */
.sp-reviews-body .commentlist { list-style: none; margin: 0; padding: 0; }
.sp-reviews-body .comment_container { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #f5f5f5; }
.sp-reviews-body .comment_container:last-child { border-bottom: none; }
.sp-reviews-body .star-rating { color: #f59e0b; font-size: 13px; }
.sp-reviews-body .woocommerce-review__author { font-weight: 600; font-size: 13px; }
.sp-reviews-body .description p { font-size: 13px; color: #555; margin: 4px 0 0; line-height: 1.6; }

/* ══ PRODUITS SIMILAIRES ══════════════════════════════════ */
.sp-related-section {
  margin-top: 8px;
  padding: 16px 16px 20px;
  background: #fff;
}
.sp-related-title {
  font-size: 16px;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 14px;
}
.sp-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sp-related-card { text-decoration: none; color: #1a1a1a; }
.sp-related-img-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #f5f5f5;
  margin-bottom: 8px;
}
.sp-related-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.sp-related-badge {
  position: absolute;
  top: 7px; left: 7px;
  background: #ff5a1f;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}
.sp-related-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sp-related-price { font-size: 13px; font-weight: 800; color: #ff5a1f; margin: 0; }
.sp-related-price del { color: #bbb; font-weight: 400; font-size: 11px; margin-left: 4px; }

/* ══ TOAST ════════════════════════════════════════════════ */
.sp-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a1a;
  color: #fff;
  padding: 11px 20px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 9999;
}
.sp-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.sp-toast.success { background: #16a34a; }
.sp-toast.warn    { background: #d97706; }
