/* general  */

.wizz4-cart-drawer-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2147483640;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wizz4-cart-drawer-background.wizz4-visible {
    visibility: visible;
    opacity: 1;
    display: block;
}

.wizz4-cart-drawer {
    position: fixed;
    top: 0;
    width: min(440px, 100vw);
    height: 100%;
    overflow: hidden;
    background: #ffffff;
    /* transform: translateX(100%); */
    transition: transform 0.3s ease-in-out;
    z-index: 2147483641;
}

/* V1 side upsell — legacy sidebar ~200px + 440px cart */
.wizz4-cart-drawer.has-side-upsell {
    width: min(640px, 100vw);
}

/* V2 expanded-view — 188px sidebar + 440px cart (+ border) */
.wizz4-cart-drawer.wizz4-cart-drawer--with-side-upsell.has-side-upsell {
    width: min(629px, 100vw);
}

/* V2 cartWidth only — does not affect V1 */
.wizz4-cart-drawer.wizz4-cart-drawer--v2.wizz4-cart-drawer--width-wide {
    width: min(460px, 100vw);
}

.wizz4-cart-drawer.wizz4-cart-drawer--v2.has-side-upsell.wizz4-cart-drawer--width-wide {
    width: min(660px, 100vw);
}

.wizz4-cart-drawer.wizz4-cart-drawer--v2.wizz4-cart-drawer--with-side-upsell.has-side-upsell.wizz4-cart-drawer--width-wide {
    width: min(649px, 100vw);
}

.wizz4-cart-drawer.wizz4-visible {
    transform: translateX(0) !important;
}
.hover-underline-div:hover{
    text-decoration: underline !important;
}
.no-scroll {
    overflow: hidden;
    touch-action: none;
}

/* end general  */

/* header  */
.wizz4-cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    height: 56px;
}
.wizz4-title-cart {
    font-size: 2.4rem;
    font-weight: 650;
    line-height: 24px;
    letter-spacing: -0.2px;
    color: #000;
}

@media (max-width: 640px){
    /* V1 — unchanged legacy mobile widths */
    .wizz4-cart-drawer.has-side-upsell:not(.wizz4-cart-drawer--v2) {
        width: min(440px, 100vw);
    }

    /* V2 cartWidth — normal: modal inset; wide: full screen */
    .wizz4-cart-drawer.wizz4-cart-drawer--v2.wizz4-cart-drawer--width-normal {
        width: min(440px, calc(100vw - 32px)) !important;
        max-width: calc(100vw - 32px);
    }

    .wizz4-cart-drawer.wizz4-cart-drawer--v2.wizz4-cart-drawer--width-normal.has-side-upsell,
    .wizz4-cart-drawer.wizz4-cart-drawer--v2.wizz4-cart-drawer--width-normal.wizz4-cart-drawer--with-side-upsell.has-side-upsell {
        width: min(440px, calc(100vw - 32px)) !important;
        max-width: calc(100vw - 32px);
    }

    .wizz4-cart-drawer.wizz4-cart-drawer--v2.wizz4-cart-drawer--width-wide {
        width: 100vw !important;
        max-width: 100vw;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
    }

    .wizz4-cart-drawer.wizz4-cart-drawer--v2.wizz4-cart-drawer--width-wide.has-side-upsell,
    .wizz4-cart-drawer.wizz4-cart-drawer--v2.wizz4-cart-drawer--width-wide.wizz4-cart-drawer--with-side-upsell.has-side-upsell {
        width: 100vw !important;
        max-width: 100vw;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
    }

    #w4-upsellbeside-mobile{
        display: block !important;
    }
    #w4-upsellbeside-pc{
        display: none !important;
    }
}

/* end header  */
@media (max-width: 440px) {
    #w4-storefront-drawer {
        width: 100% !important;
    }
    .wizz4-cart-drawer.custom-width {
        width: calc(100% - 30px) !important;
        min-width: unset !important;
        max-width: unset !important;
    }
    .wizz4-cart-drawer {
        width: 100% !important;
    }
    .wizz4-cart-drawer.wizz4-cart-drawer--v2.wizz4-cart-drawer--width-wide {
        width: 100% !important;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
    }
    .wizz4-cart-drawer.wizz4-cart-drawer--v2.wizz4-cart-drawer--width-normal {
        width: calc(100% - 30px) !important;
        min-width: unset !important;
        max-width: unset !important;
    }
    #w4-storefront-item {
        gap: 6px !important;
    }
    #w4-storefront-item-img {
        width: 90px !important;
        /* height: auto !important; */
    }
    #w4-storefront-upsell {
        gap: 10px !important;
    }
    #w4-storefont-upsell-img {
        width: 80px !important;
    }
    .w4-storefront-upsell-btnAdd span{
        margin: 4px 8px !important;
    }
    #w4-storefront-upsell-title {
        max-width: 200px !important;
    }

    #product-review-wizz {
        flex-direction: column !important;
        align-items: end !important;
    }
    #product-saving-wizz {
        white-space: wrap !important;
    }
    #w4-storefront-upsell-item {
        padding: 0 !important;
    }
}

#w4-express-payment-cart {
    --shopify-accelerated-checkout-button-block-size: 52px;
    --shopify-accelerated-checkout-button-inline-size: 54px;
    --shopify-accelerated-checkout-button-border-radius: 4px;
    --shopify-accelerated-checkout-button-box-shadow: none;
    --shopify-accelerated-checkout-inline-alignment: flex-start;
    --shopify-accelerated-checkout-row-gap: 8px;
    --shopify-accelerated-checkout-skeleton-background-color: #dedede;
    --shopify-accelerated-checkout-skeleton-animation-opacity-start: 1;
    --shopify-accelerated-checkout-skeleton-animation-opacity-end: 0.5;
    --shopify-accelerated-checkout-skeleton-animation-duration: 4s;
    --shopify-accelerated-checkout-skeleton-animation-timing-function: ease;

}

.special-shop-layout {
    flex-direction: row !important;
    align-items: center !important;
    display: flex !important;
}
