/* -------------
    SOMMAIRE
------------- */

/*
    @AUTHOR : Nicolas BOUDOT

    PRODUCTS
    Styles des produits WooCommerce
*/

/*
  00 - GÉNÉRAL
  01 - ARCHIVE
  02 - CARD
  03 - SINGLE
*/



/* -----------------
  00 - GÉNÉRAL
----------------- */



/* -----------------
  01 - ARCHIVE
----------------- */

.products__listing {
    margin-bottom: 40px;
}



/* -----------------
  02 - CARD
----------------- */

.card-product {
    transition: transform .4s;
}

    /* Hover */
    .card-product:hover {
        transform: translateY(-10px);
    }

.card-product__picture {
    aspect-ratio: 4 / 5;
}

/* Masque l'image par défaut de WooCommerce */
.card-product__picture img.woocommerce-placeholder,
/* Masque l'image par défaut du thème si l'image est renseignée */
.card-product__picture img:not(.woocommerce-placeholder) + img {
    display: none;
}

/* Badge Promo */
.card-product .onsale {
    display: none;
}

.card-product__title {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 16px 0 2px;
}

.card-product__title a {
    color: var(--c-secondary);
}

.card-produit__price .price {
    display: inline-flex;
    flex-direction: row-reverse;
    color: var(--gray-600);
    font-size: 1.4rem;
}

/* Prix barré */
.card-produit__price .price > del {
    color: var(--gray-500);
}

/* Prix en promo */
.card-produit__price .price > ins {
    background-color: transparent;
    color: inherit;
}

    /* After */
    .card-produit__price .price > ins::after {
        content: "-";
        margin: 0 5px;
    }



/* -----------------
  03 - SINGLE
----------------- */

/* Image principale */
.single-product__picture {
    margin-bottom: 18px;
}

/* Galerie */
.single-product__gallery {
    display: flex;
    justify-content: space-between;
    gap: 0 5px;
}

.single-product__gallery__picture {
    flex-grow: 1;
}

/* Description */
.single-product__description {
    margin-bottom: 40px;
}

/* Labels */
.single-product__label {
    color: var(--c-secondary);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

/* Description courte */
.single-product__short-description {
    margin-bottom: 30px;
}

/* Variations */
.product-variation {
    margin-bottom: 30px;
}

.product-variation > div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 15px;
}

/* Radio */
.option input {
    display: none;
}

.option label {
    cursor: pointer;
    display: inline-block;
    background-color: var(--gray-300);
    color: var(--c-primary);
    border: 2px solid transparent;
    border-radius: 50px;
    font-weight: 700;
    line-height: 1;
    padding: 10px 30px;
    transition: background-color .4s, border-color .4s;
}

    .option input:checked + label,
    .option label:hover {
        background-color: var(--white);
        border-color: var(--c-primary);
    }

    /* Disable */
    .option input[disabled] + label {
        cursor: not-allowed;
        opacity: .5;
    }

/* Radio couleur */
.option--color {
    line-height: 0;
}

.option--color label {
    padding: 0;
    width: 40px;
    height: 40px;
}

/* Quantité */
.btn-quantity {
    cursor: pointer;
    background-color: var(--gray-300);
    color: var(--c-primary);
    border: 2px solid transparent;
    border-radius: 50px 0 0 50px;
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1;
    width: 40px;
    height: 40px;
    transition: background-color .4s, border-color .4s;
}

    /* Hover */
    .btn-quantity:hover {
        background-color: var(--white);
        border-color: var(--c-primary);
    }

    /* + */
    .btn-quantity--plus {
        border-radius: 0 50px 50px 0;
    }

/* Input number */
.woocommerce .quantity .qty {
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    font-weight: 600;
}

    /* Spinners */
    input[type='number']::-webkit-inner-spin-button,
    input[type='number']::-webkit-outer-spin-button {
        appearance: none;
        margin: 0;
    }

/* Surcharge le style du plugin */
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.alt.disabled,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.alt.disabled:hover,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.alt {
    /* background-color: var(--c-primary);
    color: var(--white);
    height: 40px; */
    margin-left: 10px;
}

    @media (min-width: 992px) {
        .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.alt.disabled,
        .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.alt.disabled:hover,
        .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.alt {
            margin-left: 70px;
        }
    }

    /* Hover */
    /* .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.alt:hover {
        background-color: var(--c-quaternary);
        color: var(--c-primary);
        border-color: var(--c-quaternary);
    } */

/* Produits associés */
.single-product__suggestion {
    margin-top: 40px;
}
