/* =========================================================
   CukrOFFnia — informacja o żywności (inc/food-info.php, assets/js/variants.js)
   nazwa żywności pod tytułem, ilość netto + cena jednostkowa, ostrzeżenia, zakładka „Skład i wartości odżywcze”,
   kafelki, wstrzymanie sprzedaży, lista „bez …” w popupie koszyka
   ========================================================= */

/* bloki przełączane przez variants.js — atrybut hidden ma pierwszeństwo przed display z innych arkuszy */
.cf-food [hidden], .cf-food-sum [hidden], .cf-legal[hidden], .free-list[hidden], .free-list li[hidden], .cart-pop__free[hidden], .cart-pop__free li[hidden], .vq__unit[hidden] { display: none !important; }

/* ---------- karta produktu: pod tytułem ---------- */
.cf-legal { margin: -0.45rem 0 0.9rem; font-size: 0.95rem; font-weight: 600; line-height: 1.4; color: var(--ink-2); max-width: 46ch; }

/* ---------- karta produktu: przy cenie ---------- */
.cf-food-sum { display: grid; gap: 0.5rem; justify-items: start; margin: -0.55rem 0 1rem; }
.cf-food-sum:not(:has(> :not([hidden]))) { display: none; }
.cf-food-sum p { margin: 0; line-height: 1.4; }
.cf-unit { font-size: 0.92rem; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cf-unit__label { font-weight: 600; color: var(--muted); }
.cf-polyol { font-size: 0.86rem; font-weight: 700; color: var(--ink-2); }
.cf-nowd { padding: 0.4rem 0.8rem; border: 1px solid rgba(180, 83, 43, 0.28); border-radius: 12px; background: var(--cream-2); color: var(--rust); font-size: 0.8rem; font-weight: 700; }

/* ---------- wstrzymanie sprzedaży (produkt prosty: komunikat zamiast formularza; wariant: komunikat w availability, bez ilości i przycisku) ---------- */
.woocommerce div.product .cf-hold { margin: 0 0 1.2rem; font-size: 0.95rem; font-weight: 700; }
.woocommerce div.product .single_variation_wrap .cf-hold { margin: 0; }
.woocommerce div.product form.variations_form.cf-held .woocommerce-variation-add-to-cart .quantity,
.woocommerce div.product form.variations_form.cf-held .single_add_to_cart_button,
.woocommerce div.product form.variations_form:has(.woocommerce-variation-availability .cf-hold) .woocommerce-variation-add-to-cart .quantity,
.woocommerce div.product form.variations_form:has(.woocommerce-variation-availability .cf-hold) .single_add_to_cart_button { display: none !important; }

/* ---------- zakładka „Skład i wartości odżywcze” (B8.4) ---------- */
.cf-food p { margin: 0 0 0.9em; }
.cf-food strong, .cf-food b { color: var(--ink); font-weight: 800; }
.cf-food__name strong { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; }
.cf-food__ing span[data-cf-ing] { overflow-wrap: anywhere; }
.cf-food__nutri { margin: 0.2rem 0 1.1rem; }
.cf-nutri { width: 100%; max-width: 30rem; border-collapse: collapse; font-size: 0.92rem; line-height: 1.4; }
.cf-nutri caption { caption-side: top; text-align: left; padding: 0 0 0.45rem; font-weight: 800; color: var(--ink); }
.cf-nutri th, .cf-nutri td { padding: 0.45rem 0; border-bottom: 1px dashed var(--dash); vertical-align: top; }
.cf-nutri tbody tr:first-child th, .cf-nutri tbody tr:first-child td { border-top: 2px solid var(--ink); }
.cf-nutri th { padding-right: 1rem; text-align: left; font-weight: 600; color: var(--ink-2); }
.cf-nutri td { text-align: right; font-weight: 700; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cf-nutri tr.is-sub th { padding-left: 1rem; font-weight: 500; color: var(--muted); }

/* ---------- kafelki (woocommerce/content-product.php) ---------- */
.product-legal { font-size: 0.78rem; line-height: 1.35; color: var(--ink-2); }
/* waga w nazwie pozycji koszyka / kasy / zamówienia (cf_food_append_net): od nowej linii, bez „·”, nigdy „60 / g”; ilość „×1” zostaje obok */
.cf-net { white-space: nowrap; }
.cf-net::before { content: "\A"; white-space: pre; }
.cf-net__sep { display: none; }
/* div: ta sama klasa jest na komórkach tabeli koszyka WooCommerce (th/td.product-price), flex psuł tam nagłówek „Cena” (27.10.2026) */
div.product-price { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.product-unit { font-family: var(--font-body); font-size: 0.74rem; font-weight: 700; line-height: 1.3; color: var(--muted); font-variant-numeric: tabular-nums; }
@container (max-width: 260px) { .product-foot .product-price { flex: 1 1 100%; } }
@media (max-width: 560px) { .woocommerce ul.products li.product .product-price, ul.product-grid li.product .product-price { flex: 1 1 100%; } }
