/* ==========================================================
 *  a4w_productbundle — Front-office styles
 *  "Souvent achetés ensemble" block
 * ========================================================== */

.a4w-bundle-container {
    border: 1px solid #f0b8c8;
    border-radius: 12px;
    padding: 32px;
    margin: 30px 0;
    background: #fff;
}

.a4w-bundle-title {
    font-size: var(--font-size-h2);
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    text-transform: math-auto;
}

/* --- Layout: products + summary side by side --- */

.a4w-bundle-content {
    display: flex;
    align-items: stretch;
    gap: 0;
}

/* --- Products area --- */

.a4w-bundle-products {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0%;
    gap: 0;
    padding-right: 24px;
}

/* --- Single product card --- */

.a4w-bundle-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1 1 0%;
    max-width: 200px;
    position: relative;
    padding: 8px;
}

.a4w-bundle-product-image {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.a4w-bundle-img {
    width: 100%;
    max-width: 150px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 6px;
    transition: opacity 0.2s ease;
}

.a4w-bundle-product-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

a.a4w-bundle-product-image {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 10px;
}

a.a4w-bundle-product-name {
    color: #3d1a0e;
    text-decoration: none;
}

a.a4w-bundle-product-name:hover {
    text-decoration: underline;
}

.a4w-bundle-product-name {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #3d1a0e;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2em;
}

.a4w-bundle-product-price {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a1a1a;
}

/* --- Checkbox --- */

.a4w-bundle-product-check {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 2;
}

.a4w-bundle-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #f5c6d0;
    cursor: pointer;
}

.a4w-bundle-associated {
    position: relative;
}

/* Unchecked product: dimmed */
.a4w-bundle-associated.a4w-bundle-unchecked {
    opacity: 0.35;
}
.a4w-bundle-associated.a4w-bundle-unchecked .a4w-bundle-product-check {
    opacity: 1;
    pointer-events: auto;
}
.a4w-bundle-associated.a4w-bundle-unchecked .a4w-bundle-product-image,
.a4w-bundle-associated.a4w-bundle-unchecked .a4w-bundle-product-info {
    pointer-events: none;
}

/* --- Combination select --- */

.a4w-bundle-combination-select {
    font-size: 0.75rem;
    width: 100%;
    border: 1px solid #e0d0d5;
    border-radius: 6px;
    padding: 5px 8px;
    margin-top: 6px;
    background: #fff;
    color: #3d1a0e;
    appearance: auto;
}

.a4w-bundle-combination-select option[disabled] {
    color: #aaa;
}

/* --- Separator + --- */

.a4w-bundle-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #3d1a0e;
    flex: 0 0 32px;
    align-self: center;
}

/* --- Summary / total column --- */

.a4w-bundle-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 200px;
    padding: 20px 24px;
    gap: 14px;
    border-left: 1px solid #f0e0e6;
}

.a4w-bundle-total {
    text-align: center;
}

.a4w-bundle-total-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #3d1a0e;
    margin-bottom: 4px;
}

.a4w-bundle-total-price {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* --- Add-to-cart button --- */

.a4w-bundle-add-to-cart {
    background: #f5c6d0;
    color: #3d1a0e;
    border-radius: 8px;
    border: none;
    padding: 12px 28px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    width: 100%;
    letter-spacing: 0.03em;
}

.a4w-bundle-add-to-cart:hover {
    background: #edafc0;
}

.a4w-bundle-add-to-cart.a4w-bundle-loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

/* --- Fine-print mention --- */

.a4w-bundle-mention {
    font-size: 0.7rem;
    color: #999;
    margin: 0;
    font-style: italic;
    text-align: center;
    line-height: 1.4;
}

/* ==========================================================
 *  Responsive — tablet
 * ========================================================== */

@media (max-width: 991px) {
    .a4w-bundle-summary {
        flex: 0 0 180px;
        padding: 16px;
    }

    .a4w-bundle-product {
        max-width: 160px;
    }

    .a4w-bundle-img {
        max-width: 120px;
    }
}

/* ==========================================================
 *  Responsive — mobile : vertical list
 * ========================================================== */

@media (max-width: 767px) {
    .a4w-bundle-container {
        padding: 20px 16px;
    }

    .a4w-bundle-content {
        flex-direction: column;
        align-items: stretch;
    }

    .a4w-bundle-products {
        flex-direction: column;
        align-items: stretch;
        padding-right: 0;
        gap: 0;
    }

    /* Product card: horizontal row on mobile */
    .a4w-bundle-product {
        flex-direction: row;
        text-align: left;
        max-width: none;
        padding: 12px 0;
        gap: 14px;
    }

    .a4w-bundle-product-image {
        flex: 0 0 70px;
        width: 70px;
        margin-bottom: 0;
    }

    .a4w-bundle-img {
        max-width: 70px;
        width: 70px;
    }

    .a4w-bundle-product-info {
        align-items: flex-start;
        flex: 1;
    }

    .a4w-bundle-product-name {
        min-height: auto;
    }

    .a4w-bundle-product-check {
        position: relative;
        top: auto;
        left: auto;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }

    /* Separator: horizontal line with + */
    .a4w-bundle-separator {
        font-size: 1.1rem;
        flex: 0 0 auto;
        padding: 4px 0;
        align-self: center;
    }

    /* Summary: full width below */
    .a4w-bundle-summary {
        flex: none;
        width: 100%;
        border-left: none;
        border-top: 1px solid #f0e0e6;
        padding: 16px 0 0 0;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .a4w-bundle-total {
        text-align: left;
    }

    .a4w-bundle-add-to-cart {
        flex: 1 1 auto;
        max-width: 220px;
    }

    .a4w-bundle-mention {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .a4w-bundle-img {
        max-width: 60px;
        width: 60px;
    }

    .a4w-bundle-product-image {
        flex: 0 0 60px;
        width: 60px;
    }
}
