/* Sokomedica A2: strony sklepu (listy, karta produktu, koszyk i kasa z bloków, konto).
   Układ i logika z rodzica (style.css, kasa.css), tu kolory, kroje i kształty A2. Kolory rodzica idą przez zmienne z a2.css. */

body.a2 .sm-main { padding: 28px 0 80px; }
body.a2 .sm-wrap { max-width: calc(1272px + 48px); padding: 0 24px; }

/* nagłówki rodzica (Oswald) w kroju A2 */
body.a2 .woocommerce-products-header__title, body.a2 .entry-title, body.a2 .product_title, body.a2 .sm-tresc h1 { font-family: var(--a2-serif); font-weight: 500; letter-spacing: -0.015em; text-transform: none; }
body.a2 .woocommerce-products-header__title, body.a2 .entry-title { font-size: 44px; line-height: 1.1; margin: 0 0 16px; }

/* okruszki */
body.a2.woocommerce .woocommerce-breadcrumb { font-size: 14px; color: var(--a2-szary); margin: 0 0 20px; }
body.a2.woocommerce .woocommerce-breadcrumb a { color: var(--a2-tekst); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--a2-ramka); }

/* ---------- listy produktów ---------- */
body.a2 .term-description, body.a2 .woocommerce-products-header .page-description { color: var(--a2-szary2); max-width: 70ch; }
.a2-pigulki--lista { justify-content: flex-start; margin: 0 0 28px; }
body.a2 .woocommerce-result-count { font-size: 15px; color: var(--a2-szary); margin: 10px 0 24px; }
body.a2.woocommerce .woocommerce-ordering { margin: 0 0 24px; }
body.a2.woocommerce .woocommerce-ordering select { min-height: 44px; padding: 0 40px 0 18px; border: 1px solid var(--a2-ramka); border-radius: 999px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231E2420' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center; font: inherit; font-size: 15px; color: var(--a2-tekst); -webkit-appearance: none; appearance: none; cursor: pointer; }
body.a2.woocommerce ul.products { gap: 32px 24px; }
body.a2.woocommerce ul.products li.product { display: flex; flex-direction: column; gap: 10px; text-align: left; min-width: 0; }
body.a2.woocommerce ul.products li.product > a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; gap: 10px; color: var(--a2-tekst); }
body.a2.woocommerce ul.products li.product a img { margin: 0 !important; border-radius: 24px; background: #fff; }
body.a2.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 16px !important; font-weight: 600; line-height: 1.35; padding: 0 !important; margin: 0 !important; min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.a2.woocommerce ul.products li.product a:hover .woocommerce-loop-product__title { color: var(--a2-miedz); }
body.a2.woocommerce ul.products li.product .price { font-family: var(--a2-serif); font-size: 23px; font-weight: 500; line-height: 1.2; margin: 0; color: var(--a2-tekst) !important; }
body.a2.woocommerce ul.products li.product .price del { font-size: .7em; color: var(--a2-szary); margin: 0 6px 0 0; }
body.a2.woocommerce ul.products li.product .price ins { color: var(--a2-miedz); }
.a2-kafel-kup { margin-top: auto; }
body.a2.woocommerce span.onsale { top: 12px; left: 12px; right: auto; min-height: 0; min-width: 0; padding: 6px 12px; border-radius: 999px; background: var(--a2-miedz); font-size: 13px; font-weight: 600; line-height: 1.2; }
/* stronicowanie */
body.a2.woocommerce nav.woocommerce-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
body.a2.woocommerce nav.woocommerce-pagination ul li a, body.a2.woocommerce nav.woocommerce-pagination ul li span { min-width: 44px; min-height: 44px; border-radius: 999px; background: #fff; color: var(--a2-tekst); font-weight: 600; box-shadow: inset 0 0 0 1px var(--a2-ramka); }
body.a2.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--a2-akcent); color: #fff; box-shadow: none; }
body.a2.woocommerce nav.woocommerce-pagination ul li a:hover { background: var(--a2-bez); color: var(--a2-tekst); }

/* ---------- karta produktu ---------- */
body.a2.woocommerce div.product div.images .flex-viewport, body.a2.woocommerce div.product div.images .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child { border-radius: 24px; overflow: hidden; background: #fff; }
body.a2.woocommerce div.product div.images .flex-control-thumbs { gap: 8px; margin-top: 10px; padding-bottom: 4px; }
body.a2.woocommerce div.product div.images .flex-control-thumbs li { flex-basis: calc(25% - 6px); width: calc(25% - 6px); border-radius: 12px; overflow: hidden; background: #fff; }
body.a2.woocommerce div.product div.images .flex-control-thumbs li img { opacity: .6; transition: opacity 150ms ease; }
body.a2.woocommerce div.product div.images .flex-control-thumbs li img.flex-active, body.a2.woocommerce div.product div.images .flex-control-thumbs li img:hover { opacity: 1; }
body.a2.woocommerce div.product div.images .woocommerce-product-gallery__trigger { top: 16px; right: 16px; background: #fff; border-radius: 999px; }
body.a2.woocommerce div.product .summary { display: flex; flex-direction: column; gap: 0; }
body.a2.woocommerce div.product .product_title { font-size: 36px; line-height: 1.15; margin: 0 0 14px; text-wrap: balance; }
body.a2.woocommerce div.product p.price, body.a2.woocommerce div.product span.price { font-family: var(--a2-serif); font-size: 34px; font-weight: 500; line-height: 1.2; color: var(--a2-tekst); margin: 0 0 8px; }
body.a2.woocommerce div.product p.price del { font-size: .62em; color: var(--a2-szary); }
body.a2.woocommerce div.product p.price ins { text-decoration: none; color: var(--a2-miedz); }
body.a2.woocommerce div.product .stock { font-size: 15px; font-weight: 600; margin: 0 0 18px; }
body.a2.woocommerce div.product .stock.in-stock { color: #2F6B3F; }
body.a2.woocommerce div.product form.cart { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 8px; }
body.a2.woocommerce div.product form.cart::before, body.a2.woocommerce div.product form.cart::after { display: none; }
body.a2.woocommerce div.product form.cart div.quantity { float: none; margin: 0; }
body.a2.woocommerce .quantity.a2-ilosc { display: flex; align-items: center; height: 52px; padding: 0 4px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--a2-ramka); }
body.a2.woocommerce .quantity.a2-ilosc input.qty { width: 40px; height: 48px; padding: 0; border: 0; background: transparent; text-align: center; font: inherit; font-size: 17px; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
body.a2.woocommerce .quantity.a2-ilosc input.qty::-webkit-outer-spin-button, body.a2.woocommerce .quantity.a2-ilosc input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
body.a2 .a2-ilosc-btn { width: 44px; height: 44px; padding: 0; background: none; color: var(--a2-tekst); }
body.a2.woocommerce div.product form.cart .single_add_to_cart_button { flex: 1 1 220px; min-height: 52px; padding: 0 32px; border-radius: 999px; background: var(--a2-akcent); font-size: 16px; font-weight: 600; transition: transform 160ms var(--a2-krzywa), background-color 150ms ease; }
body.a2.woocommerce div.product form.cart .single_add_to_cart_button:active { transform: scale(.97); }
body.a2.woocommerce div.product form.cart .single_add_to_cart_button[aria-busy="true"] { opacity: .7; pointer-events: none; }
body.a2.woocommerce div.product form.cart .single_add_to_cart_button:hover { background: var(--a2-akcent-ciemny); }
.a2-blad { flex-basis: 100%; margin: 4px 0 0; color: #B3261E; font-weight: 600; }
.a2-info-produktu { list-style: none; margin: 20px 0; padding: 20px 0; border-top: 1px solid var(--a2-linia); border-bottom: 1px solid var(--a2-linia); display: grid; gap: 14px; }
.a2-info-produktu li { display: flex; gap: 12px; align-items: flex-start; }
.a2-info-produktu svg { flex: none; margin-top: 1px; color: var(--a2-miedz); }
.a2-info-produktu strong { display: block; font-weight: 600; }
.a2-info-produktu li span span { display: block; font-size: 15px; color: var(--a2-szary); }
body.a2 .a2-info-produktu a { color: var(--a2-link); text-decoration: underline; text-underline-offset: 3px; }
.a2-info-produktu .a2-odliczanie { margin: 2px 0 2px; font-size: 15px; color: var(--a2-tekst); }
.a2-info-produktu .a2-odliczanie[hidden] { display: none; }
.a2-info-produktu .a2-odliczanie strong { display: inline; font-variant-numeric: tabular-nums; }
.a2-info-produktu .a2-odliczanie--dzis { color: #2F6B3F; }
.a2-info-produktu .a2-odliczanie--dzis::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #2F6B3F; vertical-align: 1px; }
.a2-info-produktu .a2-odliczanie-zasada { font-size: 13px !important; }
body.a2.woocommerce div.product .product_meta { font-size: 14px; color: var(--a2-szary); }
body.a2.woocommerce div.product .product_meta a { color: var(--a2-tekst); text-decoration: underline; text-underline-offset: 3px; }
/* kupuj razem (zestaw z rodzica) */
body.a2 .sm-zestaw { clear: both; margin: 48px 0 0; padding: 24px; border-radius: 24px; background: #fff; }
body.a2 .sm-zestaw .sm-sekcja__tytul { margin: 0 0 20px; font-family: var(--a2-serif); font-weight: 500; font-size: 30px; line-height: 1.15; text-align: left; text-transform: none; letter-spacing: -0.01em; border: 0; padding: 0; }
body.a2 .sm-zestaw .sm-produkt__obraz { border-radius: 16px; background: #fff; }
body.a2 .sm-zestaw .sm-produkt__cena { font-family: var(--a2-serif); font-size: 20px; }
body.a2 .sm-zestaw .sm-produkt__nazwa { padding: 0 !important; font-size: 14px !important; line-height: 1.35; text-align: left; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
body.a2 .sm-zestaw .sm-zestaw__poz { text-align: left; }
body.a2 .sm-zestaw .button { border-radius: 999px; min-height: 48px; padding: 0 24px; background: var(--a2-akcent); }
/* zakładki */
body.a2.woocommerce div.product .woocommerce-tabs { clear: both; padding-top: 48px; }
body.a2.woocommerce div.product .woocommerce-tabs ul.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; border: 0; }
body.a2.woocommerce div.product .woocommerce-tabs ul.tabs::before, body.a2.woocommerce div.product .woocommerce-tabs ul.tabs li::before, body.a2.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
body.a2.woocommerce div.product .woocommerce-tabs ul.tabs li { margin: 0; padding: 0; border: 0; border-radius: 999px; background: var(--a2-bez); }
body.a2.woocommerce div.product .woocommerce-tabs ul.tabs li a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; font-size: 15px; font-weight: 600; color: var(--a2-tekst); }
body.a2.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--a2-akcent); }
body.a2.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: #fff; }
body.a2 .woocommerce-Tabs-panel > h2:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body.a2 .woocommerce-Tabs-panel h2, body.a2 .woocommerce-Tabs-panel h3 { font-family: var(--a2-serif); font-weight: 500; line-height: 1.2; }
body.a2 .woocommerce-Tabs-panel--description img { border-radius: 20px; }
body.a2.woocommerce table.shop_attributes { border: 0; }
body.a2.woocommerce table.shop_attributes th, body.a2.woocommerce table.shop_attributes td { border: 0; border-bottom: 1px solid var(--a2-linia); padding: 12px 8px; background: none; font-style: normal; }
/* podobne produkty */
body.a2.woocommerce .related > h2, body.a2.woocommerce .upsells > h2 { font-family: var(--a2-serif); font-weight: 500; font-size: 36px; letter-spacing: -0.015em; margin: 56px 0 24px; text-transform: none; }

/* komunikaty WooCommerce */
body.a2 .woocommerce-message, body.a2 .woocommerce-info { border: 0; border-radius: 16px; background: #F7F2EA; color: var(--a2-tekst); }
body.a2 .woocommerce-message::before, body.a2 .woocommerce-info::before { color: var(--a2-akcent); }
body.a2 .woocommerce-message .button, body.a2 .woocommerce-info .button { border-radius: 999px; }

/* ---------- koszyk i kasa z bloków ---------- */
body.a2 :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) { font-family: var(--a2-sans); }
body.a2 .sm-darmowa { margin: 0 0 20px; padding: 14px 18px; border: 0; border-radius: 16px; background: #F7F2EA; font-size: 15px; }
body.a2 .wp-block-woocommerce-cart .wc-block-cart-items { border-collapse: separate; }
body.a2 .wp-block-woocommerce-cart .wc-block-cart-items__header { font-size: 14px; color: var(--a2-szary); text-transform: none; }
body.a2 .wp-block-woocommerce-cart .wc-block-cart-item__image img { border-radius: 12px; }
body.a2 .wp-block-woocommerce-cart .wc-block-components-product-name { font-weight: 500; color: var(--a2-tekst); text-decoration: none; line-height: 1.35; }
body.a2 .wp-block-woocommerce-cart .wc-block-components-product-price, body.a2 .wp-block-woocommerce-cart .wc-block-cart-item__total { font-variant-numeric: tabular-nums; }
body.a2 .wc-block-components-quantity-selector { border-radius: 999px; overflow: hidden; }
body.a2 .wc-block-components-quantity-selector::after { border-radius: 999px; border-color: var(--a2-ramka); }
body.a2 .wc-block-cart-item__remove-link { color: var(--a2-szary) !important; text-decoration: underline !important; }
body.a2 .wp-block-woocommerce-cart .wp-block-woocommerce-cart-totals-block { padding: 24px; border-radius: 24px; background: #fff; }
body.a2 .wc-block-cart__totals-title { font-family: var(--a2-serif) !important; font-weight: 500 !important; font-size: 24px !important; text-transform: none !important; }
body.a2 .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-family: var(--a2-serif); font-weight: 500; font-size: 26px; }
body.a2 :is(.wc-block-cart__submit-button, .wp-block-woocommerce-cart .wp-block-button__link, .wp-block-woocommerce-empty-cart-block .wp-block-button__link) { border-radius: 999px !important; background: var(--a2-akcent) !important; color: #fff !important; }
body.a2 :is(.wc-block-cart__submit-button, .wp-block-woocommerce-cart .wp-block-button__link) :is(span, div) { color: #fff !important; }
body.a2 :is(.wc-block-cart__submit-button, .wp-block-woocommerce-cart .wp-block-button__link):hover { background: var(--a2-akcent-ciemny) !important; }
body.a2 .wp-block-woocommerce-cart-cross-sells-block h2 { font-family: var(--a2-serif); font-weight: 500; font-size: 30px; text-transform: none; text-align: left; border: 0; padding: 0; }
body.a2 .cross-sells-product img, body.a2 .wp-block-woocommerce-product-collection .wc-block-product img { border-radius: 20px; background: #fff; }
/* kasa: nagłówki sekcji, suma i „Kupuję i płacę” w kroju i kształcie A2 (układ i działanie bez zmian) */
body.a2 .wp-block-woocommerce-checkout .wc-block-components-checkout-step__title, body.a2 .wp-block-woocommerce-checkout .wc-block-components-checkout-order-summary__title-text { font-family: var(--a2-serif); font-weight: 500; }
body.a2 .wp-block-woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__label { font-family: var(--a2-sans); font-weight: 700; font-size: 20px; }
body.a2 .wp-block-woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-family: var(--a2-serif); font-weight: 500; }
body.a2 .wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button { border-radius: 999px !important; font-family: var(--a2-sans) !important; font-weight: 700 !important; font-size: 17px !important; }

@media (max-width: 1100px) {
	body.a2.woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
	body.a2 .sm-main { padding: 20px 0 56px; }
	body.a2 .sm-wrap { padding: 0 16px; }
	body.a2 .woocommerce-products-header__title, body.a2 .entry-title { font-size: 32px; }
	body.a2.woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
	body.a2.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 15px !important; }
	body.a2.woocommerce ul.products li.product .price { font-size: 19px; }
	body.a2.woocommerce ul.products li.product a img { border-radius: 18px; }
	body.a2.woocommerce .woocommerce-ordering, body.a2 .woocommerce-result-count { float: none; margin: 0 0 16px; }
	.a2-pigulki--lista { display: flex; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 20px; padding: 0 16px 4px; scrollbar-width: none; }
	.a2-pigulki--lista a { flex: none; white-space: nowrap; }
	body.a2.woocommerce div.product .product_title { font-size: 28px; }
	body.a2.woocommerce div.product p.price { font-size: 30px; }
	body.a2.woocommerce .related > h2 { font-size: 28px; }
	body.a2 .sm-zestaw { padding: 18px; }
	body.a2 .sm-zestaw .sm-sekcja__tytul { font-size: 24px; }
}

/* ---------- filtry nad listą produktów (inc/a2-filtry.php): cena i cechy jako pigułki, cechy w rozwijanych grupach ---------- */
.a2-filtry { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 20px; }
.a2-filtry-grupa { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.a2-filtry-et { font-size: 14px; font-weight: 600; color: var(--a2-szary); margin-right: 2px; }
.a2-filtry a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--a2-bez); color: var(--a2-tekst); font-size: 15px; text-decoration: none; }
.a2-filtry a .a2-licz { color: var(--a2-szary); font-size: 13px; }
body.a2 .a2-filtry a.a2-filtr--jest { background: var(--a2-akcent); color: #fff; } /* ogólny kolor linków WooCommerce ma wyższy priorytet */
.a2-filtry a.a2-filtr--jest .a2-licz { color: rgba(255, 255, 255, .75); }
.a2-filtry-cecha { position: relative; }
.a2-filtry-cecha summary { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--a2-ramka); background: #fff; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.a2-filtry-cecha summary::-webkit-details-marker { display: none; }
.a2-filtry-cecha summary::after { content: ""; width: 7px; height: 7px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: translateY(-2px) rotate(45deg); margin-left: 4px; }
.a2-filtry-cecha[open] summary::after { transform: translateY(2px) rotate(225deg); }
.a2-filtry-ile { min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 999px; background: var(--a2-miedz); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.a2-filtry-lista { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
.a2-filtry .a2-filtry-czysc { background: none; padding: 0 4px; text-decoration: underline; text-underline-offset: 3px; color: var(--a2-link); }
@media (hover: hover) and (pointer: fine) { .a2-filtry a:not(.a2-filtr--jest):hover { background: var(--a2-linia2); } }
@media (max-width: 760px) {
	.a2-filtry { gap: 10px; }
	.a2-filtry-grupa { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; width: calc(100% + 32px); box-sizing: border-box; }
	.a2-filtry-grupa a { flex: none; white-space: nowrap; }
}
/* dostawa przed Wigilią na karcie produktu */
.a2-info-produktu li.a2-info-swieta[hidden] { display: none; }
.a2-info-produktu li.a2-info-swieta svg { color: var(--a2-miedz); }
