/* --- OFFCANVAS CART STYLES (RE-LAB PREMIUM) --- */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(1, 10, 25, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: -500px; /* Offscreen */
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: #ffffff;
    z-index: 10001;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cart-overlay.active .cart-panel {
    right: 0;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px;
    border-bottom: 1px solid #f0f4f8;
}

.cart-header h2 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-header h2 .material-symbols-outlined { color: #0161bb; font-size: 1.8rem; }

.btn-close-cart {
    background: #f4f8ff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0161bb;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-cart:hover {
    background: #0161bb;
    color: #ffffff;
    transform: rotate(90deg);
}

.btn-empty-cart {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4d4d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-empty-cart:hover {
    background: #ffeeee;
    color: #cc0000;
}

.cart-items {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-empty-state {
    text-align: center;
    color: #888;
    margin-top: 50px;
}

.cart-empty-state .material-symbols-outlined {
    font-size: 4rem;
    color: #e0e0e0;
    margin-bottom: 15px;
}

/* CARTE PRODUIT PANIER */
.cart-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f4f8;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: #fcfcfc;
    object-fit: cover;
    border: 1px solid #f0f0f0;
}

.cart-item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-title {
    margin: 0 0 5px;
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.cart-item-code {
    font-size: 0.7rem;
    color: #0161bb;
    font-family: monospace;
    margin-bottom: 5px;
}

.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-item-price {
    font-weight: 800;
    color: #1a1a1a;
}

.cart-qty-controls {
    display: flex;
    align-items: center;
    background: #f4f8ff;
    border-radius: 50px;
    padding: 2px 5px;
}

.cart-qty-controls button {
    background: transparent;
    border: none;
    color: #0161bb;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 50%;
}

.cart-qty-controls button:hover {
    background: #0161bb;
    color: #fff;
}

.cart-qty-value {
    font-weight: 800;
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    color: #1a1a1a;
    width: 20px;
    text-align: center;
}

.btn-remove-item {
    background: transparent;
    border: none;
    color: #ff4d4d;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    transition: all 0.2s ease;
}

.btn-remove-item:hover { color: #cc0000; text-decoration: underline; }

/* FOOTER PANIER */
.cart-footer {
    padding: 30px;
    background: #fcfcfc;
    border-top: 1px solid #f0f4f8;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: #1a1a1a;
}

.btn-checkout {
    display: block;
    width: 100%;
    padding: 18px;
    border: none;
    background: #0161bb;
    color: #ffffff;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    border-radius: 12px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.btn-checkout:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* BOUTON HEADER PANIER */
.btn-header-cart {
    background: transparent;
    border: none;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s ease;
    text-decoration: none;
}

.btn-header-cart:hover { color: #0161bb; }
.btn-header-cart .material-symbols-outlined { font-size: 28px; }

.cart-badge-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #333; /* Gris sombre élégant */
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    font-family: 'Sora', sans-serif;
    width: 18px;
    height: 18px;
    display: none; /* Caché par défaut en JS */
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #fff;
}
