/* Shared food and medical product details; no theme files are changed. */
body.cpg-app-product-page { --cpg-ink:#243247; --cpg-brand:#3d4c62; --cpg-muted:#596579; --cpg-red:#b70e0c; --cpg-detail-tint:#f0eae3; }
body.cpg-app-product-page #main { background:#fff; padding:24px clamp(16px,3vw,48px) 50px!important; }
body.cpg-app-product-page #main > .fusion-row { max-width:1440px!important; }
body.cpg-app-product-page #content { width:100%!important; float:none!important; }
body.cpg-app-product-page .cpg-detail-back { display:inline-flex; align-items:center; min-height:44px; margin-bottom:18px; color:var(--cpg-brand); font-size:14px; font-weight:600; text-decoration:none; }
body.cpg-app-product-page .cpg-detail-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:clamp(24px,4vw,64px); align-items:start; color:var(--cpg-ink); }
.cpg-detail-grid *, .cpg-detail-grid *::before, .cpg-detail-grid *::after { box-sizing:border-box; }
body.cpg-app-product-page .cpg-detail-hero { min-width:0; position:sticky; top:110px; padding:24px; overflow:hidden; border-radius:28px; background:linear-gradient(155deg,var(--cpg-detail-tint),#fff 86%); }
body.cpg-app-product-page .cpg-detail-hero .avada-single-product-gallery-wrapper,
body.cpg-app-product-page .cpg-detail-hero .woocommerce-product-gallery { float:none!important; width:100%!important; max-width:none!important; margin:0!important; }
body.cpg-app-product-page .cpg-detail-hero .woocommerce-product-gallery__image img { width:100%; height:auto; max-height:65vh; object-fit:contain; }
body.cpg-app-product-page .cpg-detail-hero .woocommerce-product-gallery__image { background:transparent; }
body.cpg-app-product-page .cpg-detail-hero .flex-control-thumbs { margin-top:14px; }
body.cpg-app-product-page .cpg-detail-hero .onsale { top:12px; left:12px; border-radius:99px; }
body.cpg-app-product-page .cpg-detail-grid > .summary { width:auto!important; float:none!important; margin:0!important; min-width:0; }
body.cpg-app-product-page .cpg-detail-grid .summary-container { padding:4px 0 0!important; }
body.cpg-app-product-page .cpg-detail-grid .product_title { margin:0 0 12px!important; font-size:clamp(26px,2.4vw,36px)!important; font-weight:800!important; line-height:1.12!important; letter-spacing:-.6px; color:var(--cpg-ink)!important; overflow-wrap:anywhere; }
body.cpg-app-product-page .cpg-detail-grid .produkt-artikelnummer,
body.cpg-app-product-page .cpg-detail-grid .product-border { display:none; }
body.cpg-app-product-page .cpg-detail-grid .woocommerce-product-details__short-description { font-size:15px; line-height:1.5; color:var(--cpg-muted); margin:0 0 16px; }
body.cpg-app-product-page .cpg-detail-grid .woocommerce-product-details__short-description p { margin:0 0 10px; }
.cpg-detail-facts { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 24px; }
.cpg-detail-fact, .cpg-detail-tag { display:inline-flex; align-items:center; gap:6px; min-height:38px; border-radius:14px; padding:7px 10px; background:#e8ebf0; font-size:12px; line-height:1.3; font-weight:600; color:var(--cpg-ink); text-decoration:none; }
.cpg-detail-fact img { object-fit:contain; flex:0 0 26px; }
.cpg-detail-tag { background:#3d4c6212; color:var(--cpg-brand); }
body.cpg-app-product-page .cpg-detail-grid .price { font-size:26px!important; line-height:1.3; font-weight:750; color:var(--cpg-ink)!important; margin:0 0 14px!important; }
body.cpg-app-product-page .cpg-detail-grid .price del { font-size:17px; color:var(--cpg-muted); margin-right:8px; }
body.cpg-app-product-page .cpg-detail-grid .price ins { background:transparent; text-decoration:none; color:var(--cpg-red); }
body.cpg-app-product-page .cpg-detail-grid form.cart { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:0 0 26px!important; }
/* Match the catalog/cart controls while retaining WooCommerce's native form. */
body.cpg-app-product-page #main .cpg-detail-grid form.cart .quantity { display:flex; flex:0 0 auto; align-items:center; justify-content:center; gap:4px; width:auto; height:44px; margin:0!important; border:0; border-radius:0; overflow:visible; float:none; background:transparent; }
body.cpg-app-product-page #main .cpg-detail-grid form.cart .quantity input { flex:0 0 44px; width:44px!important; min-width:0; height:44px!important; margin:0; padding:0!important; border:0!important; box-shadow:none; font-family:inherit; text-align:center; }
body.cpg-app-product-page #main .cpg-detail-grid form.cart .quantity input.minus,
body.cpg-app-product-page #main .cpg-detail-grid form.cart .quantity input.plus { min-height:44px; border-radius:50%; color:#fff; font-size:24px; line-height:1; cursor:pointer; -webkit-appearance:none; appearance:none; }
body.cpg-app-product-page #main .cpg-detail-grid form.cart .quantity input.minus { background:var(--cpg-brand); }
body.cpg-app-product-page #main .cpg-detail-grid form.cart .quantity input.plus { background:var(--cpg-red); }
body.cpg-app-product-page #main .cpg-detail-grid form.cart .quantity input.qty { background:transparent; color:var(--cpg-ink); font-size:16px; font-weight:700; -moz-appearance:textfield; appearance:textfield; }
body.cpg-app-product-page #main .cpg-detail-grid form.cart .quantity input.qty::-webkit-inner-spin-button,
body.cpg-app-product-page #main .cpg-detail-grid form.cart .quantity input.qty::-webkit-outer-spin-button { margin:0; -webkit-appearance:none; }
body.cpg-app-product-page #main .cpg-detail-grid form.cart .quantity.hidden,
body.cpg-app-product-page #main .cpg-detail-grid form.cart .quantity:has(input.qty[type="hidden"]) { display:none; }
body.cpg-app-product-page .cpg-detail-grid .single_add_to_cart_button { display:inline-flex; align-items:center; justify-content:center; gap:0; flex:0 0 44px; width:44px; min-width:44px; height:44px; min-height:44px; float:none!important; margin:0!important; padding:0!important; border:0!important; border-radius:50%!important; background:var(--cpg-red)!important; color:#fff!important; font:inherit; font-size:0!important; line-height:1; box-shadow:none!important; text-transform:none; }
.cpg-detail-grid .single_add_to_cart_button::before { content:''; display:block; width:20px; height:20px; flex:0 0 20px; background:currentColor; mask:url('../icons/cart.svg') center/contain no-repeat; -webkit-mask:url('../icons/cart.svg') center/contain no-repeat; }
.cpg-detail-grid .tinv-wraper { margin:0!important; width:44px; flex:0 0 44px; }
body.cpg-app-product-page .cpg-detail-grid a.tinvwl_add_to_wishlist_button { width:44px!important; height:44px!important; padding:0!important; margin:0!important; display:inline-flex!important; align-items:center; justify-content:center; border:1px solid #d8dee7!important; border-radius:50%!important; background:#fff!important; font-size:0!important; }
body.cpg-app-product-page .cpg-detail-grid a.tinvwl_add_to_wishlist_button::before { content:''!important; display:block!important; width:22px!important; height:22px!important; margin:0!important; background:url('../icons/heart.svg') center/contain no-repeat!important; }
body.cpg-app-product-page .cpg-detail-grid a.tinvwl-product-in-list::before { background-image:url('../icons/heart-filled.svg')!important; }
.cpg-detail-grid .tinvwl_add_to_wishlist-text, .cpg-detail-grid .tinvwl-product-in-list-text, .cpg-detail-grid .tinv-wishlist-clear { display:none; }
/* The enhanced simple-product control represents the actual cart quantity. */
body.cpg-app-product-page #main .cpg-detail-grid form.cpg-detail-cart-ready > .quantity,
body.cpg-app-product-page #main .cpg-detail-grid form.cpg-detail-cart-ready > .single_add_to_cart_button { display:none!important; }
#cpg-detail-cart { display:flex; align-items:center; gap:8px; }
#cpg-detail-cart.is-empty { flex:1 1 200px; min-width:0; }
#cpg-detail-cart [hidden], #cpg-detail-cart[hidden] { display:none!important; }
body.cpg-app-product-page #main #cpg-detail-cart button { display:inline-flex; align-items:center; justify-content:center; flex:0 0 44px; width:44px; height:44px; min-height:44px; padding:0; margin:0; border:0; border-radius:50%; background:var(--cpg-red); color:#fff; box-shadow:none; cursor:pointer; }
body.cpg-app-product-page #main #cpg-detail-cart .cpg-detail-cart-minus { background:var(--cpg-brand); }
body.cpg-app-product-page #main #cpg-detail-cart.is-empty .cpg-detail-cart-add { flex:1 1 auto; width:100%; min-height:48px; height:auto; padding:12px 16px; border-radius:14px; font:inherit; font-size:16px; font-weight:700; line-height:1.4; }
body.cpg-app-product-page #main #cpg-detail-cart button:disabled { opacity:.5; cursor:wait; }
#cpg-detail-cart .cpg-detail-cart-count { min-width:28px; text-align:center; font-size:16px; font-weight:700; }
#cpg-detail-cart .cpg-detail-cart-empty, #cpg-detail-cart .cpg-detail-cart-more { display:inline-flex; }
#cpg-detail-cart .cpg-detail-cart-empty { align-items:center; justify-content:center; gap:10px; }
#cpg-detail-cart .cpg-detail-cart-empty svg { flex:0 0 20px; }
/* Keep the heart in the action row. Announcements always follow all controls. */
.cpg-detail-cart-status { order:10; flex:0 0 100%; margin:0; color:var(--cpg-muted); font-size:14px; }
.cpg-detail-cart-status:empty { display:none; }
.cpg-detail-cart-status.is-error { color:#9c2823; }
body.cpg-app-product-page .cpg-detail-information h2 { font-size:18px!important; font-weight:700!important; line-height:1.3; margin:24px 0 12px!important; color:var(--cpg-ink); }
.cpg-detail-preparation { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.cpg-detail-preparation > div { padding:14px; border:1px solid #dfe3e9; border-radius:16px; background:#fff; }
.cpg-detail-preparation span { display:block; font-size:12px; color:var(--cpg-muted); }
.cpg-detail-preparation strong { display:block; font-size:17px; font-weight:700; line-height:1.4; margin-top:7px; }
.cpg-detail-grid .allergen-badges-container { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:24px; }
body.cpg-app-product-page .cpg-detail-grid .allergen-badge { display:inline-flex; align-items:center; gap:6px; background:#e8ebf0; color:var(--cpg-ink); border:0; border-radius:12px; padding:8px 10px; margin:0; height:auto; width:auto; font-size:12px; }
body.cpg-app-product-page .cpg-detail-grid .allergen-name { font-size:12px; font-weight:700; }
body.cpg-app-product-page .cpg-detail-grid .allergen-tooltip { position:static!important; display:inline!important; visibility:visible!important; opacity:1!important; transform:none!important; white-space:normal!important; width:auto!important; min-width:0; max-width:none; background:transparent!important; color:inherit!important; padding:0!important; font-size:12px!important; box-shadow:none; }
.cpg-detail-grid .allergen-tooltip::before, .cpg-detail-grid .allergen-tooltip::after { display:none; }
.cpg-detail-disclosure { margin:12px 0; border:1px solid #dfe3e9; border-radius:16px; background:#fff; overflow:hidden; }
.cpg-detail-disclosure > summary { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:17px 16px; font-size:15px; font-weight:650; cursor:pointer; list-style:none; }
.cpg-detail-disclosure > summary::-webkit-details-marker { display:none; }
.cpg-detail-disclosure > summary::after { content:'⌄'; font-size:20px; line-height:1; }
.cpg-detail-disclosure[open] > summary::after { transform:rotate(180deg); }
.cpg-detail-disclosure > div { padding:0 16px 16px; font-size:14px; line-height:1.6; }
.cpg-detail-nutrition { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; padding:0 12px 12px; }
.cpg-detail-nutrition > div { padding:12px; border-radius:12px; background:#f2f3f6; }
.cpg-detail-nutrition dt { font-size:12px; font-weight:500; color:var(--cpg-muted); }
.cpg-detail-nutrition dd { font-size:17px; font-weight:700; margin:5px 0 0; }
.cpg-detail-grid a:focus-visible, .cpg-detail-grid button:focus-visible, .cpg-detail-grid input:focus-visible, .cpg-detail-grid summary:focus-visible { outline:3px solid #326baf; outline-offset:3px; }
body.cpg-app-product-page .cpg-detail-grid .variations, .cpg-detail-grid .single_variation_wrap, .cpg-detail-grid .group_table, .cpg-detail-grid #zvw_product_extras, .cpg-detail-grid .zvw_extras_container { flex-basis:100%; width:100%; }
.cpg-detail-grid .woocommerce-variation-add-to-cart { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
body.cpg-app-product-page .cpg-detail-grid .zvw_extra_option { border:1px solid #d8dee7; border-radius:16px; background:white; padding:12px; color:var(--cpg-ink); white-space:normal; }
body.cpg-app-product-page .cpg-detail-grid .zvw_extra_option.zvw_selected { background:#e4e9ef; border-color:var(--cpg-brand); }
body.cpg-app-product-page .related, body.cpg-app-product-page .upsells { margin-top:42px; }
body.cpg-app-product-page .related h2, body.cpg-app-product-page .upsells h2 { font-size:24px; color:var(--cpg-ink); }
body.cpg-app-product-page .related .fusion-product-wrapper, body.cpg-app-product-page .upsells .fusion-product-wrapper { border:1px solid #e3e6eb; border-radius:18px; overflow:hidden; background:#fff; }
@media (max-width:1000px) { body.cpg-app-product-page .cpg-detail-grid { gap:24px; grid-template-columns:minmax(0,44fr) minmax(0,56fr); } body.cpg-app-product-page .cpg-detail-hero { padding:12px; } }
@media (max-width:700px) {
 body.cpg-app-product-page #main { padding:12px 16px 32px!important; }
 body.cpg-app-product-page .cpg-detail-back { margin-bottom:10px; }
 body.cpg-app-product-page .cpg-detail-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:20px; }
 body.cpg-app-product-page .cpg-detail-hero { position:relative; top:auto; padding:12px 20px; border-radius:22px; }
 body.cpg-app-product-page .cpg-detail-hero .woocommerce-product-gallery__image img { max-height:320px; }
 body.cpg-app-product-page .cpg-detail-grid .product_title { font-size:28px!important; }
 .cpg-detail-facts { margin-bottom:20px; }
 .cpg-detail-fact, .cpg-detail-tag { font-size:12px; }
 body.cpg-app-product-page .cpg-detail-grid form.cart, .cpg-detail-grid .woocommerce-variation-add-to-cart { gap:8px; }
}
@media (prefers-reduced-motion:reduce) { .cpg-detail-grid * { scroll-behavior:auto!important; } }
/* Neutralize the old child-theme 15% product inset and Avada's ID-based column widths. */
body.cpg-app-product-page #wrapper #main #content, body.cpg-app-product-page #main .woocommerce-container { margin-top:0!important; }
body.cpg-app-product-page #main #content > .product { padding:0!important; }
body.cpg-app-product-page #wrapper #main .cpg-detail-grid > .summary { width:auto!important; float:none!important; margin:0!important; }
body.cpg-app-product-page #main .cpg-detail-grid .avada-availability:not(:has(.stock)) { display:none!important; }
body.cpg-app-product-page #main .cpg-detail-grid .woocommerce-product-details__short-description { padding:0!important; }
body.cpg-app-product-page .cpg-detail-grid #zvw_extras_frontend { flex:0 0 100%; width:100%; margin:4px 0 16px; }
body.cpg-app-product-page .cpg-detail-grid #zvw_extras_frontend h3, body.cpg-app-product-page .cpg-detail-grid .zvw_group_title { font-size:16px; line-height:1.4; margin:12px 0; }
body.cpg-app-product-page .cpg-detail-grid .zvw_extra_option img { width:60px; height:60px; object-fit:contain; }
body.cpg-app-product-page .cpg-detail-grid .allergen-name { width:auto; height:auto; flex:0 0 auto; line-height:1.4; }
body.cpg-app-product-page .cpg-detail-grid .allergen-badge { text-align:left; line-height:1.4; }
@media (min-width:701px) { body.cpg-app-product-page .cpg-detail-hero { top:var(--cpg-detail-top,160px); } }
body.cpg-app-product-page .cpg-detail-information h2 { text-align:left!important; }

/* Medical products keep their complete image and use the shared option dialog. */
body.cpg-medical-product-page .cpg-detail-hero { background:#fff; border:1px solid #e2e6ec; padding:28px; }
body.cpg-medical-product-page .cpg-detail-hero .woocommerce-product-gallery__image img { object-fit:contain; }
body.cpg-medical-product-page .cpg-detail-hero .flex-control-thumbs img { border-radius:10px; object-fit:contain; }
body.cpg-medical-product-page .cpg-detail-grid .product_title { font-size:clamp(26px,2.2vw,34px)!important; line-height:1.2!important; }
body.cpg-medical-product-page .cpg-detail-grid .woocommerce-product-details__short-description { font-size:14px; line-height:1.7; }
.cpg-detail-rental { padding:18px 20px; border:1px solid #dfe3e9; border-radius:18px; margin:0 0 18px; }
body.cpg-medical-product-page .cpg-detail-rental h2 { color:var(--cpg-ink); font-size:17px!important; line-height:1.3!important; margin:0 0 8px!important; text-align:left!important; }
.cpg-detail-rental p { margin:0 0 8px; font-size:14px; line-height:1.65; color:var(--cpg-muted); }
.cpg-detail-rental p:last-child { margin-bottom:0; }
.cpg-detail-options-hint { font-size:13px; line-height:1.6; color:var(--cpg-muted); margin:0 0 14px; }
body.cpg-app-product-page #main .cpg-detail-grid form.cpg-detail-options-ready > :not(.cpg-detail-configure):not(.tinv-wraper) { display:none!important; }
body.cpg-medical-product-page .cpg-detail-configure { display:inline-flex; flex:1 1 180px; align-items:center; justify-content:center; gap:10px; min-width:0; min-height:48px; border-radius:14px; padding:12px 16px; background:var(--cpg-red); color:#fff; font-size:16px; font-weight:700; text-decoration:none; line-height:1.4; }
.cpg-detail-configure[hidden] { display:none!important; }
.cpg-detail-options-status { margin:-10px 0 24px; font-size:14px; color:var(--cpg-brand); }
.cpg-detail-options-status:empty { display:none; }
.cpg-detail-options-status a { color:inherit; text-decoration:underline; font-weight:600; }
.cpg-detail-configure svg { width:22px; height:22px; flex:none; }
body.cpg-medical-product-page .cpg-detail-grid .woocommerce-product-attributes { width:100%; margin:0; border:0; table-layout:fixed; font-size:13px; }
body.cpg-medical-product-page .cpg-detail-grid .woocommerce-product-attributes th,
body.cpg-medical-product-page .cpg-detail-grid .woocommerce-product-attributes td { padding:10px 0; border:0; border-bottom:1px solid #e8ebf0; text-align:left; vertical-align:top; overflow-wrap:anywhere; background:transparent; }
body.cpg-medical-product-page .cpg-detail-grid .woocommerce-product-attributes th { width:43%; padding-right:16px; color:var(--cpg-muted); font-weight:600; }
body.cpg-medical-product-page .cpg-detail-grid .woocommerce-product-attributes td p { margin:0; }
body.cpg-medical-product-page .cpg-detail-disclosure > div > h2:first-child,
body.cpg-medical-product-page .cpg-detail-disclosure > div > h3:first-child { display:none; }
@media(max-width:700px) {
 body.cpg-medical-product-page .cpg-detail-hero { padding:20px; }
 .cpg-detail-rental { padding:16px; }
}
@media(max-width:500px) {
 body.cpg-medical-product-page .cpg-detail-grid .woocommerce-product-attributes,
 body.cpg-medical-product-page .cpg-detail-grid .woocommerce-product-attributes tbody { display:block; width:100%; }
 body.cpg-medical-product-page .cpg-detail-grid .woocommerce-product-attributes tr { display:block; padding:12px 0; border-bottom:1px solid #e8ebf0; }
 body.cpg-medical-product-page .cpg-detail-grid .woocommerce-product-attributes th,
 body.cpg-medical-product-page .cpg-detail-grid .woocommerce-product-attributes td { display:block; width:100%!important; border:0; padding:0; line-height:1.5; }
 body.cpg-medical-product-page .cpg-detail-grid .woocommerce-product-attributes th { margin-bottom:4px; }
}
