/* ==============================================================================
   TIROIR LATÉRAL PANIER (PERSISTANT) & DÉCLENCHEURS MARKETING
   ============================================================================== */

/* Voile d'arrière-plan */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 18, 20, 0.45);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Tiroir coulissant droit */
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 440px;
    background: var(--bg-surface);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.15);
}

.cart-drawer.active {
    transform: translateX(0);
}

/* En-tête du tiroir */
.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    border-bottom: 1px solid var(--border-subtle);
}

.cart-drawer-header h3 {
    font-size: 1.4rem;
}

.cart-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.cart-close-btn:hover {
    background: var(--bg-surface-alt);
    color: var(--text-main);
}

/* Jauge de livraison offerte */
.shipping-progress-banner {
    background: var(--gold-light);
    border-bottom: 1px solid var(--gold-border);
    padding: 14px 28px;
}

.shipping-progress-text {
    font-size: 0.84rem;
    color: #8C6A12;
    font-weight: 500;
    margin-bottom: 8px;
}

.shipping-progress-track {
    height: 5px;
    background: rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.shipping-progress-fill {
    height: 100%;
    background: var(--gold-gradient);
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

/* Corps déroulant du panier */
.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 28px;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Article du Panier */
.cart-item-row {
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.cart-item-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-surface-alt);
    flex-shrink: 0;
}

.cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--text-main);
}

.cart-item-variant {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.cart-qty-pill {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: var(--bg-surface-alt);
}

.cart-qty-pill button {
    border: none;
    background: none;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cart-qty-pill span {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0 4px;
}

.cart-item-price {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

/* État panier vide */
.cart-empty-state {
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
}

.cart-empty-state svg {
    margin: 0 auto 16px;
    color: var(--text-light);
}

/* Capture Marketing de l'Email pour Paniers Abandonnés */
.cart-email-capture-box {
    background: var(--bg-surface-alt);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-top: 20px;
    border: 1px dashed var(--border-color);
}

.cart-email-capture-box label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.cart-email-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    background: #FFF;
}

.cart-email-input:focus {
    border-color: var(--gold-primary);
}

/* Pied du tiroir */
.cart-drawer-footer {
    padding: 22px 28px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 18px;
}

.cart-total-label {
    font-size: 1.05rem;
    font-weight: 600;
}

.cart-total-price {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-main);
}

.btn-checkout {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
}
