/* ==========================================================================
   QA/QC GLOBAL OVERFLOW FIX - PREVENT HORIZONTAL SCROLL & RIGHT WHITE SPACE
   ========================================================================== */
html,
body {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

#page,
.site,
#content,
main,
.elementor,
.elementor-section-wrap,
.elementor-section,
.elementor-container,
.elementor-column,
.elementor-widget-wrap,
.zuki-main-container {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body .elementor-section-stretched {
    max-width: 100% !important;
    left: 0 !important;
}

.zuki-main-product-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 40px !important;
    padding: 40px 5% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.zuki-product-left-col {
    flex: 0 0 55% !important;
    width: 55% !important;
    max-width: 55% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
}
.zuki-product-info-section {
    flex: 0 0 40% !important;
    width: 40% !important;
    max-width: 40% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
}
.zuki-product-left-col .woocommerce-product-gallery {
    opacity: 1 !important;
    width: 100% !important;
}
.zuki-product-left-col .woocommerce-product-gallery__wrapper {
    display: grid !important;
    grid-template-columns: 38fr 62fr !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
.zuki-product-left-col .woocommerce-product-gallery__image {
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}
.zuki-product-left-col .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: 380px !important;
    object-fit: cover !important;
    display: block !important;
}
.zuki-product-left-col .woocommerce-product-gallery__image:nth-child(3n) {
    grid-column: 1 / -1 !important;
}
.zuki-product-left-col .woocommerce-product-gallery__image:nth-child(3n) img {
    height: 480px !important;
}
@media (max-width: 768px) {
    .zuki-main-product-container {
        flex-direction: column !important;
    }
    .zuki-product-left-col {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
    .zuki-product-info-section {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
}

/* Remove dotted underline from required field asterisks on checkout */
.woocommerce-checkout abbr.required,
.woocommerce-checkout span.required,
.woocommerce-checkout .required,
#billing_phone_field label span.required,
#billing_phone_field label abbr.required,
#billing_phone_field label .required {
    border: none !important;
    border-bottom: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Make product variation display inline in checkout review order table */
.woocommerce-checkout .product-name .variation {
    display: grid !important;
    grid-template-columns: max-content 1fr !important;
    gap: 2px 6px !important;
    margin: 5px 0 0 0 !important;
}
.woocommerce-checkout .product-name .variation dt {
    grid-column: 1 !important;
    font-weight: 500 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.woocommerce-checkout .product-name .variation dd {
    grid-column: 2 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.woocommerce-checkout .product-name .variation dd p {
    display: inline !important;
    margin: 0 !important;
}

/* Remove underline from WooCommerce sale price (ins tag) globally */
.woocommerce .zuki-sp-price ins,
.woocommerce .zuki-sp-price ins bdi,
.single-product .price ins,
.single-product .price ins bdi,
.woocommerce-page .price ins,
.woocommerce-page .price ins bdi,
.zuki-product-card-price ins,
.zuki-product-card-price ins *,
.woocommerce-page ins,
.woocommerce ins,
ins,
ins * {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Prevent WooCommerce notices from scrolling under the sticky header */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info,
.woocommerce-NoticeGroup {
    scroll-margin-top: calc(var(--zuki-header-height, 120px) + 20px) !important;
}

/* Global Header Spacer: Make body padding-top match dynamic header height on all screens */
body {
    padding-top: var(--zuki-header-height, 140px) !important;
}

/* Ensure product layout and account page wrappers have standard padding inside the body */
.zuki-sp-layout {
    padding-top: 20px !important;
}

.zuki-account-v2-wrapper {
    padding-top: 40px !important;
}

@media (max-width: 768px) {
    .zuki-account-v2-wrapper {
        padding-top: 20px !important;
    }
}

/* Fix squished policy text widget and container padding in mobile view */
@media (max-width: 767px) {
    /* Reset widget padding if any */
    .elementor-widget-zuki_policy_text > .elementor-widget-container {
        padding-left: 0px !important;
        padding-right: 0px !important;
    }
    
    /* Reset parent container padding on Exchange, Shipping, and Warranty pages */
    .page-id-2180 .e-con,
    .page-id-2180 .e-con-inner,
    .page-id-2185 .e-con,
    .page-id-2185 .e-con-inner,
    .page-id-2175 .e-con,
    .page-id-2175 .e-con-inner {
        --padding-left: 20px !important;
        --padding-right: 20px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}
