/* Container */
.km-cart-items {
    background: #fff;
    padding-bottom: 35px;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Notice de suppression */
.km-cart-items__notice {
    margin: 12px 20px 0;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.km-cart-items__notice--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.km-cart-items__notice--visible {
    opacity: 1;
    transform: translateY(0);
}

/* En-tetes */
.km-cart-items__header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 40px;
    gap: 16px;
    padding: 12px 20px;
    border-bottom: 1px solid #E5E7EB;
}

.km-cart-items__header-col {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.km-cart-items__header-col--price,
.km-cart-items__header-col--qty,
.km-cart-items__header-col--subtotal {
    text-align: center;
}

/* Ligne article */
.km-cart-items__row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 40px;
    gap: 16px;
    align-items: center;
    padding: 5px 20px;
    border-bottom: 1px solid #f3f4f6;
}

/* Produit (image + infos) */
.km-cart-items__product {
    display: flex;
    align-items: center;
    gap: 16px;
}

.km-cart-items__thumbnail {
    flex-shrink: 0;
}

.km-cart-items__thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
}

.km-cart-items__product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.km-cart-items__product-name {
    font-size: 15px;
    font-weight: 700;
    color: #494949;
    text-decoration: none;
    line-height: 1.3;
}

.km-cart-items__product-name:hover {
    color: #BE9E66;
}

.km-cart-items__product-attrs {
    font-size: 13px;
    font-weight: 400;
    color: rgba(73, 73, 73, 0.6);
    line-height: 1.3;
}

/* Prix */
.km-cart-items__price {
    font-size: 15px;
    font-weight: 700;
    color: #262626;
    text-align: center;
}

.km-cart-items__price del {
    color: #9ca3af;
    font-weight: 400;
    font-size: 13px;
    display: block;
}

.km-cart-items__price ins {
    text-decoration: none;
}

/* Quantite */
.km-cart-items__qty {
    display: flex;
    justify-content: center;
}

.km-cart-items__qty-controls {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.km-cart-items__qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.15s ease;
    padding: 0;
}

.km-cart-items__qty-btn:hover {
    color: #262626;
}

.km-cart-items__qty-btn--minus {
    border-right: 1px solid #e5e7eb;
}

.km-cart-items__qty-btn--plus {
    border-left: 1px solid #e5e7eb;
}

input[type="number"].km-cart-items__qty-input {
    width: 40px;
    height: 32px;
    text-align: center;
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 700;
    color: #262626;
    outline: none;
    background: none;
    transition: none;
    -moz-appearance: textfield;
    -webkit-appearance: none;
}

input[type="number"].km-cart-items__qty-input::-webkit-inner-spin-button,
input[type="number"].km-cart-items__qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Sous-total */
.km-cart-items__subtotal {
    font-size: 15px;
    font-weight: 700;
    color: #262626;
    text-align: center;
}

.km-cart-items__subtotal del {
    color: #9ca3af;
    font-weight: 400;
    font-size: 13px;
    display: block;
}

.km-cart-items__subtotal ins {
    text-decoration: none;
}

/* Bouton supprimer */
.km-cart-items__remove {
    display: flex;
    justify-content: center;
}

.km-cart-items__remove-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #9ca3af;
    transition: all 0.2s ease;
    text-decoration: none;
}

.km-cart-items__remove-btn:hover {
    background: #fef2f2;
    color: #ef4444;
}

/* Groupe Big Bag */
.km-cart-items__group--big-bag {
    outline: 1.5px solid #CAAA75;
    outline-offset: -1.5px;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 20px 8px;
}

.km-cart-items__group--big-bag .km-cart-items__row {
    padding-left: 10px;
    padding-right: 10px;
}

.km-cart-items__group--big-bag .km-cart-items__row:last-of-type {
    border-bottom: none;
    padding-bottom: 16px;
}

/* Banniere Big Bag */
.km-cart-items__banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(180deg, #CAAA75 0%, #D4B380 100%);
    color: #fff;
    padding: 0px 8px;
    border-radius: 10px 0 10px 0;
    font-size: 13px;
    width: fit-content;
    font-weight: 600;
    position: relative;
    top: 0px
}

.km-cart-items__banner svg {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 6px;
}

/* Actions */
.km-cart-items__actions {
    display: flex;
    justify-content: flex-end;
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
    margin-bottom: -35px;
}

.km-cart-items__clear-cart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #BE9E66;
    font-size: 14px;
    text-decoration: underline;
    transition: color 0.2s;
}

.km-cart-items__clear-cart:hover {
    color: #a88a55;
}

/* Panier vide - Masquer tous les autres widgets et le titre de page */
body.km-cart-empty .km-cart-steps-wrapper,
body.km-cart-empty .km-cart-summary,
body.km-cart-empty .km-cart-cta__pro,
body.km-cart-empty .km-cart-cta__newsletter,
body.km-cart-empty .km-cross-sells,
body.km-cart-empty .elementor-widget-heading,
body.km-cart-empty .entry-title,
body.km-cart-empty .page-title {
    display: none !important;
}

/* Masquer les conteneurs Elementor parents vides (colonne droite, etc.) */
body.km-cart-empty .e-con:not(:has(.km-cart-items--empty)):has(.km-cart-summary),
body.km-cart-empty .e-con:not(:has(.km-cart-items--empty)):has(.km-cart-steps-wrapper),
body.km-cart-empty .elementor-column:not(:has(.km-cart-items--empty)):has(.km-cart-summary) {
    display: none !important;
}

/* Étendre la colonne contenant le panier vide sur toute la largeur */
body.km-cart-empty .e-con:has(.km-cart-items--empty) {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
}

.km-cart-items--empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    min-height: 60vh;
    box-shadow: none;
    background: transparent;
}

.km-cart-items__empty-icon {
    color: #BE9E66;
    margin-bottom: 28px;
    opacity: 0.85;
}

.km-cart-items__empty-icon svg {
    width: 250px;
    height: 250px;
}

.km-cart-items__empty-message {
    font-family: 'Arca Majora 3', Lato, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #262626;
    margin-bottom: 8px;
}

.km-cart-items__empty-submessage {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 32px;
    max-width: 400px;
}

.km-cart-items__continue-shopping {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    background: linear-gradient(180deg, #D4B380 0%, #BE9E66 100%);
    color: #fff;
    border-radius: 14px;
    font-family: 'Arca Majora 3', Lato, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
    box-shadow: 0 2px 8px rgba(190, 158, 102, 0.3);
}

.km-cart-items__continue-shopping:hover {
    opacity: 0.9;
    color: #fff;
}

/* Mobile */
@media (max-width: 1200px) {
    .km-cart-items {
        padding-top: 10px;
    }

    .km-cart-items__header {
        display: none;
    }

    .km-cart-items__row {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
        padding: 5px 20px;
        position: relative;
    }

    .km-cart-items__product {
        width: 100%;
        margin-bottom: 12px;
        padding-right: 36px;
    }

    .km-cart-items__thumbnail img {
        width: 76px;
        height: 76px;
    }

    .km-cart-items__price {
        display: none;
    }

    .km-cart-items__qty {
        width: auto;
        justify-content: flex-start;
        margin-right: 16px;
    }

    .km-cart-items__qty::before {
        display: none;
    }

    .km-cart-items__subtotal {
        text-align: right;
        flex: 1;
    }

    .km-cart-items__subtotal::before {
        display: none;
    }

    .km-cart-items__remove {
        position: absolute;
        top: 16px;
        right: 20px;
    }

    .km-cart-items__group--big-bag {
        margin: 10px 14px 8px;
    }

    .km-cart-items__banner {
        font-size: 13px;
        padding: 5px 14px;
    }

    .km-cart-items--empty {
        padding: 48px 16px;
    }

    .km-cart-items__empty-icon svg {
        width: 200px;
        height: 200px;
    }
}