/* Overlay (fond sombre flouté) */
.cart-drawer-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.4) !important;
 /* backdrop-filter: blur(4px);*/
  z-index: 99998 !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
   font-family: 'Century Gothic', 'Futura', 'Montserrat', sans-serif;
}

.cart-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Panneau Drawer */
.cart-drawer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: #ffffff !important;
  z-index: 99999 !important;
  display: flex !important;
  flex-direction: column !important;
  transform: translateX(100%) !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.08);
}

/* Largeur sur PC (50%) */
@media (min-width: 768px) {
  .cart-drawer {
    width: 50vw !important;
    max-width: 600px !important;
  }
}

.cart-drawer.active {
  transform: translateX(0) !important;
}

/* En-tête du drawer */
.cart-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
 /* border-bottom: 1px solid #f2f2f2;*/
}

.cart-drawer-header h2 {
  font-family: 'Century Gothic', 'Futura', 'Montserrat', sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
  color: #111;
}

.cart-drawer-close {
  background: none;
  border: none;
  font-size: 2rem;
  font-weight: 300;
  cursor: pointer;
  color: #111;
  line-height: 1;
  padding: 0;
}

/* Corps du drawer */
.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
}

.cart-empty-msg {
  text-align: center;
  margin-top: 60px;
  color: #888;
  font-size: 0.95rem;
}

.cart-drawer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cart-drawer-item {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #f8f8f8;
}

.cart-item-img {
  width: 80px;
  height: 100px;
  flex-shrink: 0;
  background: #fafafa;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cart-item-title {
  color: #111;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.cart-item-meta {
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 6px;
}

.cart-item-price {
  font-size: 0.8rem;
  color: #111;
  margin-bottom: 10px;
}

.cart-total-price,
.spancart-item-price
{
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}


/* Actions Quantité */

/* Conteneur principal */
.cart-item-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px;
    margin-top: 10px;
}

/* Bloc encadré unifié */
.cart-qty-box {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    border: 1px solid #E5E5E5;
    background: #FFFFFF;
    height: 32px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    overflow: hidden !important;
}



/* Boutons - et + */
.cart-qty-box .btn-qty {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    width: 32px;
    height: 100%;
    cursor: pointer;
    font-size: 15px;
    font-weight: 300;
    color: #1A1A1A !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    border-radius: 0 !important;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
    .cart-qty-box:hover {
        border-color: #1A1A1A;
    }

    .cart-qty-box .btn-qty:hover {
        background-color: #FAF9F6 !important;
    }
}

.cart-qty-box .btn-qty:focus,
.cart-qty-box .btn-qty:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Valeur centrale (chiffre) */
.cart-qty-box .qty-val {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 100%;
    border-left: 1px solid #F0F0F0;
    border-right: 1px solid #F0F0F0;
    font-size: 13px;
    font-weight: 500;
    color: #1A1A1A;
    margin: 0;
    padding: 0;
}
/* Alerte stock max */
.cart-qty-box .alertestock {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 8px;
    border-left: 1px solid #F0F0F0;
    color: #9E2A2B;
    font-size: 0.68rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Bouton Supprimer */
.cart-item-actions .btn-remove {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    color: #999999;
    font-size: 0.75rem;
    text-decoration: underline;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
}

.cart-item-actions .btn-remove:hover {
    color: #1A1A1A;
}


/* Pied du drawer */
.cart-drawer-footer {
  padding: 24px 32px;
  border-top: 1px solid #f2f2f2;
  background: #fff;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.btn-validate-cart,
.btn-checkout {
  display: block;
  width: 100%;
  padding: 16px;
  background: #111;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cart-legal-note {
  font-size: 0.75rem;
  color: #888;
  text-align: center;
  margin-top: 10px;
}

.btn-login-switch {
    display: block;
    width: 100%;
    background: transparent;
    color: #000;
    text-align: center;
    padding: 10px 0;
    margin-top: 8px;
    border: none;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-decoration: underline;
    cursor: pointer;
    text-transform: uppercase;
}

/* Reset global et gestion de l'état actif/clic des boutons + et - */
.cart-qty-box .btn-qty,
.cart-qty-box .btn-qty:focus,
.cart-qty-box .btn-qty:active,
.cart-qty-box .btn-qty:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* Neutralise la bordure Firefox au focus */
.cart-qty-box .btn-qty::-moz-focus-inner {
    border: 0 !important;
}

/* Effet survol uniquement sur PC (évite le fond grisé bloqué sur smartphone) */
@media (hover: hover) {
    .cart-qty-box .btn-qty:hover {
        background-color: #FAF9F6 !important;
    }
}

@media (max-width: 768px) {
    .cart-drawer-body {
      padding: 24px 24px;
    }

    /* On passe la boîte globale à 44px de hauteur */
    .cart-qty-box {
        height: 44px !important;
    }

    /* Les boutons font désormais 44x44px (taille standard tactile) */
    .cart-qty-box .btn-qty {
        width: 44px !important;
        height: 44px !important;
        font-size: 18px !important; /* Symbole + et - plus visible */
    }

    /* Ajustement de la case centrale pour rester proportionnée */
    .cart-qty-box .qty-val {
        width: 40px !important;
        height: 44px !important;
        font-size: 15px !important;
    }

    /* Ajustement du texte d'alerte s'il apparaît */
    .cart-qty-box .alertestock {
        font-size: 0.72rem !important;
        padding: 0 10px !important;
    }
    
    /* On agrandit aussi la zone de clic du bouton Supprimer */
    .cart-item-actions .btn-remove {
        padding: 10px 0 !important; /* Agrandit la zone tactile sans changer visuellement le texte */
        font-size: 0.85rem !important;
    }
}