/* ================================
   MODAL QUICK VIEW
================================ */

:root {
    --cv-primary-color: #a3740f;
    --cv-primary-color-dark: #CA8A04;
    --cv-text-color: #141004;
}

body.cv-modal-open {
    overflow: hidden;
}

.cv-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.cv-modal.is-open {
    display: block;
}

.cv-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(22, 18, 18, 0.62);
    backdrop-filter: blur(8px);
}

.cv-modal__dialog {
    position: relative;
    width: min(1040px, calc(100% - 36px));
    max-height: calc(100vh - 36px);
    margin: 18px auto;
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 30px 100px rgba(20, 12, 8, 0.32);
    animation: cvModalIn 0.22s ease;
}

@keyframes cvModalIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cv-modal__close {
    position: absolute;
    display: flex;
    align-items: center;    
    top: 22px;
    right: 22px;
    z-index: 5;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: #f7f0e9;
    color: #2c1d16;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s ease;
}

.cv-modal__close:hover {
    transform: rotate(90deg);
    background: #ead8c9;
}

.cv-modal__body {
    overflow-y: auto;
    max-height: calc(100vh - 36px);
}

.cv-modal__loader,
.cv-modal__error {
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #3a2d31;
    font-weight: 800;
}

.cv-modal__loader span,
.cv-btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 999px;
    display: inline-block;
    animation: cvSpin 0.75s linear infinite;
}

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


/* ================================
   QUICK VIEW CONTENT
================================ */

.cv-qv {
    display: grid;
    grid-template-columns: 48% 52%;
    min-height: 560px;
}

.cv-qv__media {
    position: relative;
    background: linear-gradient(145deg, #faf7f2, #efe4da);
    padding: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cv-qv__media::after {
    content: "";
    position: absolute;
    left: 40px;
    right: 40px;
    bottom: 36px;
    height: 42px;
    border-radius: 999px;
    background: rgba(65, 36, 22, 0.12);
    filter: blur(18px);
}

.cv-qv__media img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-height: 470px;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.cv-qv__media:hover img {
    transform: scale(1.035);
}

.cv-qv__content {
    padding: 54px 54px 46px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cv-qv__eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 900;
    color: #9a6a43;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.cv-qv__eyebrow a {
    color: inherit;
    text-decoration: none;
}

.cv-qv__title {
    max-width: 520px;
    margin: 0;
    font-size: clamp(30px, 3.2vw, 44px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #231814;
}

.cv-qv__price {
    margin-top: 14px;
    font-size: 28px;
    font-weight: 900;
    color: #1d1715;
}

.cv-qv__rating {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6d5a50;
    font-size: 14px;
}

.cv-qv__desc {
    max-width: 520px;
    color: #51433d;
    font-size: 15.5px;
    line-height: 1.75;
}

.cv-qv__desc p {
    margin: 0;
}

.cv-qv__meta {
    display: grid;
    gap: 8px;
    margin-top: 2px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #fbf7f2;
    border: 1px solid #eadccf;
    color: #3b302b;
    font-size: 14px;
}

.cv-qv__meta strong {
    color: #211713;
}

.cv-qv__actions {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 18px;
}

.cv-qv__actions .cv-product-card__button {
    display: inline-flex;
    align-items: center;
    min-height: 50px;
    padding: 0 30px;
    border-radius: 12px;
    border: 0;
    background: var(--cv-primary-color);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(217, 121, 11, 0.25);
    transition: 0.2s ease;
    cursor: pointer;
}

.cv-qv__actions .cv-product-card__button:hover {
    transform: translateY(-2px);
    background: var(--cv-primary-color-dark);
}

.cv-qv__link {
    min-height: 50px;
    padding: 0 26px;
    border-radius: 12px;
    border: 1px solid #decabd;
    background: #fff;
    color: #251916;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.cv-qv__link:hover {
    background: #f8f1eb;
    transform: translateY(-2px);
    color: #251916!important;
}


/* ================================
   BUTTON LOADING
================================ */

.cv-product-card__button.is-loading,
.cv-product-card__quick.is-loading {
    opacity: 0.85;
    cursor: wait;
}

.cv-btn-spinner {
    width: 14px;
    height: 14px;
    margin-right: 7px;
    vertical-align: -2px;
}


/* ================================
   TOAST
================================ */

.cv-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 100000;
    min-width: 280px;
    max-width: min(420px, calc(100% - 44px));
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #fff;
    color: #2f2525;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    transform: translateY(16px);
    opacity: 0;
    pointer-events: none;
    transition: 0.22s ease;
}

.cv-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.cv-toast__icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #fff;
}

.cv-toast.is-success .cv-toast__icon {
    background: #1f9d55;
}

.cv-toast.is-error .cv-toast__icon {
    background: #d64545;
}

.cv-toast__content {
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
}

.cv-toast__content a {
    color: #8b4b21;
    font-weight: 800;
    text-decoration: underline;
}


/* ================================
   RESPONSIVE
================================ */

@media (max-width: 800px) {
    .cv-modal__dialog {
        width: calc(100% - 18px);
        margin: 9px auto;
        max-height: calc(100vh - 18px);
        border-radius: 5px;
    }

    .cv-modal__body {
        max-height: calc(100vh - 18px);
    }

    .cv-modal__close {
        top: 14px;
        right: 14px;
        width: 40px;
        height: 40px;
    }

    .cv-qv {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .cv-qv__media {
        min-height: 300px;
        padding: 24px;
    }

    .cv-qv__media img {
        max-height: 280px;
    }

    .cv-qv__content {
        padding: 34px 24px 28px;
    }

    .cv-qv__title {
        font-size: 30px;
    }

    .cv-qv__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cv-qv__actions .cv-product-card__button,
    .cv-qv__link {
        width: 100%;
    }

    .cv-toast {
        left: 14px;
        right: 14px;
        bottom: 14px;
        max-width: none;
    }
}

/* bouton add to cart */
.cv-product-card__cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 5px;
    background: #8b5a17;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    transition: 0.2s ease;
    position: relative;
}

.cv-product-card__cart:hover {
    background: #6e4612;
}

/* loading */
.cv-product-card__cart.is-loading {
    opacity: 0.9;
    pointer-events: none;
}

.cv-product-card__cart.is-loading::after {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 999px;
    margin-left: 8px;
    animation: cvSpin 0.7s linear infinite;
}

/* succès */
.cv-product-card__cart.is-added {
    background: #1f9d55;
    box-shadow: 0 8px 20px rgba(31, 157, 85, 0.3);
}

/* bouton voir panier */
.added_to_cart.wc-forward{
    display: none!important;
}
.cv-product-card__cart-link {
    display: none;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #8b4b21;
    text-decoration: underline;
    text-align: center;
}

.cv-product-card__cart-link.is-visible {
    display: inline-block;
    animation: fadeInUp 0.2s ease;
}

/* animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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