/**
 * Module 5.1 CSS Hotfixes — appended AFTER single-product.css.
 * Boosts specificity to win Ecomus parent-theme overrides.
 */

/* =====================================================================
 * TABS — kill Ecomus overrides, force our design
 * =================================================================== */

body.jw-single-product .jw-tabs {
    max-width: var(--jw-container-narrow, 900px);
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: 0;
}

body.jw-single-product .jw-tabs__nav {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 4px;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--jw-charcoal-10) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto;
}

body.jw-single-product .jw-tabs__nav .jw-tabs__tab,
body.jw-single-product .jw-tabs button.jw-tabs__tab {
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    color: var(--jw-charcoal-50) !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 18px 24px !important;
    font-family: var(--jw-font-sans) !important;
    font-size: 12px !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    cursor: pointer;
    position: relative !important;
    white-space: nowrap;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: color 200ms var(--jw-ease) !important;
    height: auto !important;
    line-height: 1 !important;
    margin: 0 !important;
    text-decoration: none !important;
}

body.jw-single-product .jw-tabs__nav .jw-tabs__tab:hover {
    color: var(--jw-charcoal) !important;
    background: transparent !important;
}

body.jw-single-product .jw-tabs__nav .jw-tabs__tab.is-active {
    color: var(--jw-charcoal) !important;
    background: transparent !important;
    background-image: none !important;
}

body.jw-single-product .jw-tabs__nav .jw-tabs__tab.is-active::after,
body.jw-single-product .jw-tabs__nav .jw-tabs__tab.is-active::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: -1px !important;
    top: auto !important;
    height: 2px !important;
    width: auto !important;
    background: var(--jw-champagne) !important;
    background-image: none !important;
    border-radius: 0 !important;
    display: block !important;
    transform: none !important;
    opacity: 1 !important;
}

body.jw-single-product .jw-tabs__nav .jw-tabs__tab.is-active::before { display: none !important; }

body.jw-single-product .jw-tabs__panels {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.jw-single-product .jw-tabs__panel {
    display: none !important;
    padding: 40px 0 !important;
    font-family: var(--jw-font-sans);
    font-size: 15px;
    line-height: 1.7;
    color: var(--jw-charcoal-70);
    background: transparent !important;
    border: 0 !important;
}
body.jw-single-product .jw-tabs__panel.is-active { display: block !important; }

body.jw-single-product .jw-tabs__panel p { margin: 0 0 16px; }
body.jw-single-product .jw-tabs__panel p:last-child { margin-bottom: 0; }
body.jw-single-product .jw-tabs__panel img { max-width: 100%; height: auto; }

/* Hide any lingering Woo native tabs wrapper that may still render */
body.jw-single-product .woocommerce-tabs:not(.jw-tabs),
body.jw-single-product .wc-tabs-wrapper,
body.jw-single-product ul.wc-tabs,
body.jw-single-product .tabs.wc-tabs,
body.jw-single-product .woocommerce-tabs > .panel:not([data-tab-panel]),
body.jw-single-product .up-sells.upsells,
body.jw-single-product .related.products:not(.jw-related) {
    display: none !important;
}

/* Kill Ecomus's "Features / Materials Care" injection blocks if they leak */
body.jw-single-product .jw-tabs__panel .product-features,
body.jw-single-product .jw-tabs__panel .product-materials-care,
body.jw-single-product .jw-tabs__panel .tf-product-features,
body.jw-single-product .jw-tabs__panel .tf-product-materials {
    display: none !important;
}

/* =====================================================================
 * SIZE SELECTOR — inside form, tighter spacing
 * =================================================================== */

.jw-purchase .jw-size-selector {
    margin-bottom: var(--jw-space-4, 16px);
    padding-bottom: var(--jw-space-4, 16px);
    border-bottom: 1px solid var(--jw-charcoal-10, rgba(26,26,26,0.08));
}
.jw-purchase .jw-size-selector:last-child { border-bottom: 0; }

/* =====================================================================
 * MOBILE STICKY BAR — cleaner shadow
 * =================================================================== */

body.jw-single-product .jw-sticky-bar {
    box-shadow: 0 -10px 40px rgba(26,26,26,0.10) !important;
}

/* =====================================================================
 * EMPTY CART — quick polish (proper cart page ships in Module 6)
 * =================================================================== */

.woocommerce-cart .wc-empty-cart-message,
.woocommerce-cart .cart-empty {
    font-family: var(--jw-font-serif, Georgia, serif);
    font-size: 28px !important;
    color: var(--jw-charcoal, #1A1A1A) !important;
    text-align: center;
    margin: 60px 0 20px !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
}

.woocommerce-cart .return-to-shop {
    text-align: center;
    margin: 20px 0 60px !important;
}

.woocommerce-cart .return-to-shop .button,
.woocommerce-cart .return-to-shop .wc-backward {
    display: inline-block;
    padding: 14px 32px !important;
    background: var(--jw-charcoal, #1A1A1A) !important;
    color: var(--jw-ivory, #FAF7F2) !important;
    font-family: var(--jw-font-sans, sans-serif) !important;
    font-size: 12px !important;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 6px !important;
    border: 0 !important;
    text-decoration: none;
    transition: all 200ms var(--jw-ease, ease);
}
.woocommerce-cart .return-to-shop .button:hover {
    background: #000 !important;
    transform: translateY(-1px);
}

.woocommerce-cart .woocommerce-error,
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info {
    max-width: var(--jw-container, 1240px);
    margin: 24px auto !important;
    padding: 16px 20px !important;
    background: #FFF5F5 !important;
    border: 1px solid rgba(180,69,59,0.2) !important;
    border-left: 3px solid var(--jw-danger, #B4453B) !important;
    color: var(--jw-danger, #B4453B) !important;
    border-radius: 6px !important;
    font-family: var(--jw-font-sans, sans-serif) !important;
    font-size: 14px !important;
    box-shadow: none !important;
}
