/**
 * Page panier WooCommerce - Styles thème Châteaux France
 * Remplace le CSS personnalisé Elementor (à supprimer du bloc panier).
 */

/* Limiter la largeur du panier et du bloc cross-sell (pas toute la largeur écran) */
.woocommerce-cart .woocommerce,
.woocommerce-cart .e-cart__container,
.woocommerce-cart .ikn-cart-cross-sell-wrapper {
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}
.woocommerce-cart .woocommerce {
  padding-left: 20px;
  padding-right: 20px;
}
.woocommerce-cart .ikn-cart-cross-sell-wrapper {
  padding: 0 20px;
  margin-top: 24px;
}

/* Conteneur principal du panier */
.woocommerce-cart .woocommerce,
.woocommerce-cart .e-cart__container .woocommerce {
  background: #f9f9f7;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
  font-family: 'Segoe UI', sans-serif;
}

/* Tableau du panier */
.woocommerce-cart .woocommerce table.shop_table,
.woocommerce-cart .e-cart__container .woocommerce table.shop_table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
}

.woocommerce-cart .woocommerce table.shop_table thead,
.woocommerce-cart .e-cart__container .woocommerce table.shop_table thead {
  background-color: #e6efe3;
  color: #334d33;
  font-weight: 600;
}

.woocommerce-cart .woocommerce table.shop_table th,
.woocommerce-cart .woocommerce table.shop_table td,
.woocommerce-cart .e-cart__container .woocommerce table.shop_table th,
.woocommerce-cart .e-cart__container .woocommerce table.shop_table td {
  padding: 14px;
  border: none;
  text-align: left;
  vertical-align: middle;
}

.woocommerce-cart .woocommerce table.shop_table td,
.woocommerce-cart .e-cart__container .woocommerce table.shop_table td {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Miniatures */
.woocommerce-cart .woocommerce .product-thumbnail img,
.woocommerce-cart .e-cart__container .woocommerce .product-thumbnail img {
  border-radius: 10px;
  width: 100px;
  height: auto;
}

/* Bouton supprimer */
.woocommerce-cart .woocommerce .product-remove a.remove,
.woocommerce-cart .e-cart__container .woocommerce .product-remove a.remove {
  color: #ba3535;
  font-size: 20px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.woocommerce-cart .woocommerce .product-remove a.remove:hover,
.woocommerce-cart .e-cart__container .woocommerce .product-remove a.remove:hover {
  color: #ff4444;
}

/* Noms des produits */
.woocommerce-cart .woocommerce .product-name a,
.woocommerce-cart .e-cart__container .woocommerce .product-name a {
  color: #334d33;
  font-weight: 600;
  text-decoration: none;
}

.woocommerce-cart .woocommerce .product-name a:hover,
.woocommerce-cart .e-cart__container .woocommerce .product-name a:hover {
  text-decoration: underline;
}

/* Quantité */
.woocommerce-cart .woocommerce .product-quantity input,
.woocommerce-cart .e-cart__container .woocommerce .product-quantity input {
  border-radius: 8px;
  border: 1px solid #ccc;
  padding: 6px;
  background-color: #f4f7f3;
  width: 60px;
  text-align: center;
}

/* Sous-total et total */
.woocommerce-cart .woocommerce .cart_totals th,
.woocommerce-cart .woocommerce .cart_totals td,
.woocommerce-cart .e-cart__container .woocommerce .cart_totals th,
.woocommerce-cart .e-cart__container .woocommerce .cart_totals td {
  padding: 12px;
  font-size: 16px;
}

.woocommerce-cart .woocommerce .order-total td,
.woocommerce-cart .e-cart__container .woocommerce .order-total td {
  font-weight: bold;
  font-size: 18px;
  color: #334d33;
}

/* Livraison */
.woocommerce-cart .woocommerce .woocommerce-shipping-totals,
.woocommerce-cart .e-cart__container .woocommerce .woocommerce-shipping-totals {
  margin-top: 20px;
  background-color: #f6f9f3;
  border-radius: 12px;
  padding: 15px;
  font-size: 14px;
  color: #444;
}

/* Code promo */
.woocommerce-cart .woocommerce .coupon input.input-text,
.woocommerce-cart .e-cart__container .woocommerce .coupon input.input-text {
  border-radius: 8px;
  border: 1px solid #ccc;
  padding: 10px;
  background-color: #fafafa;
  width: 200px;
  margin-right: 10px;
}

.woocommerce-cart .woocommerce .coupon button.button,
.woocommerce-cart .e-cart__container .woocommerce .coupon button.button {
  background-color: #8BA981;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.woocommerce-cart .woocommerce .coupon button.button:hover,
.woocommerce-cart .e-cart__container .woocommerce .coupon button.button:hover {
  background-color: #66835C;
}

/* Bouton "Passer à la commande" */
.woocommerce-cart .woocommerce .checkout-button.button.alt.wc-forward,
.woocommerce-cart .e-cart__container .woocommerce .checkout-button.button.alt.wc-forward {
  background-color: #8BA981;
  color: #fff !important;
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none !important;
  box-shadow: none;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.woocommerce-cart .woocommerce .checkout-button.button.alt.wc-forward:hover,
.woocommerce-cart .e-cart__container .woocommerce .checkout-button.button.alt.wc-forward:hover {
  background-color: #66835C;
  color: #fff !important;
  text-decoration: none !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-cart .e-cart__container .wc-proceed-to-checkout a.checkout-button:hover {
  background-color: #4c6547;
}

/* Boutons principaux WooCommerce (panier) */
.woocommerce-cart .woocommerce a.button,
.woocommerce-cart .woocommerce button.button,
.woocommerce-cart .woocommerce input.button,
.woocommerce-cart .woocommerce-cart-form .actions .button,
.woocommerce-cart .e-cart__container .woocommerce a.button,
.woocommerce-cart .e-cart__container .woocommerce button.button,
.woocommerce-cart .e-cart__container .woocommerce input.button,
.woocommerce-cart .e-cart__container .woocommerce-cart-form .actions .button {
  background-color: #8BA981;
  color: #fff !important;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 600;
  text-transform: none;
  box-shadow: none;
  transition: background-color 0.3s ease;
  font-size: 15px;
}

.woocommerce-cart .woocommerce a.button:hover,
.woocommerce-cart .woocommerce button.button:hover,
.woocommerce-cart .woocommerce input.button:hover,
.woocommerce-cart .woocommerce-cart-form .actions .button:hover,
.woocommerce-cart .e-cart__container .woocommerce a.button:hover,
.woocommerce-cart .e-cart__container .woocommerce button.button:hover,
.woocommerce-cart .e-cart__container .woocommerce input.button:hover,
.woocommerce-cart .e-cart__container .woocommerce-cart-form .actions .button:hover {
  background-color: #66835C;
}

/* Bouton désactivé */
.woocommerce-cart .woocommerce-cart-form .actions .button[disabled],
.woocommerce-cart .woocommerce-cart-form .actions .button:disabled,
.woocommerce-cart .e-cart__container .woocommerce-cart-form .actions .button[disabled],
.woocommerce-cart .e-cart__container .woocommerce-cart-form .actions .button:disabled {
  background-color: #d2d2d2 !important;
  color: #999 !important;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Liens et messages */
.woocommerce-cart .woocommerce a,
.woocommerce-cart .woocommerce .woocommerce-info,
.woocommerce-cart .woocommerce .woocommerce-message,
.woocommerce-cart .e-cart__container .woocommerce a,
.woocommerce-cart .e-cart__container .woocommerce .woocommerce-info,
.woocommerce-cart .e-cart__container .woocommerce .woocommerce-message {
  color: #334d33;
}

.woocommerce-cart .woocommerce a:hover,
.woocommerce-cart .e-cart__container .woocommerce a:hover {
  color: #66835C;
  text-decoration: underline;
}

/* Lien nom de produit */
.woocommerce-cart .woocommerce td.product-name a,
.woocommerce-cart .e-cart__container .woocommerce td.product-name a {
  color: #66835C !important;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.woocommerce-cart .woocommerce td.product-name a:hover,
.woocommerce-cart .e-cart__container .woocommerce td.product-name a:hover {
  color: #4e6846 !important;
  text-decoration: none;
}

/* Lien "Calculer les frais d'expédition" */
.woocommerce-cart .woocommerce .shipping-calculator-button,
.woocommerce-cart .e-cart__container .woocommerce .shipping-calculator-button {
  color: #66835C !important;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

.woocommerce-cart .woocommerce .shipping-calculator-button:hover,
.woocommerce-cart .e-cart__container .woocommerce .shipping-calculator-button:hover {
  color: #4e6846 !important;
  text-decoration: none;
}

/* Champs formulaire adresse de livraison */
.woocommerce-cart .woocommerce .shipping-calculator-form input[type="text"],
.woocommerce-cart .woocommerce .shipping-calculator-form select,
.woocommerce-cart .e-cart__container .woocommerce .shipping-calculator-form input[type="text"],
.woocommerce-cart .e-cart__container .woocommerce .shipping-calculator-form select {
  width: 100%;
  padding: 10px 12px;
  margin-top: 2px;
  margin-bottom: 2px;
  font-size: 14px;
  border: 1px solid #ccc !important;
  border-radius: 8px;
  background-color: #f9f9f9 !important;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.woocommerce-cart .woocommerce .shipping-calculator-form input[type="text"]:focus,
.woocommerce-cart .woocommerce .shipping-calculator-form select:focus,
.woocommerce-cart .e-cart__container .woocommerce .shipping-calculator-form input[type="text"]:focus,
.woocommerce-cart .e-cart__container .woocommerce .shipping-calculator-form select:focus {
  border-color: #8BA981;
  background-color: #fff;
  outline: none;
}

/* Form-row (réduire marges, supprimer pseudo-éléments) */
.woocommerce-cart .woocommerce .form-row::before,
.woocommerce-cart .e-cart__container .woocommerce .form-row::before {
  display: none !important;
  content: none !important;
}

.woocommerce-cart .woocommerce .form-row,
.woocommerce-cart .e-cart__container .woocommerce .form-row {
  margin-bottom: 0 !important;
  padding: 0 !important;
}

/* Select2 (pays / région) */
.woocommerce-cart .select2-selection,
.woocommerce-cart .e-cart__container .select2-selection {
  background-color: #ffffff !important;
  border: 1px solid #ccd5c1 !important;
  border-radius: 8px !important;
  height: 45px !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  color: #333 !important;
  transition: all 0.2s ease !important;
}

.woocommerce-cart .select2-selection .select2-selection__rendered {
  color: #2a3b1d !important;
  line-height: 24px !important;
  padding-left: 5px !important;
}

.woocommerce-cart .select2-selection__arrow {
  height: 100% !important;
  right: 10px !important;
}

.woocommerce-cart .select2-container--focus .select2-selection,
.woocommerce-cart .e-cart__container .select2-container--focus .select2-selection {
  border-color: #9fbe88 !important;
  box-shadow: 0 0 0 2px rgba(159, 190, 136, 0.2) !important;
}

.select2-container--open {
  z-index: 9999 !important;
}

.select2-dropdown {
  z-index: 9999 !important;
}

/* Responsive */
@media (max-width: 768px) {
  .woocommerce-cart .woocommerce table.shop_table th,
  .woocommerce-cart .woocommerce table.shop_table td,
  .woocommerce-cart .e-cart__container .woocommerce table.shop_table th,
  .woocommerce-cart .e-cart__container .woocommerce table.shop_table td {
    padding: 10px 8px;
    font-size: 14px;
  }

  .woocommerce-cart .woocommerce .product-thumbnail img,
  .woocommerce-cart .e-cart__container .woocommerce .product-thumbnail img {
    width: 70px;
  }

  .woocommerce-cart .woocommerce .coupon input.input-text,
  .woocommerce-cart .e-cart__container .woocommerce .coupon input.input-text {
    width: 100%;
    margin-bottom: 10px;
  }

  .woocommerce-cart .woocommerce .coupon,
  .woocommerce-cart .e-cart__container .woocommerce .coupon {
    display: flex;
    flex-direction: column;
  }
}

/* ========== Vente croisée (store_cross_sell) - mêmes titres et boutons que le panier ========== */
.woocommerce-cart .store-cross-sell-container {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 25px;
  background: #f9f9f7;
  border-radius: 16px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid #dee2e6;
}
.woocommerce-cart .store-cross-sell-header {
  text-align: center;
  margin-bottom: 25px;
}
.woocommerce-cart .store-cross-sell-title {
  color: #334d33;
  font-size: 1.5em;
  font-weight: 700;
  margin-bottom: 8px;
}
.woocommerce-cart .store-cross-sell-subtitle {
  color: #6c757d;
  font-size: 0.95em;
  margin: 0;
}
.woocommerce-cart .store-cross-sell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.woocommerce-cart .store-cross-sell-grid.products-count-1,
.woocommerce-cart .store-cross-sell-grid.products-count-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-content: center;
}
.woocommerce-cart .store-cross-sell-product {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}
.woocommerce-cart .store-cross-sell-product:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}
.woocommerce-cart .store-cross-sell-product-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
}
.woocommerce-cart .store-cross-sell-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.woocommerce-cart .store-cross-sell-product:hover .store-cross-sell-product-image img {
  transform: scale(1.05);
}
.woocommerce-cart .store-cross-sell-product-content {
  padding: 18px;
}
.woocommerce-cart .store-cross-sell-product-vendor {
  font-size: 0.85em;
  color: #49714b;
  font-weight: 600;
  margin: 0 0 6px 0;
}
.woocommerce-cart .store-cross-sell-product-title {
  font-size: 1.05em;
  font-weight: 600;
  color: #334d33;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Surcharge Elementor (.woocommerce a { color: #5bc0de }) pour garder les couleurs thème */
.woocommerce-cart .store-cross-sell-product-title a,
.woocommerce-cart .ikn-cart-cross-sell-wrapper .store-cross-sell-product-title a {
  color: #334d33 !important;
  text-decoration: none;
}
.woocommerce-cart .store-cross-sell-product-title a:hover,
.woocommerce-cart .ikn-cart-cross-sell-wrapper .store-cross-sell-product-title a:hover {
  color: #66835C !important;
}
.woocommerce-cart .store-cross-sell-product-price {
  font-size: 1.1em;
  font-weight: 700;
  color: #49714b;
  margin-bottom: 12px;
}
.woocommerce-cart .store-cross-sell-product-price .woocommerce-Price-amount,
.woocommerce-cart .store-cross-sell-product-price .woocommerce-Price-currencySymbol,
.woocommerce-cart .store-cross-sell-product-price bdi {
  color: #49714b !important;
}
.woocommerce-cart .store-cross-sell-view-product {
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  background-color: #8BA981;
  color: #fff !important;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none !important;
  transition: background-color 0.3s ease;
}
.woocommerce-cart .store-cross-sell-view-product:hover {
  background-color: #66835C;
  color: #fff !important;
  text-decoration: none !important;
}
@media (max-width: 768px) {
  .woocommerce-cart .store-cross-sell-grid {
    grid-template-columns: 1fr;
  }
  .woocommerce-cart .store-cross-sell-grid.products-count-1,
  .woocommerce-cart .store-cross-sell-grid.products-count-2 {
    grid-template-columns: 1fr;
  }
}
