/* Product details share the same surface/text contract as other outer cards. */
body.single-product.woocommerce .challenger-product-overview,
body.single-product.woocommerce div.product > .woocommerce-tabs {
    --challenger-product-text: var(--challenger-on-surface, var(--challenger-text));
    min-width: 0;
    padding: clamp(20px, 3vw, 36px);
    border: 1px solid var(--challenger-border);
    border-radius: var(--challenger-radius);
    background-color: var(--challenger-surface);
    color: var(--challenger-product-text);
    box-shadow: var(--challenger-shadow);
    margin-bottom: 28px;
}

body.single-product.woocommerce .challenger-product-overview {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(22px, 3vw, 40px);
}

body.single-product.woocommerce div.product .challenger-product-overview > div.images,
body.single-product.woocommerce div.product .challenger-product-overview > div.summary {
    float: none !important;
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
    clear: none;
}

body.single-product.woocommerce .challenger-product-overview .product_title {
    margin: 0 0 14px;
    font-size: clamp(1.65rem, 2.5vw, 2.3rem);
    overflow-wrap: anywhere;
}

/* One hierarchy: title, price/legal info, facts, purchase controls. */
body.single-product.woocommerce .challenger-product-overview .summary > .price {
    margin: 0 0 6px;
    font-size: clamp(1.5rem, 2.2vw, 1.9rem);
    line-height: 1.25;
}
body.single-product.woocommerce .challenger-product-overview .summary .legal-price-info {
    margin: 0 0 20px;
    font-size: .875rem;
    line-height: 1.5;
}
body.single-product.woocommerce .challenger-product-overview .summary .legal-price-info p {
    margin: 0;
}
body.single-product.woocommerce .challenger-product-overview .summary .tax-info {
    margin-right: .35em;
}
body.single-product.woocommerce .challenger-product-overview .summary .price,
body.single-product.woocommerce .challenger-product-overview .summary .price *,
body.single-product.woocommerce .challenger-product-overview .summary .amount {
    color: var(--challenger-product-text) !important;
    -webkit-text-fill-color: currentColor !important;
}

/* Core 1.2.12 labels ordinary facts explicitly; real error notices retain
   their existing warning treatment. No text/DOM matching in the browser. */
body.single-product.woocommerce div.product .challenger-product-overview div.summary > .challenger-product-fact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 8px 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 0 8px !important;
    padding: 12px 14px;
    border: 1px solid var(--challenger-border);
    border-radius: 12px;
    background: var(--challenger-inner-surface);
    color: var(--challenger-on-inner-surface) !important;
    -webkit-text-fill-color: currentColor !important;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
}
body.single-product.woocommerce .challenger-product-overview .challenger-product-fact-label {
    overflow-wrap: anywhere;
}
body.single-product.woocommerce .challenger-product-overview .challenger-product-fact-value {
    font-weight: 800;
    text-align: right;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}
body.single-product.woocommerce div.product .challenger-product-overview .summary form.cart {
    margin: 18px 0 20px;
}
body.single-product.woocommerce .challenger-product-overview .summary form.cart .quantity {
    display: flex;
    flex: 0 0 auto;
    align-items: stretch;
}
body.single-product.woocommerce .challenger-product-overview .summary form.cart input.qty {
    box-sizing: border-box;
    width: 80px;
    min-height: 46px;
    margin: 0;
    padding: 10px 8px;
    border: 1px solid var(--challenger-border);
    border-radius: 12px;
    background: var(--challenger-inner-surface);
    color: var(--challenger-on-inner-surface);
    font: inherit;
    font-weight: 700;
    text-align: center;
}
body.single-product.woocommerce .challenger-product-overview .summary form.cart .single_add_to_cart_button {
    box-sizing: border-box;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.3;
}
body.single-product.woocommerce .challenger-product-overview .summary .challenger-sales-start-notice {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--challenger-surface-alt);
    color: var(--challenger-on-surface-alt);
    -webkit-text-fill-color: currentColor;
    font-size: .9375rem;
    line-height: 1.5;
}
body.single-product.woocommerce .challenger-product-overview .summary .product_meta {
    margin-top: 20px;
    padding-top: 14px;
    font-size: .875rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
body.single-product.woocommerce .challenger-product-overview .summary .product_meta > span {
    display: block;
}
body.single-product.woocommerce .challenger-product-overview .challenger-product-safety,
body.single-product.woocommerce .challenger-product-overview .challenger-product-safety :where(summary, p, a, dl, dt, dd, strong) {
    color: var(--challenger-on-inner-surface);
    -webkit-text-fill-color: currentColor;
}

/* Sale badges remain over the gallery, not a third grid cell. */
body.single-product.woocommerce .challenger-product-overview > .onsale {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

body.single-product.woocommerce div.product > .woocommerce-tabs ul.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0 0 22px;
    overflow: visible;
    list-style: none;
    border: 0;
    box-shadow: none;
}
body.single-product.woocommerce div.product > .woocommerce-tabs ul.tabs::before,
body.single-product.woocommerce div.product > .woocommerce-tabs ul.tabs::after,
body.single-product.woocommerce div.product > .woocommerce-tabs ul.tabs li::before,
body.single-product.woocommerce div.product > .woocommerce-tabs ul.tabs li::after {
    /* WooCommerce's #content clearfix otherwise outranks this stylesheet. */
    display: none !important;
    content: none !important;
    border: 0 !important;
    box-shadow: none !important;
}
body.single-product.woocommerce div.product > .woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
    border: 1px solid var(--challenger-border);
    border-radius: 999px;
    background: var(--challenger-inner-surface);
    color: var(--challenger-on-inner-surface);
}
body.single-product.woocommerce div.product > .woocommerce-tabs ul.tabs li a {
    display: block;
    text-decoration: none;
    padding: 10px 18px;
    color: inherit;
    -webkit-text-fill-color: currentColor;
}
body.single-product.woocommerce div.product > .woocommerce-tabs ul.tabs li.active {
    background: var(--challenger-contrast-bg);
    color: var(--challenger-on-contrast);
}
body.single-product.woocommerce div.product > .woocommerce-tabs .panel {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    body.single-product.woocommerce .challenger-product-overview {
        grid-template-columns: minmax(0, 1fr);
    }
}
