/* Styles pour Quick View */
#wc-quickview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#wc-quickview-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Style pour désactiver UNIQUEMENT le scroll du body */
body.wc-quickview-open {
    overflow: hidden;
}

.wc-quickview-modal-inner {
    max-width: 800px;
    width: 90%;
    background: #fff;
    border-radius: 10px;
    transform: scale(0.7);
    transition: all 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

#wc-quickview-modal.active .wc-quickview-modal-inner {
    transform: scale(1);
}

@media (min-width: 768px) {
    .wc-quickview-button {
        cursor: pointer;
        display: inline-block;
        position: absolute;
        bottom: 106px;
        right: 33px;
        z-index: 10;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 50%;
        padding: 5px;
        width: 40px;
        height: 40px;
        box-shadow: 0px 0px 20px 3px rgb(0 0 0 / 7%);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }
}

@media (max-width: 767px) {
    .wc-quickview-button {
        cursor: pointer;
        display: inline-block;
        position: absolute;
        bottom: 86px;
        right: 19px;
        z-index: 10;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 50%;
        padding: 5px;
        width: 30px;
        height: 30px;
        box-shadow: 0px 0px 20px 3px rgb(0 0 0 / 7%);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }
}

.wc-quickview-button:hover {
    background: #d8d8d8;
    box-shadow: 0px 0px 20px 3px rgb(0 0 0 / 7%);
}

.wc-quickview-button img {
    width: 23px;
    height: 23px;
    vertical-align: middle;
}

.wc-quickview-content {
    padding: 30px;
    position: relative;
}

.wc-quickview-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.wc-quickview-close:before,
.wc-quickview-close:after {
    content: "";
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #333;
    top: 50%;
    left: 0;
}

.wc-quickview-close:before {
    transform: rotate(45deg);
}

.wc-quickview-close:after {
    transform: rotate(-45deg);
}

.wc-quickview-inner {
    display: flex;
    flex-wrap: wrap;
}

.wc-quickview-image {
    flex: 0 0 40%;
    max-width: 40%;
    align-content: center;
    text-align: center;
}

.wc-quickview-info {
    flex: 0 0 60%;
    max-width: 60%;
    padding-left: 30px;
}

.wc-quickview-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: bold !important;
    font-size: 25px !important;
    line-height: 31px !important;
}

.wc-quickview-categories {
    margin-bottom: 10px;
}

.wc-quickview-categories a {
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 14px !important;
    color: #888888 !important;
    transition: 0.3s;
}

.wc-quickview-categories a:hover {
    color: #cbb390 !important;
}

.wc-quickview-short-description {
    margin-bottom: 20px;
}

.wc-quickview-short-description br {
    display: block;
    content: "";
    margin-top: 10px;
}

.wc-quickview-short-description strong {
    font-weight: 700;
    display: block;
}

.wc-quickview-price {
    font-size: 1.2em;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.wc-quickview-price-regular bdi {
    color: #888888 !important;
    font-weight: normal;
    font-size: 14px;
}

.wc-quickview-price-sale bdi {
    font-size: 22px;
}

.wc-quickview-price-regular {
    margin-bottom: 5px;
}

.wc-quickview-price-regular del {
    color: #777;
    font-size: 0.9em;
}

.wc-quickview-price-sale ins {
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
}

.wc-quickview-add-to-cart .button {
    background-color: #cbb391 !important;
    color: #ffffff !important;
    padding: 10px 30px !important;
    text-decoration: none !important;
    border-radius: 10px !important;
    display: inline-block !important;
    position: relative !important;
    font-weight: bold !important;
    transition: 0.3s !important;
}

.wc-quickview-add-to-cart .button:hover {
    background-color: #1c1c1c !important;
    color:white !important;
}

/* Style pour les éléments JetEngine (ajustez si nécessaire) */
.jet-listing-grid__item {
    position: relative;
}

/* Style pour le lien "En savoir plus" */
.wc-quickview-readmore {
    margin-bottom: 20px;
}

.wc-quickview-readmore-link {
    display: flex;
    align-items: center;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    width: fit-content;
}

.wc-quickview-readmore-link:hover {
    color: #cbb390;
}

.wc-quickview-readmore-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.wc-quickview-readmore-link:hover .wc-quickview-readmore-icon {
    transform: scale(1.1);
    filter: brightness(0.9);
}

.wc-quickview-readmore-link span {
    font-size: 16px;
    font-weight: 500;
}

/* Loader principal */
.wc-quickview-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* Loader du bouton */
.button.loading {
    padding-right: 35px !important;
    opacity: 0.7;
    pointer-events: none;
}

.button.loading:after {
    content: "";
    position: absolute;
    top: calc(50% - 8px);
    right: 10px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* Loader unifié */
.add_to_cart_button.loading,
.wc-quickview-add-to-cart-btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
    padding-right: 35px !important;
}

.add_to_cart_button.loading::before,
.wc-quickview-add-to-cart-btn.loading::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 10px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Désactive le loader WooCommerce */
.add_to_cart_button.loading::after {
    display: none !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 767px) {
    .wc-quickview-inner {
        flex-direction: column;
    }

    .wc-quickview-image,
    .wc-quickview-info {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
    }

    .wc-quickview-image {
        margin-bottom: 20px;
    }
}
