/**
 * PANIER - Corrections CSS
 * heleneriu.fr - 2024-12-23
 */

/* ==========================================================================
   LIGNE PRODUIT PANIER
   ========================================================================== */

.cart-items .cart-item {
  padding: 20px 0 !important;
  border-bottom: 1px solid #eee !important;
}

.product-line-grid {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
}

/* Image produit */
.product-line-grid-left {
  flex: 0 0 100px !important;
  max-width: 100px !important;
}

.product-line-grid-left img {
  width: 100% !important;
  height: auto !important;
  border-radius: 8px !important;
}

/* Infos produit (nom, attributs) */
.product-line-grid-body {
  flex: 1 !important;
  min-width: 0 !important;
}

.product-line-grid-body .product-line-info a {
  font-weight: 600 !important;
  color: #333 !important;
  text-decoration: none !important;
  font-size: 15px !important;
}

/* Zone droite (quantité, prix, supprimer) */
.product-line-grid-right {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 20px !important;
  flex: 0 0 auto !important;
}

.product-line-grid-right > .row {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
  margin: 0 !important;
  width: auto !important;
}

.product-line-grid-right .row .row {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
}

/* ==========================================================================
   QUANTITÉ - TOUCHSPIN
   ========================================================================== */

.product-line-grid-right .qty {
  padding: 0 !important;
  width: auto !important;
  flex: none !important;
}

.bootstrap-touchspin {
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid #ddd !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #fff !important;
}

.bootstrap-touchspin .form-control,
.js-cart-line-product-quantity {
  width: 50px !important;
  min-width: 50px !important;
  text-align: center !important;
  border: none !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 8px 5px !important;
  height: auto !important;
  -moz-appearance: textfield !important;
}

.js-cart-line-product-quantity::-webkit-outer-spin-button,
.js-cart-line-product-quantity::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

/* Boutons +/- */
.input-group-btn-vertical {
  display: flex !important;
  flex-direction: column !important;
}

.btn-touchspin {
  width: 32px !important;
  height: 22px !important;
  padding: 0 !important;
  border: none !important;
  background: #f5f5f5 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: background 0.2s !important;
}

.btn-touchspin:hover {
  background: #8b7355 !important;
  color: #fff !important;
}

.btn-touchspin .material-icons {
  font-size: 16px !important;
}

.bootstrap-touchspin-up {
  border-bottom: 1px solid #eee !important;
}

/* Préfixes/suffixes cachés */
.bootstrap-touchspin-prefix,
.bootstrap-touchspin-postfix {
  display: none !important;
}

/* ==========================================================================
   PRIX
   ========================================================================== */

.product-line-grid-right .price {
  padding: 0 !important;
  width: auto !important;
  flex: none !important;
  text-align: right !important;
}

.product-line-grid-right .product-price {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #8b7355 !important;
  white-space: nowrap !important;
}

/* ==========================================================================
   BOUTON SUPPRIMER
   ========================================================================== */

.cart-line-product-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.remove-from-cart {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  background: #fff !important;
  border: 1px solid #e74c3c !important;
  border-radius: 50% !important;
  color: #e74c3c !important;
  transition: all 0.2s !important;
}

.remove-from-cart:hover {
  background: #e74c3c !important;
  color: #fff !important;
}

.remove-from-cart .material-icons {
  font-size: 20px !important;
  float: none !important;
}

/* ==========================================================================
   MOBILE - PANIER
   ========================================================================== */

@media (max-width: 767px) {
  .product-line-grid {
    flex-wrap: wrap !important;
    gap: 12px !important;
  }

  .product-line-grid-left {
    flex: 0 0 80px !important;
    max-width: 80px !important;
  }

  .product-line-grid-body {
    flex: 1 1 calc(100% - 100px) !important;
  }

  .product-line-grid-right {
    width: 100% !important;
    flex: 0 0 100% !important;
    justify-content: space-between !important;
    padding: 12px 0 0 !important;
    border-top: 1px dashed #eee !important;
    margin-top: 5px !important;
  }

  .product-line-grid-right > .row {
    width: 100% !important;
    justify-content: space-between !important;
  }

  .product-line-grid-right .qty,
  .product-line-grid-right .price,
  .product-line-grid-right .col-md-2 {
    width: auto !important;
    flex: none !important;
    max-width: none !important;
  }

  /* Cacher les colonnes vides sur mobile */
  .product-line-grid-right .hidden-md-up {
    display: none !important;
  }

  .bootstrap-touchspin .form-control {
    width: 45px !important;
    min-width: 45px !important;
  }

  .btn-touchspin {
    width: 28px !important;
    height: 20px !important;
  }

  .product-line-grid-right .product-price {
    font-size: 16px !important;
  }

  .remove-from-cart {
    width: 36px !important;
    height: 36px !important;
  }
}

/* ==========================================================================
   RÉSUMÉ PANIER
   ========================================================================== */

.cart-summary {
  background: #faf8f5 !important;
  border-radius: 12px !important;
  padding: 20px !important;
}

.cart-summary-line {
  display: flex !important;
  justify-content: space-between !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid #eee !important;
}

.cart-summary-line:last-child {
  border-bottom: none !important;
}

.cart-summary-line .label {
  color: #666 !important;
}

.cart-summary-line .value {
  font-weight: 600 !important;
  color: #333 !important;
}

.cart-total {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #8b7355 !important;
  padding-top: 15px !important;
  margin-top: 10px !important;
  border-top: 2px solid #8b7355 !important;
}

/* Bouton commander */
.checkout a.btn {
  display: block !important;
  width: 100% !important;
  padding: 15px 20px !important;
  background: #8b7355 !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-align: center !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  transition: all 0.2s !important;
}

.checkout a.btn:hover {
  background: #7a6548 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3) !important;
}
