/* ============ CART MODAL ============ */
#blockcart-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #2a2a2a;
}
#blockcart-content a { color: inherit; text-decoration: none; }
#blockcart-content * { box-sizing: border-box; }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}
.cart-header h3 {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: #1a1a1a;
  margin: 0;
}
.cart-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.cart-close:hover { background: #f5f5f0; }
.cart-close svg { width: 18px; height: 18px; }

.added-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: #eaf5ea;
  color: #2d6a2d;
  font-size: 14px;
  border-bottom: 1px solid #d5ead5;
  flex-shrink: 0;
}
.added-banner svg {
  width: 22px; height: 22px;
  background: #2d6a2d;
  color: #fff;
  border-radius: 50%;
  padding: 4px;
  flex-shrink: 0;
}

/* Free shipping gauge */
.shipping-gauge {
  padding: 20px 28px;
  background: #f5f5f0;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}
.shipping-gauge-text {
  font-size: 13px;
  color: #2a2a2a;
  margin-bottom: 12px;
  line-height: 1.5;
}
.shipping-gauge-text .truck-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: -4px;
  margin-right: 6px;
}
.shipping-gauge-text strong { color: #c9a87c; font-weight: 700; }
.shipping-gauge-text .done { color: #2d6a2d; }
.gauge-track {
  height: 8px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}
.gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, #c9a87c, #d9bb8a);
  border-radius: 20px;
  transition: width 0.6s cubic-bezier(.4,.14,.3,1);
}
.gauge-fill.full {
  background: linear-gradient(90deg, #4caf50, #66bb6a);
}
.gauge-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: #6b6b6b;
}

/* Cart content scroll */
.cart-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
.cart-content::-webkit-scrollbar { width: 6px; }
.cart-content::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

ul.cart-products {
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.cart-products li {
  margin: 0;
  padding: 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid #e5e5e5;
  align-items: start;
}
.cart-item-img {
  width: 90px;
  height: 90px;
  background: #f5f5f0;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-item-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cart-item-body .brand-small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #6b6b6b;
  margin-bottom: 2px;
}
.cart-item-title {
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 400;
  color: #1a1a1a;
  margin-bottom: 4px;
  line-height: 1.2;
}
.cart-item-title a { color: inherit; }
.cart-item-variant { font-size: 12px; color: #6b6b6b; margin-bottom: 6px; }
.cart-item-price { font-weight: 700; font-size: 15px; color: #1a1a1a; margin-bottom: 6px; }
.cart-item-price .old { text-decoration: line-through; color: #6b6b6b; font-weight: 400; font-size: 12px; margin-left: 6px; }

.cart-qty {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  width: fit-content;
  background: #fff;
  overflow: hidden;
}
.cart-qty input {
  width: 40px;
  height: 28px;
  border: none;
  text-align: center;
  font-size: 13px;
  background: transparent;
  padding: 0;
  margin: 0;
  -moz-appearance: textfield;
}
.cart-qty input::-webkit-outer-spin-button,
.cart-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.cart-qty input:focus { outline: none; }

.cart-remove {
  font-size: 11px;
  color: #6b6b6b;
  text-decoration: underline;
  align-self: start;
  margin-top: 4px;
  white-space: nowrap;
}
.cart-remove:hover { color: #1a1a1a; }

/* Cross-sell in modal */
.cross-sell {
  padding: 22px 28px;
  background: #fafaf7;
  border-top: 8px solid #f5f5f0;
}
.cross-sell h4 {
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 400;
  color: #1a1a1a;
  margin-bottom: 4px;
}
.cross-sell .sub {
  font-size: 12px;
  color: #6b6b6b;
  margin-bottom: 16px;
}
.cross-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin: 0 -28px;
  padding-left: 28px;
  padding-right: 28px;
  scrollbar-width: thin;
}
.cross-card {
  flex: 0 0 170px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.cross-card:hover { border-color: #1a1a1a; }
.cross-card-img {
  aspect-ratio: 1;
  background: #f5f5f0;
  overflow: hidden;
}
.cross-card-img img { width: 100%; height: 100%; object-fit: cover; }
.cross-card-body { padding: 12px; }
.cross-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
  line-height: 1.3;
}
.cross-card-price {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 10px;
}
.cross-card-price .old {
  text-decoration: line-through;
  color: #6b6b6b;
  font-weight: 400;
  font-size: 11px;
  margin-left: 4px;
}
.cross-add {
  width: 100%;
  padding: 8px;
  border: 1px solid #1a1a1a;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: #fff;
  color: #1a1a1a;
  transition: all 0.15s;
  cursor: pointer;
}
.cross-add:hover { background: #1a1a1a; color: #fff; }
.cross-add.added { background: #2d6a2d; color: #fff; border-color: #2d6a2d; }

/* Cart footer */
.cart-footer {
  border-top: 1px solid #e5e5e5;
  padding: 20px 28px;
  background: #fff;
  flex-shrink: 0;
}
.cart-footer .cart-totals {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.cart-footer .cart-totals .label { font-size: 13px; color: #6b6b6b; font-weight: normal; margin: 0; }
.cart-footer .cart-totals .label small { font-size: 12px; font-weight: 400; color: #6b6b6b; margin-left: 6px; }
.cart-footer .cart-totals .amount { font-size: 22px; font-weight: 700; color: #1a1a1a; }

.cart-cta {
  display: block;
  width: 100%;
  background: #1a1a1a;
  color: #fff;
  padding: 16px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-align: center;
  border: none;
  cursor: pointer;
}
.cart-cta:hover { background: #000; color: #fff; text-decoration: none; }

.cart-continue {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: #6b6b6b;
  text-decoration: underline;
  padding: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.cart-continue:hover { color: #1a1a1a; }

.cart-payments {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 10px;
}
.cart-payments span {
  background: #f5f5f0;
  color: #1a1a1a;
  padding: 4px 8px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* Hide default PS styles that leak */
#blockcart-content .cart-summary-line,
#blockcart-content .cart-detailed-totals,
#blockcart-content .cart-summary-line .label,
#blockcart-content .cart-summary-line .value {
  display: none !important;
}

.shipping-gauge-text svg {
  width: 18px !important;
  height: 18px !important;
  display: inline-block !important;
  vertical-align: -4px !important;
}

.added-banner { animation: mdl-banner-in 0.25s ease-out; }
@keyframes mdl-banner-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.cross-sell[hidden],
.cross-sell.is-empty { display: none; }

/* Fix pour l'image du produit si "cart_default" n'existe pas */
.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* évite de couper si l'image a un ratio différent */
}

/* S'assurer que le conteneur du bouton retirer ne flotte pas bizarrement */
.cart-item {
  position: relative;
}
.cart-remove {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 11px;
  color: #6b6b6b;
  text-decoration: underline;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}
.cart-remove:hover { color: #1a1a1a; }
