/* =============================================
   Mini-cart deux panneaux — Etxe Beroi
   ============================================= */

/* Drawer */
.elementor-menu-cart__container .elementor-menu-cart__main {
    width: 780px !important;
    max-width: 96vw !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    overflow: hidden;
}

.elementor-menu-cart__main .widget_shopping_cart_content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Layout */
.eb-split {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    font-family: inherit;
    padding-top: 8px;
}

/* Panneaux */
.eb-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.eb-panel--left {
    width: 42%;
    flex-shrink: 0;
    border-right: 1px solid #e8e8e8;
}

.eb-panel--right {
    flex: 1;
    min-width: 0;
}

/* Header */
.eb-panel__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 28px 24px 20px;
    height: auto;
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
}

.eb-panel__title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2D6A4F;
}

.eb-panel__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #2D6A4F;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

/* Body scrollable */
.eb-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
}

/* Item générique */
.eb-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.eb-item:last-child {
    border-bottom: none;
}

/* Image */
.eb-item__img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8f5f0;
    flex-shrink: 0;
}

.eb-item__img img,
.eb-item__img a img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 0 !important;
}

.eb-item__img a {
    display: block;
    width: 80px;
    height: 80px;
}

/* Infos */
.eb-item__info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.eb-item__name,
.eb-item__name a {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #2D6A4F !important;
    text-decoration: none !important;
    line-height: 1.3;
    white-space: normal;
    display: block;
}

.eb-item__name a:hover {
    color: #1B4332 !important;
}

.eb-item__meta {
    font-size: 13px;
    color: #aaa;
}

.eb-item__price {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.eb-item__price .woocommerce-Price-amount,
.eb-item__price bdi {
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
}

/* Bouton Voir (upsell) */
.eb-item__btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1.5px solid #2D6A4F;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    color: #2D6A4F !important;
    background: transparent;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.eb-item__btn:hover {
    background: #2D6A4F;
    color: #fff !important;
}

/* Actions panier (quantité + supprimer) */
.eb-item__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.eb-qty {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    border: 1.5px solid #d0d0d0 !important;
    border-radius: 50px !important;
    padding: 0 !important;
    background: transparent !important;
    overflow: hidden;
}

.eb-qty__btn {
    all: unset !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    font-weight: 300 !important;
    color: #2D6A4F !important;
    cursor: pointer !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.eb-qty__btn:hover {
    background: #f0fdf4 !important;
    color: #2D6A4F !important;
}

.eb-qty__val {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1a1a1a !important;
    min-width: 24px !important;
    text-align: center !important;
    border-left: 1px solid #d0d0d0 !important;
    border-right: 1px solid #d0d0d0 !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.eb-item__remove {
    font-size: 12px;
    color: #bbb !important;
    text-decoration: none !important;
    line-height: 1;
}

.eb-item__remove:hover {
    color: #e00 !important;
}

/* Footer */
.eb-panel__footer {
    padding: 16px 20px 20px;
    border-top: 1px solid #e8e8e8;
    flex-shrink: 0;
}

.eb-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 14px;
}

/* Bouton Commander */
.eb-checkout {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    background: #2D6A4F !important;
    color: #fff !important;
    border: none !important;
    border-radius: 30px !important;
    padding: 14px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
}

.eb-checkout:hover {
    background: #1B4332 !important;
}

.eb-checkout .elementor-button-text {
    color: #fff !important;
}

/* Lien Voir le panier */
.eb-view-cart {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #2D6A4F !important;
    text-decoration: none !important;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.eb-view-cart:hover {
    color: #1B4332 !important;
    text-decoration: underline !important;
}

/* Vide */
.eb-empty {
    padding: 24px 0;
    font-size: 14px;
    color: #aaa;
    text-align: center;
}

/* Bouton fermer */
.elementor-menu-cart__main > .elementor-menu-cart__close-button,
.elementor-menu-cart__main > .elementor-menu-cart__close-button-custom {
    position: absolute !important;
    top: 28px !important;
    right: 18px !important;
    z-index: 10;
}

/* Compensation barre admin WordPress */
.admin-bar .elementor-menu-cart__container .elementor-menu-cart__main {
    margin-top: 32px !important;
}

@media screen and (max-width: 782px) {
    .admin-bar .elementor-menu-cart__container .elementor-menu-cart__main {
        margin-top: 46px !important;
    }
}



/* ── Barre de progression livraison offerte ──────────────────── */
.eb-free-shipping {
	padding: 12px 20px 14px;
	border-bottom: 1px solid #e8e8e8;
	flex-shrink: 0;
}

.eb-free-shipping__text {
	font-size: 13px;
	color: #666;
	margin: 0 0 8px;
	text-align: center;
	line-height: 1.4;
}

.eb-free-shipping__text strong {
	color: #2D6A4F;
	font-weight: 700;
}

.eb-free-shipping__text--done {
	color: #2D6A4F !important;
	font-weight: 600;
}

.eb-free-shipping__bar {
	width: 100%;
	height: 5px;
	background: #E5E7EB;
	border-radius: 3px;
	overflow: hidden;
}

.eb-free-shipping__fill {
	height: 100%;
	background: linear-gradient(90deg, #40916C, #2D6A4F);
	border-radius: 3px;
	transition: width 0.4s ease;
}

.eb-free-shipping__text--done + .eb-free-shipping__bar .eb-free-shipping__fill {
	background: linear-gradient(90deg, #2D6A4F, #1B4332);
}

/* =============================================
   Mobile — panier plein écran
   ============================================= */

body.eb-cart-open,
html.eb-cart-open {
    overflow: hidden !important;
    height: 100% !important;
    position: fixed !important;
    width: 100% !important;
    touch-action: none !important;
}

@media (max-width: 768px) {

    .elementor-menu-cart__container .elementor-menu-cart__main {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
    }

    .elementor-menu-cart__main .widget_shopping_cart_content {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        height: 100% !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .eb-split {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    /* Aplatir le panneau panier pour réordonner */
    .eb-panel--right {
        display: contents !important;
    }

    .eb-panel--right > .eb-panel__header {
        order: 1 !important;
        flex-shrink: 0 !important;
        width: 100% !important;
    }

    .eb-panel--right > .eb-panel__body {
        order: 2 !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        width: 100% !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .eb-panel--left {
        order: 3 !important;
        width: 100% !important;
        border-right: none !important;
        border-top: 1px solid #e8e8e8 !important;
        flex-shrink: 0 !important;
        max-height: 140px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .eb-panel--right > .eb-panel__footer {
        order: 4 !important;
        flex-shrink: 0 !important;
        width: 100% !important;
        background: #fff !important;
        border-top: 1px solid #e8e8e8 !important;
    }

    /* Upsell : scroll horizontal */
    .eb-panel--left .eb-panel__body {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 8px !important;
        padding: 4px 12px 10px !important;
        scrollbar-width: none !important;
    }

    .eb-panel--left .eb-panel__body::-webkit-scrollbar {
        display: none;
    }

    .eb-panel--left .eb-panel__header {
        padding: 8px 16px 4px !important;
    }

    .eb-panel--left .eb-panel__header .eb-panel__title {
        font-size: 11px !important;
    }

    /* Upsell horizontal compact */
    .eb-panel--left .eb-item {
        display: grid !important;
        grid-template-columns: 60px 1fr auto !important;
        grid-template-rows: auto auto !important;
        align-items: center !important;
        gap: 4px 10px !important;
        width: 220px !important;
        flex-shrink: 0 !important;
        border-bottom: none !important;
        padding: 6px !important;
        background: #fff !important;
        border-radius: 10px !important;
    }

    .eb-panel--left .eb-item__img {
        grid-row: 1 / 3 !important;
        width: 60px !important;
        height: 60px !important;
        border-radius: 8px !important;
    }

    .eb-panel--left .eb-item__img img {
        width: 60px !important;
        height: 60px !important;
        object-fit: cover !important;
    }

    .eb-panel--left .eb-item__info {
        grid-column: 2 !important;
        grid-row: 1 / 3 !important;
        min-width: 0 !important;
    }

    .eb-panel--left .eb-item__name {
        font-size: 12px !important;
        line-height: 1.2 !important;
        font-weight: 700 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .eb-panel--left .eb-item__price {
        font-size: 11px !important;
        color: #888 !important;
    }

    .eb-panel--left .eb-item__btn {
        grid-column: 3 !important;
        grid-row: 1 / 3 !important;
        font-size: 11px !important;
        padding: 6px 12px !important;
    }

    /* Item panier mobile */
    .eb-item--cart {
        display: grid !important;
        grid-template-columns: 80px 1fr !important;
        grid-template-areas:
            "img info"
            "img actions" !important;
        gap: 0 14px !important;
        padding: 16px 0 !important;
        align-items: start !important;
    }

    .eb-item--cart .eb-item__img {
        grid-area: img !important;
        align-self: start !important;
    }

    .eb-item--cart .eb-item__info {
        grid-area: info !important;
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-areas:
            "name price"
            "meta meta" !important;
        gap: 2px 8px !important;
        align-items: start !important;
    }

    .eb-item--cart .eb-item__name { grid-area: name !important; }
    .eb-item--cart .eb-item__price {
        grid-area: price !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
    }
    .eb-item--cart .eb-item__meta { grid-area: meta !important; }

    .eb-item--cart .eb-item__actions {
        grid-area: actions !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-top: 10px !important;
    }

    .eb-panel--right > .eb-panel__body {
        overflow-y: auto !important;
    }
}
