/* =========================================================
   Gignoux – Panier & Checkout
   Fichier : assets/checkout.css (thème enfant)
   Chargé uniquement sur le panier et le checkout
   ========================================================= */


/* ---------------------------------------------------------
   1. PANIER – plus d'aspect "tableau" + séparateur vertical
   --------------------------------------------------------- */

.wc-block-cart .wc-block-cart-items,
.wc-block-cart .wc-block-cart-items th,
.wc-block-cart .wc-block-cart-items td,
.wc-block-cart .wc-block-cart-items__row,
.wc-block-cart table.wc-block-cart-items {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.wc-block-cart .wc-block-cart-items__row::after,
.wc-block-cart .wc-block-cart-items::after,
.wc-block-cart .wc-block-cart-items::before {
  display: none !important;
  border: 0 !important;
}

.wc-block-cart .wc-block-cart-items td {
  padding-top: 14px;
  padding-bottom: 14px;
}

.wc-block-cart .wc-block-cart-items__header th {
  padding-bottom: 12px;
  font-size: 0.8em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}

@media (min-width: 783px) {
  .wc-block-cart .wc-block-cart__sidebar {
    border-left: 1px solid rgba(0, 0, 0, 0.15);
    padding-left: 32px !important;
  }
  .wc-block-cart .wc-block-cart__main {
    padding-right: 32px !important;
  }
}

@media (max-width: 782px) {
  .wc-block-cart .wc-block-cart__sidebar {
    border-left: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    padding-top: 24px;
    margin-top: 24px;
  }
}


/* ---------------------------------------------------------
   2. CHECKOUT – lien "Retour au panier" (shortcode
      [gignoux_retour_panier], à placer une seule fois dans Divi)
   --------------------------------------------------------- */

.gignoux-back-to-cart {
  margin: 0 0 24px;
  text-align: left;
}

.gignoux-back-to-cart a {
  font-size: 0.95em;
  text-decoration: none;
  opacity: 0.8;
}

.gignoux-back-to-cart a:hover {
  opacity: 1;
  text-decoration: underline;
}


/* ---------------------------------------------------------
   3. CHECKOUT – popin de paiement (3D Secure) au-dessus du
      récapitulatif de commande
      Cause : les colonnes Divi sont au même niveau (z-index 2),
      donc la colonne de droite (récap sticky) recouvre la popin
      qui est dans la colonne de gauche.
   --------------------------------------------------------- */

/* Colonne(s) du formulaire au-dessus de la colonne récapitulatif */
body #page-container .gx-checkout .gx-main {
  position: relative;
  z-index: 3;
}

body #page-container .gx-checkout .gx-side {
  z-index: 2;
}

/* La popin Systempay elle-même */
.kr-iframe-modal-wrapper,
.kr-smart-form-modal-wrapper,
.kr-layer-manager,
.kr-layer {
  z-index: 2147483647 !important;
}
/* ---------------------------------------------------------
   4. CHECKOUT MOBILE – récapitulatif de commande en premier
   --------------------------------------------------------- */

@media (max-width: 980px) {
  body #page-container .gx-checkout .et_pb_row:has(.gx-side) {
    display: flex !important;
    flex-direction: column !important;
  }

  body #page-container .gx-checkout .et_pb_row:has(.gx-side) > .et_pb_column {
    width: 100% !important;
    max-width: 100% !important;
  }

  body #page-container .gx-checkout .gx-side {
    order: -1;
    margin-top: 0 !important;
    margin-bottom: 24px !important;
    position: static !important;
  }

  body #page-container .gx-checkout .gx-main {
    order: 1;
  }
}
