/* Shared product cards, loaded after generated theme and editorial styles. */
.tvproduct-wrapper,
.tvleft-right-product-slider {
    font-family: var(--tv-theme-body-font, "Baloo paaji", sans-serif);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.tvproduct-wrapper .tvproduct-info-box-wrapper,
.tvproduct-wrapper .product-description,
.tvproduct-wrapper .tvproduct-name,
.tvproduct-wrapper .tvproduct-cart-btn,
.tvproduct-wrapper .tvproduct-cart-btn form {
    min-width: 0;
    max-width: 100%;
}

/* Both grid variants use the same one-line title as the Home card. */
.tvproduct-wrapper:is(.grid, .grid-2) .product-title h6 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 1em;
}

/* Keep each amount whole, and let a former price move onto the next line. */
.tvproduct-wrapper .tv-product-price .product-price-and-shipping {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    row-gap: 4px;
}

.tvproduct-wrapper .product-price-and-shipping .price,
.tvproduct-wrapper .product-price-and-shipping .regular-price {
    white-space: nowrap;
}

/* The width includes padding and borders; horizontal margins cannot add to it. */
.tvproduct-wrapper:is(.grid, .grid-2, .list, .catelog) .tvproduct-cart-btn .tvproduct-add-to-cart {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(207px, 100%);
    max-width: 100%;
    min-width: 0;
    height: auto;
    margin: 10px auto;
    white-space: normal;
    text-align: center;
}

.tvproduct-wrapper .tvproduct-cart-btn .tvproduct-add-to-cart .tvproduct-add-to-cart-label {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.tvproduct-wrapper .tvproduct-image .tvproduct-flags {
    max-width: calc(100% - 10px);
}

.tvproduct-wrapper .tvproduct-image .product-flag {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Au-delà de 1440 px, custom.css repasse le libellé à 19 px : « Ajouter au panier » tient alors sur deux
   lignes (bouton de 62 px). Même taille qu'en dessous de 1440 px : une ligne, bouton de 41 px. */
@media (min-width: 1441px) {
    .tvproduct-wrapper .tvproduct-cart-btn .tvproduct-add-to-cart .tvproduct-add-to-cart-label {
        font-size: 17px;
    }
}
