/* ============================================================
   SoldDolls commerce layout
   - Mission 2 : drawer panier 100% mobile, header 60px
   - Mission 3 : checkout one-page mobile (récap en haut, repliable,
                 colonnes empilées, inputs 16px, bouton final 56px)
   ============================================================ */

/* ---------- MISSION 2 : Drawer panier ---------- */
@media (max-width: 640px) {
  #sd-mini-cart { width: 100% !important; max-width: 100% !important; }
}
#sd-mini-cart { height: 100vh; height: 100dvh; }
#sd-mini-cart .mc-head {
  min-height: 60px; padding: 0 20px !important;
  border-bottom: 1px solid #eee;
}
#sd-mini-cart .mc-body { flex: 1; overflow-y: auto; padding: 20px; }
body.mini-cart-open { overflow: hidden; }
html:has(body.mini-cart-open) { overflow: hidden; }

/* ---------- MISSION 3 : Checkout one-page mobile ---------- */
@media (max-width: 900px) {
  /* Une seule colonne, summary en HAUT (avant les coordonnées) */
  .sd-checkout-grid { display: flex !important; flex-direction: column; gap: 16px !important; }
  .sd-checkout-column--right { order: -1; }
  .sd-checkout-column--left  { order: 1; }

  /* Bandeau récap repliable */
  .sd-order-review-title {
    cursor: pointer; user-select: none;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin: 0 0 10px;
    font-size: 15px; font-weight: 700;
  }
  .sd-order-review-title::after {
    content: "▼";
    font-size: 12px; color: #666;
    transition: transform .25s ease;
    margin-left: 12px;
  }
  .sd-order-review-title.is-open::after { transform: rotate(180deg); }

  .sd-order-review-box {
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .sd-order-review-box.is-open { max-height: 1200px; }

  /* Inputs 16px pour éviter le zoom iOS */
  .woocommerce-checkout .form-row input.input-text,
  .woocommerce-checkout .form-row select,
  .woocommerce-checkout .form-row textarea {
    font-size: 16px !important;
    min-height: 48px;
    border-radius: 6px;
  }

  /* Bouton final pleine largeur 56px */
  .woocommerce-checkout #place_order,
  .woocommerce-checkout .wc-block-components-checkout-place-order-button {
    width: 100% !important;
    min-height: 56px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    background: var(--sd-primary, #e63946) !important;
    color: #fff !important;
    border: 0 !important;
  }
  .woocommerce-checkout #place_order:disabled { opacity: .6; cursor: not-allowed; }

  /* Plus de sidebar : tout empilé */
  .sd-checkout-column { width: 100%; }
}

/* "Livraison gratuite" en vert partout */
.woocommerce-shipping-methods .amount,
.cart_totals .shipping .amount { color: #1d8a4a; font-weight: 700; }


/* ===== CORRECTIONS COULEUR CONTRASTE — v2 ===== */

/* --sd-text (#1a1a1a) est invisible sur --sd-bg (#0d0d11) */
/* Fix global: headings et textes principaux */
h1, h2, h3, h4, h5, h6 { color: #fff !important; }
.woocommerce-result-count,
.sd-sort-bar,
.archive-description p,
.collection-description,
.sd-results-info { color: rgba(255,255,255,0.8) !important; }

/* Pills catégories */
.sd-cat-pill {
  background: rgba(255,255,255,0.12) !important;
  color: rgba(255,255,255,0.95) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
}
.sd-cat-pill:hover { background: rgba(255,255,255,0.22) !important; }

/* Trust signals */
.ts-item, .ts-item span, .ts-item p { color: rgba(255,255,255,0.9) !important; }

/* Badge réduction */
.p-disc {
  background: rgba(255,193,7,0.18) !important;
  color: #e6b800 !important;
  font-weight: 700 !important;
}

/* Hero section: outline button gold border visibility */
.hero-btns .btn.btn-outline {
  border-color: rgba(255, 215, 0, 0.85);
}
