/* 
* Products GENERAL 
*/


/* +/- for products */
.quantity-selector-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.product-line-grid .qty {
    width: fit-content;
    padding: 0;
}

.quantity-selector-wrapper button {
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 4px;
    border: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* Remove focus outline only */
    outline: none;
}


/* Hover effect only for devices that support proper hover */
@media (hover: hover) and (pointer: fine) {

    .decrease-quantity-btn:hover,
    .increase-quantity-btn:hover {
        background: var(--color-secondary);
    }
}

/* Active/click effect for immediate feedback */
.decrease-quantity-btn:active,
.increase-quantity-btn:active {
    background: var(--color-secondary);
}

/* Apply same hover logic to quantity selector buttons */
@media (hover: hover) and (pointer: fine) {
    .quantity-selector-wrapper button:hover {
        background: var(--color-secondary);
    }
}

.quantity-selector-wrapper button:active {
    background: var(--color-secondary);
}






/* 
* Products in cart 
*/


/* Cart body */
.cart-grid-body .cart-overview {
    padding: 16px;
}

/* Product name */
.product-line-grid-body>.product-line-info>.label {
    font-weight: 400;
}

/* Product line */
.product-line-grid {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
}

.product-line-grid .clearfix {
    display: none;
}

/* Product image */
.product-line-grid .product-line-grid-left {
    padding: 0;
    width: fit-content;
    display: flex;
    flex: 0 0 120px;
}

.product-line-grid .product-line-grid-left img {
    width: 120px;
    height: 120px;
    border-radius: 32px;
}

@media (max-width: 767px) {

    /* Make product name wrap properly */
    .product-line-grid-body>.product-line-info>.label {
        display: block;
        word-wrap: break-word !important;
        overflow-wrap: break-word;
        white-space: normal;
    }

    .product-line-grid .product-line-grid-left img {
        width: 100px;
        height: 100px;
    }

    .product-line-grid .product-line-grid-left {
        flex-basis: 100px;
    }
}

@media (max-width: 575px) {
    .product-line-grid .product-line-grid-left img {
        width: 80px;
        height: 80px;
    }

    .product-line-grid .product-line-grid-left {
        flex-basis: 80px;
    }
}

/* Product line body */
.product-line-grid .product-line-grid-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

/* Product packaging+unit price container */
.product-line-conditionnement {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.product-line-conditionnement * {
    width: fit-content;
    flex: 0 0 fit-content;
}


.product-line-conditionnement .conditionnement-value::first-letter {
    text-transform: capitalize;
}

.product-line-conditionnement .separator {
    width: 2px;
    height: 2px;
    flex: 0 0 2px;
    background: var(--color-black-light);
    border-radius: 50%;
}

/* Product price container */
.product-line-grid .product-line-info.product-price {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

@media (max-width:767px) {
    .product-line-grid .product-line-info.product-price {
        flex-direction: column;
        gap: 2px;
    }
}

/* Product price */
.product-line-grid .current-price {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
}

.product-line-grid .product-line-grid-right .product-price {
    min-width: 100px;
    text-align: center;
}

.product-price {
    color: var(--color-black);

}

/* Hide discount amount */
.product-line-info .discount.discount-amount {
    display: none;
}

.product-discount .regular-price {
    font-size: 17px;
    line-height: 18px;
    margin: 0;
}

/* Product quantity */

.product-line-grid .quantity-selector-wrapper input {
    text-align: center;
    font-size: 27px;
    line-height: 29px;
}

/* Product total price */
.product-line-grid .price {
    padding: 0;
}

/* Product price+quantity wrapper */
.product-line-grid .row:has(> .price) {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-left: auto !important;
}

.product-line-grid .row:has(> .price)::after {
    display: none;
}

@media (max-width: 767px) {
    .product-line-grid .row:has(> .price) {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .product-line-grid .row:has(> .price) .material-icons {
        font-size: 17px;
        line-height: 18px;
    }
}

/* Product row price+qty+actions */
.product-line-grid-right>.row {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-line-grid-right>.row>div {
    display: flex;
    width: 100%;
}

/* Product row actions */
.product-line-grid-right .cart-line-product-actions {
    display: flex;
    align-items: center;
}

.product-line-grid-right .cart-line-product-actions .remove-from-cart {
    display: none
}

/* Handle very small screens */
@media (max-width: 575px) {
    .product-line-grid {
        flex-wrap: wrap;
        gap: 12px;
    }

    .product-line-grid-right.product-line-actions {
        flex-basis: 100%;
    }

    .product-line-grid-right.product-line-actions .row {
        justify-content: space-between;
    }

    .product-line-grid .product-line-grid-body {
        width: fit-content;
        flex: 1 0 auto;
        max-width: 180px;
    }

    .product-line-grid .row:has(> .price) {
        flex-direction: row;
        gap: 16px;
        width: 100%;
    }

    .cart-grid-body .cart-overview {
        padding: 8px;
    }

    .product-line-conditionnement .separator,
    .product-line-conditionnement .unit-price-cart {
        display: none;
    }
}

/* Cart Totals container */
@media (max-width: 767px) {
    .cart-detailed-totals.js-cart-detailed-totals {
        padding: 0 16px;
    }

    .checkout.cart-detailed-actions {
        margin: 0 16px;
    }
}







/* 
* Products in listings 
*/


#category #content-wrapper,
#manufacturer #content-wrapper,
#search #content-wrapper {
    width: 100%;
    padding: 0 !important;
    /* z-index: 10; */
    display: flex;

}

#category #wrapper>.container>*,
#manufacturer #wrapper>.container>*,
#search #wrapper>.container>* {
    padding: 0;
}

#category #wrapper>.container,
#manufacturer #wrapper>.container,
#search #wrapper>.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 0;
}

#category #wrapper>.container>.row,
#manufacturer #wrapper>.container>.row,
#search #wrapper>.container>.row {
    display: flex;
    flex-direction: column;
    align-items: center;

    width: 100%;
    max-width: 96vw;
}

#category #wrapper #main,
#manufacturer #wrapper #main,
#search #wrapper #main {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 8px;
}

#manufacturer #wrapper #main,
#search #wrapper #main {
    gap: 32px;
}

#manufacturer #wrapper #main h1,
#search #wrapper #main h1 {
    width: fit-content;
}

.brand-header {
    margin-bottom: 16px;
    display: flex;
    width: 100%;
}

.brand-header .brand-info {
    flex-grow: 1;
    width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.brand-header .brand-info .brand-description {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
}

#js-product-list-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 767px) {
    #js-product-list-top {
        flex-direction: column;
    }
}

#js-product-list-top::after {
    display: none;
}

#js-product-list-top>.col-lg-7 {
    padding: 0;
}

#js-product-list-top .products-sort-order {
    padding-right: 0;
}

@media (max-width: 767px) {
    #js-product-list-top .products-sort-order {
        padding-left: 0;
    }
}

.products-selection .total-products {
    padding: 0;
}

#products {
    display: flex;
    flex-direction: column;
    padding-top: 16px;
    color: var(--color-black-light);

}

#products .products {
    display: grid;
    grid-template-columns: repeat(auto-fill, 240px);
    gap: 12px;
    max-width: 96vw;
    margin: 0 auto;
    width: fit-content;
}

/* Manufacturer product cards container */
#manufacturer #main ul {
    justify-content: space-between;
    gap: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 258px);
    max-width: 96vw;
}

@media (max-width: 767px) {

    #products .products {
        grid-template-columns: repeat(auto-fill, 168px);
    }

    #manufacturer #main ul {
        grid-template-columns: repeat(auto-fill, 160px);
    }
}

#products #js-product-list {
    display: flex;
    flex-direction: column;
    width: fit-content;
}

#products #js-product-list nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

@media (max-width: 767px) {

    #products #js-product-list nav {
        flex-direction: column;
    }
}

.pagination .next {
    margin-left: 8px;
}

.pagination .previous {
    margin-right: 8px;
}

#products .up {
    display: none;
}

/* 
* Products in listings in product page
*/

.product-accessories .products,
.featured-products .products {
    gap: 12px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    max-width: 96vw;
}

.product-accessories .products .product,
.featured-products .products .product {
    padding: 0;
    width: 240px;
}

@media (max-width: 767px) {

    .product-accessories .products,
    .featured-products .products {
        justify-content: flex-start;

        flex-wrap: nowrap;
        overflow-x: scroll;
        max-width: 100%;
    }

    .product-accessories .products .product:first-child,
    .featured-products .products .product:first-child {
        margin-left: 12px;
    }

    .product-accessories .products .product,
    .featured-products .products .product {
        width: 168px;
    }
}


/* ===== PRODUCT MINIATURE CONTAINER ===== */

/* Product grid layout */
#products .products .product {
    width: fit-content;
    padding: 0;
    display: flex;
    flex: 0 0 fit-content;
}

#products .products .product article,
.products .product article {
    width: 240px;
}

#products .products .product article a,
#products .products .product article a .thumbnail-container {
    display: flex;
    flex: 0 0 fit-content;
    flex-direction: column;
    margin: 0;
}

@media (max-width: 767px) {
    #products .products .product {
        width: 168px;
    }

    #products .products .product article,
    .products .product article {
        width: 168px;
    }

    #products .products {
        gap: 8px;
    }
}

/* ===== THUMBNAIL CONTAINER ===== */
.product-miniature .thumbnail-container {
    padding: 4px;
    background: var(--color-white-light);
    border-radius: 32px;
    color: var(--color-black);
    margin: 0;
}

.product-miniature .thumbnail-container img {
    border-radius: 32px 32px 0 0;
    width: 232px;
    height: 232px;
}

@media (max-width: 767px) {
    .product-miniature .thumbnail-container img {
        border-radius: 32px 32px 0 0;
        width: 160px;
        height: 160px;
    }
}

/* Thumbnail hover effects */
.product-miniature .thumbnail-container:focus .product-description::after,
.product-miniature .thumbnail-container:hover .product-description::after {
    border-top: transparent;
}

/* Out of stock product image styling */
.product-miniature.js-product-miniature:has(.product-flag.out_of_stock) .thumbnail-container img {
    filter: grayscale(100%);
    opacity: 0.8;
}

/* ===== HIGHLIGHTED INFORMATIONS (VARIANTS) ===== */
.product-miniature .highlighted-informations {
    background: var(--color-white-light);
}

.product-miniature .variant-links {
    background: var(--color-white-light);
}

.product-miniature .highlighted-informations .quick-view {
    color: var(--color-black-light);
}

.product-miniature .highlighted-informations .quick-view:hover {
    color: var(--color-primary);
}

/* ===== PRODUCT DESCRIPTION SECTION ===== */
.product-miniature .product-description {
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    gap: 8px;
}

/* Product title */
.product-miniature .product-title {
    text-transform: none;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.product-miniature .product-title a {
    font-weight: 400;
    color: var(--color-black-light);
    text-decoration: none;
}

/* Product brand and weight */
.product-miniature .product-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.product-miniature .product-details .brand,
.product-miniature .product-details .weight {
    display: flex;
    flex-direction: row;
    justify-content: center;
    font-size: 0.8125rem;
    color: var(--color-black);
}

/* ===== PRICE AND SHIPPING SECTION ===== */
.product-miniature .product-price-and-shipping {
    display: flex;
    flex-direction: row;
    text-align: center;
    font-weight: 700;
    font-size: 22px;
    width: 100%;
    color: var(--color-black);
}

@media (max-width: 767px) {
    .product-miniature .product-price-and-shipping {
        padding: 0;
    }
}

/* Product unit info (price and price per kg) */
.product-miniature .product-unit-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    text-align: start;
    font-weight: 400;
    color: var(--color-black);
}

.product-miniature .product-unit-info .price {
    font-weight: 700;
}

.has-discount .product-unit-price,
.product-unit-price {
    font-size: 0.8125rem;
    color: var(--color-black);
}

.product-miniature .product-unit-info .price.discount {
    color: var(--color-secondary);
}

/* ===== ADD TO CART BUTTON SECTION ===== */

.product-miniature .product-price-and-shipping .add-to-cart-button {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: flex-end;
    width: 100%;
    min-height: 42px;
}

.product-miniature .product-price-and-shipping .add-to-cart-button form {
    width: fit-content;
}

.product-miniature .product-price-and-shipping .add-to-cart-button .btn.btn-primary {
    display: flex;
    padding: 6px 16px;
}

.product-miniature .product-price-and-shipping .add-to-cart-button .btn.btn-primary svg {
   fill: var(--color-white-light);
}

.product-miniature .product-price-and-shipping .add-to-cart-button button i {
    margin-right: 0;
}

@media (max-width: 767px) {
    .product-miniature .product-price-and-shipping .add-to-cart-button .btn.btn-primary {
        padding: 4px 12px;
    }
}

/* Disable buttons when out of stock */
.product-miniature.js-product-miniature:has(.product-flag.out_of_stock) .add-to-cart-button .increase-quantity-btn,
.product-miniature.js-product-miniature .add-to-cart-button .btn.out-of-stock {
    opacity: 0.5;
    /* pointer-events: none; */
    cursor: not-allowed;
}


.quantity-btn.quantity-plus:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ===== REVIEWS SECTION ===== */
.product-miniature .comments_note {
    color: var(--color-black-light);
}

.product-miniature .count {
    font-weight: 700;
    color: var(--color-black-light);
}

/* ===== PRODUCT FLAGS ===== */
/* Hide all product flags except out_of_stock when out_of_stock flag is present */
.product-miniature .product-flags:has(.product-flag.out_of_stock) .product-flag:not(.out_of_stock, .on-sale) {
    display: none;
}


/* Product add to cart */

.product-miniature .quantity-selector-wrapper {
    gap: 4px;
}

.product-miniature .quantity-selector-wrapper button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    padding-bottom: 7px;
}





/* 
* Product page 
*/
#product .product-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
}

@media (max-width: 767px) {
    #product .product-container {
        flex-direction: column;
        /* gap: 24px; */

        padding: 0 12px;
    }
}

#product .product-container::after,
#product .product-container .row::after {
    content: none;
}

#product .product-container .row {
    display: flex;
    flex-direction: row;
    align-items: center;
}

/* Product Images */
#product .product-container .product-images-wrapper {
    width: fit-content;
    flex: 0 0 fit-content;
}

#product .product-container .product-images-wrapper .product-cover img {
    border-radius: 32px;
    background: var(--color-white-light);
    object-fit: contain;
}

#product .product-container .product-images-wrapper .product-cover .layer {
    border-radius: 32px;
}

#product .product-container .product-images-wrapper .product-images img {
    width: 80px;
    height: 80px;
    border-radius: 16px;
}

/* Product image modal */
#product-modal.in,
#product-modal .modal-dialog,
#product-modal .modal-content,
#product-modal .modal-content .modal-body {
    display: flex !important;
    width: 100%;
    height: 100%;
    margin: 0;
    max-width: unset;
}

#product-modal figure img {
    width: 80vw;
    max-width: min(80vw, 100%);
    height: 80vh;
    max-height: min(80vh, 100%);
    aspect-ratio: 1 / 1;
}

/* Product details */

#product .product-container .product-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

/* Product header */
.product-page-header {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    gap: 12px;
}

/* Product tags */
#product .product-container .product-details .product-tags div {
    gap: 12px;
    width: 100%;
    flex-wrap: wrap;
}

@media (max-width: 2px) {}

#product .product-container .product-details .product-tags div h5 {
    text-wrap: nowrap;
}


/* Product informations */
.product-information {
    display: flex;
    flex-direction: column;
}

.product-information .product-actions,
.product-information .product-actions form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 24px;
}

/* Product prices */
#product .product-prices,
#product .product-prices div {
    margin: 0;
}

#product .product-prices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#product .product-prices .tax-shipping-delivery-label {
    gap: 12px;
}


/* Quantity selector products page */

#product .product-actions .product-add-to-cart {
    width: 100%;
}

#product .product-actions .product-add-to-cart .btn.add-to-cart {
    display: flex;
    align-items: center;

    gap: 8px;
}

#product .product-actions .product-add-to-cart .btn.add-to-cart {
    fill: var(--color-white-light);
}

.product-quantity {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
}

.product-quantity .add {
    margin: 0;
}

.qty-block {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
}

.qty {
    display: flex;
    align-items: center;
    gap: 4px;
}

.add {
    display: flex;
    align-items: center;
    justify-content: end;
    width: 100%;
}

.qty-btn {
    width: 40px;
    height: 2.75rem;
    border: none;
    background: var(--color-primary);
    color: var(--color-white-light);
    font-size: 32px;
    line-height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    border-radius: 32px;
    overflow: hidden;
}

.qty-btn:hover {
    background: var(--color-primary-dark);
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.product-quantity #quantity_wanted {
    min-width: 80px;
    height: 2.75rem;
    border: none;
    border-radius: 32px;
    text-align: center;
    padding: 0;
    color: var(--color-black);
    background: var(--color-white-light);
    outline: none;
}

.input-group-addon {
    display: none !important;
}

.input-group-btn-vertical {
    display: none !important;
}

/* Product additional infos */

#product .product-additional-info br {
    display: none;
}

#product .product-additional-info {
    display: flex;
    flex-direction: column;
}

/* Hide fidelity message when product is restricted */
#product .product-additional-info:has(.product-restriction-message) p {
    display: none;
}

/* Separation */
#product hr {
    margin: 0;
    width: 100%;
}

/* Black and white product images when out_of_stock flag is present */
.product-container:has(.product-flags .product-flag.out_of_stock) .product-cover .img-fluid {
    filter: grayscale(100%);
    opacity: 0.8;
}

/* Hide all product flags except out_of_stock when out_of_stock flag is present */
.product-container .product-flags:has(.product-flag.out_of_stock) .product-flag:not(.out_of_stock, .on-sale) {
    display: none;
}

/* Product page more products */
#product section#main>section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding-top: 48px;
}

#product section#main>section.featured-products {
    margin: 0 !important;
}

/* Page d'accueil, produits mise en avant */

#products .all-product-link,
.featured-products .all-product-link,
.product-accessories .all-product-link {
    color: var(--color-secondary);
}

#products .all-product-link:hover,
.featured-products .all-product-link:hover,
.product-accessories .all-product-link:hover {
    color: var(--color-primary);
}