#cart-btn,
#close-cart,
#overlay {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 998;
}

#overlay.active {
  pointer-events: all;
  opacity: 1;
}

/* Drawer */
#cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 500px;
  height: 100%;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 999;
  display: flex;
  flex-direction: column;
  will-change: transform;
  -webkit-overflow-scrolling: touch;
}

#cart-drawer.active {
  transform: translateX(0);
}



/* Header */
.cart-header {
  display: flex;
  justify-content: space-between;
  padding: 25px;
  font-size: 18px;
  border-bottom: 1px solid #eee;
}

.cart-item-info .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-item-info h3 {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
}

.price {
  font-weight: 600;
}

.summary .line.total {
  border-top: 1px solid #e5e5e5;
  margin-top: 12px;
  padding-top: 12px;
  font-weight: 600;
}

.cart-content {
  padding: 20px;
  flex: 1;              /* 👈 prend tout l’espace dispo */
  overflow-y: auto;     /* 👈 scroll si beaucoup de produits */
  padding: 20px;
}

.quantity {
  display: flex;
  gap: 10px;
  align-items: center;
}

.quantity span {
    width: 35px;
    font-size: 20px;
    text-align: center;
}

.quantity button {
  width: 35px;
  height: 35px;
  border: rgb(180, 180, 180);
  border-width: 2px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  -webkit-appearance: none;
  appearance: none;
  color: inherit;
  background: transparent;
  touch-action: manipulation;
}
.quantity button:hover {
  transform: scale(1.1);
}

.shipping-box {
  margin: 20px;
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 10px;
}

.shipping-sub-box {
  display: flex;
  align-items: center; /* aligne icône + texte verticalement */
  gap: 8px;
}
.shipping-sub-box img{
  height: 30px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #eee;
  border-radius: 10px;
  margin: 10px 0;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4b7f52, #16c72e);
  border-radius: 10px;
  transition: width 0.4s ease;
}

.shipping-box small {
    display: block;
    text-align: end;
    color: #4b7f52;
}
.shipping-box .fr-small {
    display: block;
    text-align: left;
    color: #6f6f6f;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid #eee;
}




.promo-box {
  display: flex;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #eee;
}

.promo-box input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.promo-box button {
  padding: 12px 15px;
  border: none;
  background: #eee;
  cursor: pointer;
  border-radius: 6px;
}

#promo-message {
  padding: 0 20px 10px;
  font-size: 14px;
  color: #4b7f52;
}

.summary {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}

.line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 15px;
}

.tax-info {
    margin-top: 0;
  font-size: 12px;
  color: #777;
}

#shipping {
  color: #000000;
}

#shipping.free {
  color: #4b7f52;
}

/* colonne gauche */
.cart-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cart-item-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

/* droite */
.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}






.checkout-btn {
  position: relative;
  width: 100%;
  padding: 15px;
  background: linear-gradient(105deg, #1a1a1a 0%, #2e2e2e 40%, #111 60%, #2a2a2a 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.checkout-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 10%,
    rgba(255,255,255,0.10) 30%,
    rgba(255,255,255,0.04) 40%,
    rgba(255,255,255,0.10) 55%,
    rgba(255,255,255,0.04) 80%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0s;
  border-radius: 8px;
}

.checkout-btn:hover { transform: scale(1.01); }

.checkout-btn:hover::before {
  transform: translateX(5%);
  transition: transform 0.7s ease;
}

.btn-text {
  background: linear-gradient(180deg, #ffffff 0%, #d5d5d5 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 500;
  letter-spacing: 0.02em;
}


.lock-icon {
  width: 16px;
  height: 16px;
}
.discount-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  padding: 12px;
  border-radius: 10px;
  margin-top: 10px;
    width: 100%;
  margin-top: 10px;
}
.discount-banner.hide{
  display: none;
}

.banner-icon {
  width: 18px;
  margin-top: 2px;
  opacity: 0.7;
}

.banner-title {
  font-size: 13px;
  margin: 0;
  color: #333;
}

.banner-sub {
  font-size: 13px;
  margin: 2px 0 0;
  color: #4b7f52; /* vert subtil comme sur mockup */
}

.cart-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 12px;
  margin-bottom: 15px;
  border: 1px solid #e6e6e6; /* 👈 bord fin */
  border-radius: 12px;       /* 👈 coins arrondis */
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cart-item.removing {
  opacity: 0;
  transform: translateX(20px);
}

/* ligne du haut */
.cart-main {
  display: flex;
  gap: 15px;
}
.cart-item + .cart-item {
  margin-top: 10px;
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}
.close-btn:hover{
    transform: scale(1.1);
}

.close-icon line {
  stroke: #111;
  stroke-width: 3; /* 👈 épaisseur */
  stroke-linecap: round;
}

.close-icon {
  width: 28px;
  height: 28px;
}

.top-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* 👈 important */
}
.top-line p {
  margin: 4px 0;
  font-size: 13px;
  color: #777;
}

.top-line h3 {
  margin: 0;
  padding-top: 10px;
  font-weight: 700;
  line-height: 1.2;
  font-size: 15px;
}

.remove-item {
  align-self: flex-start;
  margin-top: 2px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  -webkit-appearance: none;
  appearance: none;
  color: inherit;
}

.remove-item:hover {
  opacity: .5;
  transform: scale(1.1);
}


.price-box {
    justify-content: flex-end;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.final-price {
  font-weight: 600;
  font-size: 16px;
}

.price-meta {
  font-size: 12px;
  color: #777;
  display: flex;
  gap: 6px;
  align-items: center;
  display: inline;
}

.total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0px;
  font-weight: 600;
}

.price-meta.hide{
    display: none;
}

.cart-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: rgba(0,0,0,0.4);
  font-size: 0.9rem;
}

.old-price {
  text-decoration: line-through;
  opacity: 0.6;
}

.save-amount {
  color: #4b7f52;
  font-size: 15px;
  font-weight: 500;
}

.payment-methods {
  display: flex;
  justify-content: center;   /* centre horizontalement */
  align-items: center;       /* centre verticalement */
  gap: 12px;                 /* espace entre les logos */
  margin-top: 15px;
}

.payment-methods img {
  height: 60px;
  width: auto;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

@media (max-width: 1024px) {
  #cart-drawer {
    left: 0;
    width: auto;
    transition: none;
  }

  #overlay {
    display: none !important;
  }


  .cart-header {
    padding: 10px 16px 0px;
    font-size: 15px;
  }

  .cart-content {
    flex: 0 0 62dvh;
    overflow-y: auto;
    padding: 8px 12px 12px;
  }

  .cart-item {
    padding: 10px;
    gap: 8px;
    margin-bottom: 10px;
  }

  .cart-item-img {
    width: 64px;
    height: 64px;
  }

  .top-line h3 {
    font-size: 13px;
    padding-top: 4px;
  }

  .top-line p {
    font-size: 11px;
  }

  .final-price {
    font-size: 13px;
  }

  .discount-banner {
    padding: 8px;
    gap: 6px;
  }

  .banner-title, .banner-sub {
    font-size: 11px;
  }

  .shipping-box {
    display: none;
  }

  .cart-footer {
    padding: 6px 12px;
    margin-top: auto;
  }

  .summary {
    padding: 8px 10px;
    margin-bottom: 4px;
  }

  .line:not(.total) {
    font-size: 11px;
    margin-bottom: 3px;
    opacity: 0.55;
  }

  .line.total {
    font-size: 14px;
    margin-top: 8px;
    padding-top: 8px;
  }

  .tax-info {
    font-size: 9px;
  }

  .promo-box {
    display: none !important;
  }

  .checkout-btn {
    padding: 10px;
    font-size: 0.9rem;
    margin-top: 4px;
  }

  .payment-methods {
    display: none !important;
  }
}

.payment-methods img:hover {
  opacity: 1;
}

.minus.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

