/* =========================================
   PRODUCT CARD WRAPPERS
========================================= */

/* Elementor Loop Grid */
.e-loop-item,

/* Standard WooCommerce product card */
.woocommerce ul.products li.product {
    position: relative;
}


/* =========================================
   PRODUCT ACTIONS WRAPPER
========================================= */

.custom-product-actions {
    position: relative;
    width: 100%;
    overflow: hidden;
}



/* =========================================
   ADD TO CART
   ALWAYS FULL WIDTH
========================================= */

.custom-product-actions .button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100% !important;

    margin: 0 !important;
    padding: 10px 20px !important;

    border-radius: 5px !important;

    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;

    white-space: nowrap;
}


/* =========================================
   QUICK VIEW
   ABSOLUTE + HIDDEN BELOW
========================================= */

.custom-product-actions .custom-quick-view {
    position: absolute;

    left: 0;
    bottom: 0;

    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 10px 20px;

    background: #2d1911;
    color: #ffffff;

    border: 0;
    border-radius: 5px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    white-space: nowrap;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;

    transform: translateY(100%);

    pointer-events: none;

    z-index: 20;

    transition:
        transform 0.35s ease,
        opacity 0.35s ease,
        visibility 0.35s ease,
        background 0.2s ease;
}



/* =========================================
   HOVER - ADD TO CART SHRINKS
========================================= */

.e-loop-item:hover
.custom-product-actions .button,
.woocommerce ul.products li.product:hover
.custom-product-actions .button {
    width: calc(50% - 4px);
}


/* =========================================
   SHOW QUICK VIEW ON CARD HOVER
========================================= */

.e-loop-item:hover
.custom-product-actions .custom-quick-view,
.woocommerce ul.products li.product:hover
.custom-product-actions .custom-quick-view {
    opacity: 1;
    visibility: visible;

    transform: translateY(0);

    pointer-events: auto;
}



/* =========================================
   ELEMENTOR LOOP GRID HOVER
========================================= */

.e-loop-item:hover
.custom-product-actions
.custom-quick-view {
    opacity: 1;
    visibility: visible;

    transform: translateY(0);

    pointer-events: auto;
}


/* =========================================
   STANDARD WOOCOMMERCE HOVER
========================================= */

.woocommerce ul.products li.product:hover
.custom-product-actions
.custom-quick-view {
    opacity: 1;
    visibility: visible;

    transform: translateY(0);

    pointer-events: auto;
}


/* =========================================
   QUICK VIEW HOVER
========================================= */

.custom-product-actions .custom-quick-view:hover {
    background: #222222;
    color: #ffffff;
}

/* =========================================
   QUICK VIEW BUTTON FOCUS
========================================= */

.custom-product-actions
.custom-quick-view:focus {
    outline: none;

    background: #000000;
    color: #ffffff;
}


/* =========================================
   QUICK VIEW OVERLAY
========================================= */

.custom-quick-view-overlay {
    position: fixed;

    inset: 0;

    z-index: 999999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 40px;

    background: rgba(35, 23, 18, 0.55);

    backdrop-filter: blur(2px);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}


.custom-quick-view-overlay.active {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}


/* =========================================
   BODY LOCK
========================================= */

body.quick-view-open {
    overflow: hidden;
}


/* =========================================
   QUICK VIEW MODAL
========================================= */

.custom-quick-view-modal {
    position: relative;

    width: min(950px, 100%);

    max-height: 70vh;

    background: #ffffff;

    border-radius: 20px;

    overflow-y: auto;

    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.25);

    transform: translateY(20px) scale(0.98);

    transition:
        transform 0.3s ease;
}


.custom-quick-view-overlay.active
.custom-quick-view-modal {
    transform: translateY(0) scale(1);
}


/* =========================================
   QUICK VIEW INNER
========================================= */

.quick-view-inner {
    position: relative;

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 38px;

    padding: 44px;
}


/* =========================================
   CLOSE BUTTON
========================================= */

.quick-view-close {
    position: absolute;

    top: 20px;
    right: 20px;

    z-index: 10;

    width: 48px;
    height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 0;

    border-radius: 50%;

    background: #faf7f4;

    color: #32190f;

    font-size: 27px;

    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.quick-view-close:hover {
    background: #32190f;

    color: #ffffff;
}


/* =========================================
   PRODUCT IMAGE
========================================= */

.quick-view-image {
    min-height: 420px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #fff6ed;

    border: 1px solid #efd9c4;

    border-radius: 20px;

    overflow: hidden;
}


.quick-view-image img {
    width: 100%;

    height: 100%;

    min-height: 300px !important;

    object-fit: contain;

    padding: 25px;

    transition:
        transform 0.3s ease;
}


.quick-view-image:hover img {
    transform: scale(1.03);
}


/* =========================================
   PRODUCT CONTENT
========================================= */

.quick-view-content {
    display: flex;

    flex-direction: column;

    justify-content: center;

    padding: 15px 0;
}


/* =========================================
   CATEGORY
========================================= */

.quick-view-category {
    margin-bottom: 8px;

    color: #b55410;

    font-size: 14px;

    font-weight: 700;

    letter-spacing: 2px;

    text-transform: uppercase;
}


.quick-view-category a {
    color: inherit;

    text-decoration: none;
}


/* =========================================
   TITLE
========================================= */

.quick-view-title {
    margin: 0 0 10px !important;

    padding-right: 45px;

    color: #32190f;

    font-family: Georgia, serif;

    font-size: 30px;

    line-height: 1.12;
}


/* =========================================
   RATING
========================================= */

.quick-view-rating {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 22px;

    color: #966a50;

    font-size: 14px;
}


.quick-view-rating .star-rating {
    margin: 0;
}


/* =========================================
   PRICE
========================================= */

.quick-view-price {
    margin-bottom: 0px;

    color: #32190f;

    font-size: 28px;

    font-weight: 700;
}


.quick-view-price del {
    margin-left: 10px;

    color: #9b7968;

    font-size: 20px;

    font-weight: 400;
}


.quick-view-price ins {
    text-decoration: none;
}


/* =========================================
   DESCRIPTION
========================================= */

.quick-view-description {
    margin-bottom: 24px;

    color: #654d40;

    font-size: 13px;

    line-height: 1.75;
}


.quick-view-description p {
    margin: 0 0 10px;
}


/* =========================================
   CART FORM
========================================= */

.quick-view-cart {
    margin-top: 5px;
}


.quick-view-cart form.cart {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 12px;

    margin: 0;
}


/* =========================================
   QUANTITY
========================================= */

.quick-view-cart .quantity {
    margin: 0 !important;
}


.quick-view-cart .quantity input.qty {
    width: 65px;

    height: 36px;

    border: 1px solid #d7c5b9;

    border-radius: 8px;

    text-align: center;

    font-size: 16px;
}


/* =========================================
   QUICK VIEW ADD TO CART
========================================= */

.quick-view-cart
.single_add_to_cart_button {

    padding: 10px 20px !important;

    border: 1px solid #32190f !important;

    border-radius: 9px !important;

    background: #32190f !important;

    color: #ffffff !important;

    font-size: 16px !important;

    font-weight: 600 !important;

    transition:
        background 0.25s ease;
}


.quick-view-cart
.single_add_to_cart_button:hover {
    background: #4a2517 !important;
}


/* =========================================
   FULL DETAILS
========================================= */

.quick-view-details {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: fit-content;

    margin-top: 14px;

    padding: 10px 20px;

    border: 1px solid #32190f;

    border-radius: 9px;

    background: #ffffff;

    color: #32190f;

    font-size: 16px;

    font-weight: 600;

    text-decoration: none;

    transition:
        background 0.25s ease,
        color 0.25s ease;
}


.quick-view-details:hover {
    background: #32190f;

    color: #ffffff;
}


/* =========================================
   VARIABLE PRODUCTS
========================================= */

.quick-view-cart .variations {
    width: 100%;

    margin-bottom: 15px;
}


.quick-view-cart .variations td {
    padding: 8px 0;
}


.quick-view-cart .variations select {
    min-height: 45px;

    padding: 0 12px;

    border: 1px solid #d7c5b9;

    border-radius: 7px;
}


.quick-view-cart
.woocommerce-variation-description {
    margin-bottom: 15px;
}


.quick-view-cart
.reset_variations {
    margin-left: 8px;

    font-size: 13px;
}


/* =========================================
   LOADER
========================================= */

.quick-view-loader {
    position: absolute;

    inset: 0;

    z-index: 20;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #ffffff;

    opacity: 0;

    visibility: hidden;
}


.quick-view-loader.active {
    opacity: 1;

    visibility: visible;
}


.quick-view-loader span {
    width: 38px;

    height: 38px;

    border: 3px solid #eadfd8;

    border-top-color: #32190f;

    border-radius: 50%;

    animation:
        quickViewSpin 0.7s linear infinite;
}


@keyframes quickViewSpin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================
   ERROR
========================================= */

.quick-view-error {
    padding: 50px;

    text-align: center;

    color: #32190f;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 1024px) {

    .custom-product-actions {
        gap: 6px;
    }


    .custom-product-actions .button,
    .custom-product-actions .custom-quick-view {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 767px) {

    .custom-quick-view-overlay {
        padding: 15px;
    }


    .custom-quick-view-modal {
        max-height: 94vh;

        border-radius: 15px;
    }


    .quick-view-inner {
        grid-template-columns: 1fr;

        gap: 20px;

        padding: 20px;
    }


    .quick-view-image {
        min-height: 280px;

        max-height: 320px;
    }


    .quick-view-image img {
        min-height: 280px;
    }


    .quick-view-title {
        font-size: 25px;
    }


    .quick-view-price {
        font-size: 28px;
    }


    .quick-view-description {
        font-size: 15px;
    }


    .quick-view-close {
        top: 12px;

        right: 12px;

        width: 42px;

        height: 42px;
    }


    .quick-view-cart form.cart {
        align-items: stretch;
    }


    .quick-view-cart
    .single_add_to_cart_button {
        flex: 1;
    }


    .custom-product-actions {
        flex-wrap: wrap;
    }


    .custom-product-actions .button,
    .custom-product-actions .custom-quick-view {
        height: 40px;

        font-size: 13px !important;

        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}