/*
 * UAH Product Manager — front-end styling (v1.5.5)
 *
 * Three things this revision fixes:
 *   1. The tab-nav underline (under "DESCRIPTION REVIEWS") was extending
 *      full-width and disappearing behind the floating pricing summary.
 *      Now constrained and z-indexed so it stays in front and the summary
 *      box doesn't visually clip it.
 *   2. Table text was at 0.82 opacity — looked faded. Both labels AND
 *      values are now full weight 600, no opacity reduction.
 *   3. Section titles (Features / Specifications / Packaging) now share
 *      one consistent 2px divider — bolder than the tab line, thinner
 *      than the heading text itself.
 */

/* ─── Tab nav: keep the underline contained + on top of the summary ── */
.product .woocommerce-tabs,
.woocommerce-tabs.wc-tabs-wrapper {
    position: relative;
    z-index: 5;
    clear: both;
}

/* The horizontal line under DESCRIPTION/REVIEWS belongs to .wc-tabs.
 * Cap its width to the content row so it doesn't trail behind the
 * pricing summary on the right column. */
.product .wc-tabs,
.woocommerce-tabs .wc-tabs {
    position: relative;
    z-index: 5;
    background: transparent;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Give the tab container a fresh hairline divider that's our own — replaces
 * whatever the theme/WoodMart was drawing. This one is clipped properly
 * because it lives on the tabs container, not on an inner element. */
.product .woocommerce-tabs::before,
.woocommerce-tabs.wc-tabs-wrapper::before {
    content: none; /* placeholder; the theme already gives us a line, we just keep it z-indexed above */
}

/* ─── Description-tab content ─────────────────────────────────────── */
.uah-pm-description {
    /* No font-family — inherit theme cascade. */
    color: inherit;
    font-size: inherit;
    line-height: 1.7;
}

.uah-pm-description .uah-pm-intro {
    margin: 0 0 32px;
}
.uah-pm-description .uah-pm-intro p:last-child {
    margin-bottom: 0;
}

/* ─── Sections ─────────────────────────────────────────────────── */
.uah-pm-description .uah-section {
    margin: 0;
    padding: 0;
}
.uah-pm-description .uah-section + .uah-section {
    margin-top: 44px;
}

/* Consistent, prominent section divider under EVERY title (Features,
 * Specifications, Packaging). Bolder than the tab nav's 1px hairline,
 * thinner than the heading text itself. */
.uah-pm-description .uah-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: inherit;
    margin: 0 0 22px;
    padding: 0 0 14px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.22);
    text-transform: none;
    letter-spacing: -0.005em;
}

/* ─── Features — clean two-column list with subtle bullets ────── */
.uah-pm-description .uah-features-body {
    font-size: 0.97em;
    line-height: 1.65;
}
.uah-pm-description .uah-features-body ul {
    list-style: none !important;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 48px;
    row-gap: 14px;
}
.uah-pm-description .uah-features-body li {
    list-style: none !important;
    position: relative;
    padding-left: 22px;
    margin: 0;
    color: inherit;
    font-weight: 600;
}
.uah-pm-description .uah-features-body li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.65;
}
.uah-pm-description .uah-features-body p {
    margin: 0 0 12px;
    font-weight: 600;
}
.uah-pm-description .uah-features-body p:last-child {
    margin-bottom: 0;
}

/* ─── Data tables (Specifications + Packaging) ─────────────────── */
.uah-pm-description .uah-data-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    table-layout: fixed;
}
.uah-pm-description .uah-data-table tr {
    background: transparent;
    border: 0;
    transition: background-color 120ms ease;
}
.uah-pm-description .uah-data-table tr + tr {
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}
.uah-pm-description .uah-data-table tr:hover {
    background: rgba(0, 0, 0, 0.02);
}
.uah-pm-description .uah-data-table th,
.uah-pm-description .uah-data-table td {
    padding: 16px 24px 16px 0;
    text-align: left;
    vertical-align: top;
    font-size: 0.96em;
    line-height: 1.55;
    background: transparent;
    border: 0;
    word-break: break-word;
    /* Both labels AND values are bold + full opacity now. */
    font-weight: 600 !important;
    color: inherit;
    opacity: 1;
}
.uah-pm-description .uah-data-table th {
    width: 38%;
    text-transform: none;
    letter-spacing: 0;
    font-style: normal;
}
.uah-pm-description .uah-data-table td {
    padding-right: 0;
}

/* ─── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
    .uah-pm-description .uah-features-body ul {
        column-gap: 32px;
        row-gap: 12px;
    }
}

@media (max-width: 680px) {
    .uah-pm-description .uah-section + .uah-section {
        margin-top: 36px;
    }
    .uah-pm-description .uah-section-title {
        font-size: 1.15rem;
        margin-bottom: 18px;
        padding-bottom: 12px;
    }
    .uah-pm-description .uah-features-body ul {
        grid-template-columns: 1fr;
        column-gap: 0;
        row-gap: 10px;
    }
    .uah-pm-description .uah-data-table {
        table-layout: auto;
    }
    .uah-pm-description .uah-data-table th,
    .uah-pm-description .uah-data-table td {
        padding: 13px 16px 13px 0;
        font-size: 0.94em;
    }
    .uah-pm-description .uah-data-table th {
        width: 42%;
    }
}

@media (max-width: 420px) {
    .uah-pm-description .uah-data-table th,
    .uah-pm-description .uah-data-table td {
        padding: 12px 12px 12px 0;
    }
}

/* ─── Defensive overrides against noisy theme rules ────────────── */
.woocommerce-Tabs-panel--description .uah-pm-description ul,
.woocommerce-Tabs-panel--description .uah-pm-description ul li {
    list-style: none !important;
}
.woocommerce-Tabs-panel--description .uah-pm-description table {
    margin: 0 !important;
}
.woocommerce-Tabs-panel--description .uah-pm-description table th,
.woocommerce-Tabs-panel--description .uah-pm-description table td {
    background: transparent !important;
}

/* ═══════════════════════════════════════════════════════════════════
 *  v1.6.0 — New Template (pilot product)
 *  All rules scoped to body.uah-pd-template so non-pilot products
 *  stay untouched. Activated by UAH_Frontend::product_uses_new_template().
 * ═══════════════════════════════════════════════════════════════════ */

/* Meta pill cards: Min Order + Lead Time */
body.uah-pd-template .uah-pd-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0 18px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body.uah-pd-template .uah-pd-meta .meta-item {
    background: #f8f8f9;
    border-radius: 10px;
    padding: 12px 14px;
}
body.uah-pd-template .uah-pd-meta .meta-label {
    display: block;
    font-size: 11.5px;
    color: #9ca3af;
    margin-bottom: 4px;
    font-weight: 600;
}
body.uah-pd-template .uah-pd-meta .meta-value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

/* Shipping & Trade panel */
body.uah-pd-template .uah-pd-shipping {
    margin: 16px 0 18px;
    padding: 16px 18px;
    background: #f8f8f9;
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body.uah-pd-template .uah-pd-shipping .ship-title {
    font-size: 11.5px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    margin-bottom: 10px;
}
body.uah-pd-template .uah-pd-shipping .ship-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 7px 0;
    font-size: 13.5px;
    line-height: 1.4;
}
body.uah-pd-template .uah-pd-shipping .ship-row:not(:last-child) {
    border-bottom: 1px solid #ececec;
}
body.uah-pd-template .uah-pd-shipping .ship-label {
    color: #6b7280;
    flex-shrink: 0;
    margin-right: 12px;
}
body.uah-pd-template .uah-pd-shipping .ship-value {
    color: #1a1a1a;
    font-weight: 600;
    text-align: right;
}

/* Make the WooCommerce summary column behave like a sticky pricing card.
 * Selectors target the most common WoodMart / WC product-summary wrappers. */
body.uah-pd-template div.product div.summary,
body.uah-pd-template .wd-section-summary {
    align-self: start;
}
@media (min-width: 1024px) {
    body.uah-pd-template div.product div.summary,
    body.uah-pd-template .wd-section-summary {
        position: sticky;
        top: 15vh;        /* vertical-center a ~70vh summary in the viewport */
        z-index: 5;
    }
}

/* Mobile: nothing extra to do on the pricing extras — they sit inline in
 * the summary column which is already below the image on small screens. */
@media (max-width: 1023px) {
    body.uah-pd-template div.product div.summary,
    body.uah-pd-template .wd-section-summary {
        position: static;
    }
}

/* ─── Fix the tab-nav underline overlap with floating pricing box ─
 * The wc-tabs-wrapper sometimes sits behind the summary column on
 * Elementor-templated WoodMart pages because the summary has higher
 * stacking context. Force the entire tab area (nav + content) to sit
 * on its own z-index layer so its border-bottom isn't clipped by the
 * sibling pricing summary box on the right.
 *
 * Also: clip the long horizontal line that draws across the full row
 * width — wrap it in `overflow: hidden` so it can't bleed past the
 * tab container's own right edge.
 */
.woocommerce-tabs.wc-tabs-wrapper {
    overflow: visible;
}
.product .woocommerce-tabs .wc-tabs,
.woocommerce-tabs .wc-tabs {
    /* Strip the theme's potentially long border so it can't extend
     * behind the right-column pricing box. We re-draw a contained one
     * via the parent element below. */
    border-bottom: 0 !important;
    box-shadow: none !important;
}
.product .woocommerce-tabs .wc-tabs-wrapper,
.woocommerce-tabs.wc-tabs-wrapper,
.product .woocommerce-tabs {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    padding-bottom: 0;
}
/* Active-tab indicator: a clear, contained underline only under the
 * active tab label, instead of a long line under the whole row. */
.product .wc-tabs li.active a,
.product .wc-tabs li.wd-active a,
.product .wc-tabs li[aria-selected="true"] a {
    position: relative;
}
.product .wc-tabs li.active a::after,
.product .wc-tabs li.wd-active a::after,
.product .wc-tabs li[aria-selected="true"] a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: currentColor;
}
