/*
Theme Name: Sokomedica Sklep
Description: Motyw sklepu sokomedica.pl (WooCommerce), układ wzorowany na garneczki.pl.
Version: 1.1.9
Author: Supplemedica LTD
Text Domain: sokomedica
Requires PHP: 8.0
WC requires at least: 8.0
*/

/* Fonty lokalnie (bez Google Fonts): latin + latin-ext (polskie znaki). */
@font-face { font-family: "Open Sans"; src: url("fonts/open-sans-latin-ext.woff2") format("woff2"); font-weight: 300 800; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Open Sans"; src: url("fonts/open-sans-latin.woff2") format("woff2"); font-weight: 300 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Oswald"; src: url("fonts/oswald-latin-ext.woff2") format("woff2"); font-weight: 200 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Oswald"; src: url("fonts/oswald-latin.woff2") format("woff2"); font-weight: 200 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
	--sm-tekst: #222;
	--sm-szary: #666;
	--sm-jasny: #6b6b6b;
	--sm-linia: #e2e2e2;
	--sm-tlo-pola: #ececef;
	--sm-akcent: #0067b3;
	--sm-akcent-ciemny: #00528f;
	--sm-czerwony: #c8102e;
	--sm-szer: 1385px;
	--sm-odstep: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--sm-tekst); font: 400 15px/1.55 "Open Sans", system-ui, Arial, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--sm-akcent); }
button, input, select, textarea { font: inherit; color: inherit; }
.sm-wrap { max-width: calc(var(--sm-szer) + 2 * var(--sm-odstep)); margin: 0 auto; padding: 0 var(--sm-odstep); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- pasek górny ---------- */
.sm-topbar { background: #000; color: #fff; font-size: 12px; }
.sm-topbar .sm-wrap { display: flex; justify-content: space-around; align-items: center; min-height: 28px; gap: 16px; }
.sm-topbar a { text-decoration: underline; font-weight: 600; }
.sm-topbar a:hover { color: #fff; opacity: .8; }

/* ---------- nagłówek ---------- */
.sm-header { background: #fff; border-bottom: 1px solid var(--sm-linia); position: sticky; top: 0; z-index: 50; }
.sm-header__row { display: flex; align-items: center; gap: 28px; min-height: 82px; }
.sm-burger { background: none; border: 0; padding: 6px; cursor: pointer; display: flex; }
.sm-burger svg { width: 22px; height: 22px; }
.sm-logo { flex: 0 0 auto; display: flex; align-items: center; }
.sm-logo img { max-height: 52px; width: auto; }
.sm-logo__tekst { font: 700 26px/1 "Oswald", sans-serif; letter-spacing: .5px; text-transform: uppercase; }
.sm-search { flex: 1 1 auto; position: relative; }
.sm-search input[type=search] { width: 100%; height: 46px; border: 0; border-radius: 3px; background: var(--sm-tlo-pola); padding: 0 52px 0 16px; font-size: 14px; outline: none; }
.sm-search input[type=search]:focus { box-shadow: 0 0 0 2px var(--sm-akcent) inset; }
.sm-search button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 8px; cursor: pointer; }
.sm-search button svg { width: 20px; height: 20px; }
.sm-ikony { display: flex; gap: 22px; }
.sm-ikona { display: flex; flex-direction: column; align-items: center; font-size: 13px; position: relative; }
.sm-ikona svg { width: 28px; height: 28px; margin-bottom: 4px; }
.sm-koszyk-licznik { position: absolute; top: -8px; right: -6px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--sm-czerwony); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

/* ---------- menu kategorii ---------- */
.sm-nav { background: #fff; box-shadow: 0 4px 8px -6px rgba(0,0,0,.18); }
.sm-nav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; gap: 18px; }
.sm-nav > .sm-wrap > ul > li { position: relative; }
.sm-nav > .sm-wrap > ul > li > a { display: block; padding: 18px 0; font-size: 16px; font-weight: 500; line-height: 1.4; }
.sm-nav .sub-menu, .sm-nav .children { display: none; position: absolute; left: -16px; top: 100%; min-width: 240px; background: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.12); padding: 10px 0; flex-direction: column; gap: 0; z-index: 60; }
.sm-nav li:hover > .sub-menu, .sm-nav li:hover > .children, .sm-nav li:focus-within > .sub-menu { display: flex; }
.sm-nav .sub-menu a, .sm-nav .children a { display: block; padding: 7px 16px; font-size: 14px; }

/* ---------- panel boczny (burger / mobile) ---------- */
.sm-panel { position: fixed; inset: 0; z-index: 100; display: none; }
.sm-panel.otwarty { display: block; }
.sm-panel__tlo { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.sm-panel__menu { position: absolute; left: 0; top: 0; bottom: 0; width: min(360px, 88vw); background: #fff; overflow-y: auto; padding: 18px 22px; }
.sm-panel__zamknij { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; float: right; }
.sm-panel ul { list-style: none; margin: 0; padding: 0; clear: both; }
.sm-panel li a { display: block; padding: 10px 0; border-bottom: 1px solid var(--sm-linia); font-weight: 500; }
.sm-panel .sub-menu, .sm-panel .children { padding-left: 14px; }
.sm-panel .sub-menu a, .sm-panel .children a { font-weight: 400; font-size: 14px; }

/* ---------- strona główna ---------- */
.sm-main { padding: 40px 0 70px; }
.sm-kafle { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 60px; }
.sm-kafle--3 { grid-template-columns: repeat(3, 1fr); }
.sm-kafel__obraz { aspect-ratio: 1; background: #f3f3f3; overflow: hidden; }
.sm-kafel__obraz img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.sm-kafel:hover .sm-kafel__obraz img { transform: scale(1.04); }
.sm-kafel__tytul { font: 400 27px/1.2 "Oswald", sans-serif; margin: 18px 0 6px; color: var(--sm-tekst); }
.sm-kafel__link { font: 400 15px "Oswald", sans-serif; color: var(--sm-jasny); text-decoration: underline; }
.sm-kafel:hover .sm-kafel__tytul { color: var(--sm-akcent); }

.sm-sekcja { margin-bottom: 70px; }
.sm-sekcja__tytul { text-align: center; text-transform: uppercase; font-size: 21px; font-weight: 700; letter-spacing: .3px; margin: 0 0 32px; padding-bottom: 22px; border-bottom: 1px solid var(--sm-linia); }

.sm-banery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 60px; }
.sm-baner { display: block; background: #f3f3f3; aspect-ratio: 16/10; overflow: hidden; }
.sm-baner img { width: 100%; height: 100%; object-fit: cover; }

/* karuzela */
.sm-karuzela { position: relative; }
.sm-karuzela__tor { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * 25px) / 3); gap: 25px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.sm-karuzela__tor::-webkit-scrollbar { display: none; }
.sm-karuzela__tor > * { scroll-snap-align: start; }
.sm-karuzela__btn { position: absolute; top: calc(50% - 60px); width: 50px; height: 50px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.15); cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }
.sm-karuzela__btn svg { width: 20px; height: 20px; }
.sm-karuzela__btn--lewo { left: 18px; }
.sm-karuzela__btn--prawo { right: 18px; }
.sm-karuzela__btn[disabled] { opacity: 0; pointer-events: none; }

/* karta produktu (karuzela + listy WooCommerce) */
.sm-produkt, .woocommerce ul.products li.product { text-align: center; }
.sm-produkt__obraz, .woocommerce ul.products li.product a img { aspect-ratio: 1; width: 100%; object-fit: cover; background: #f6f6f6; margin: 0 0 14px !important; }
.sm-produkt__cena, .woocommerce ul.products li.product .price { display: block; font-size: 16px; color: var(--sm-tekst) !important; margin-bottom: 8px; font-weight: 400; }
.sm-produkt__cena del, .woocommerce ul.products li.product .price del { color: var(--sm-jasny); opacity: 1; margin-left: 4px; }
.sm-produkt__cena ins, .woocommerce ul.products li.product .price ins { text-decoration: none; color: var(--sm-czerwony); }
.sm-produkt__nazwa, .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 14px !important; font-weight: 400; line-height: 1.6; padding: 0 12px !important; margin: 0 !important; }
.sm-produkt:hover .sm-produkt__nazwa { color: var(--sm-akcent); }
.sm-pusto { text-align: center; color: var(--sm-jasny); padding: 30px 0; }

/* ---------- WooCommerce ---------- */
.woocommerce ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 25px; margin: 0 0 40px; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; }
.woocommerce ul.products li.product .button { display: none; }
.woocommerce-products-header__title, .entry-title, .product_title { font: 400 32px/1.2 "Oswald", sans-serif; margin: 0 0 20px; }
.woocommerce .woocommerce-breadcrumb { font-size: 13px; color: var(--sm-jasny); margin-bottom: 24px; }
.woocommerce .woocommerce-ordering select { border: 1px solid var(--sm-linia); padding: 8px 10px; background: #fff; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt, .wp-element-button {
	background: var(--sm-akcent); color: #fff; border-radius: 3px; font-weight: 600; padding: 14px 26px; border: 0;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce button.button.alt:hover, .woocommerce a.button.alt:hover { background: var(--sm-akcent-ciemny); color: #fff; }
.woocommerce div.product .product_title { font-size: 34px; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--sm-tekst); font-size: 28px; font-weight: 600; }
.woocommerce div.product form.cart .button { padding: 16px 40px; font-size: 16px; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { border-bottom-color: #fff; }
.woocommerce span.onsale { background: var(--sm-czerwony); border-radius: 3px; min-height: 0; min-width: 0; line-height: 1; padding: 7px 10px; top: 10px; left: 10px; }
.woocommerce-info, .woocommerce-message { border-top-color: var(--sm-akcent); }
.woocommerce-info::before, .woocommerce-message::before { color: var(--sm-akcent); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select { border: 1px solid #ccc; padding: 10px 12px; border-radius: 3px; }
.woocommerce nav.woocommerce-pagination ul { border: 0; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; }

/* ---------- opis produktu (układ sekcji z BaseLinkera) ---------- */
.woocommerce-Tabs-panel--description { max-width: 1100px; }
.woocommerce-Tabs-panel--description .section { display: flex; gap: 28px; align-items: center; margin: 0 0 28px; }
.woocommerce-Tabs-panel--description .item { flex: 1 1 0; min-width: 0; }
.woocommerce-Tabs-panel--description .item-12 { flex-basis: 100%; }
.woocommerce-Tabs-panel--description .image-item img { width: 100%; height: auto; border-radius: 3px; }
.woocommerce-Tabs-panel--description .item-12 .image-item img { max-width: 800px; margin: 0 auto; }
.woocommerce-Tabs-panel--description h2 { font-size: 20px; line-height: 1.35; margin: 0 0 12px; }
.woocommerce-Tabs-panel--description p { margin: 0 0 8px; }
.woocommerce div.product .woocommerce-tabs .panel > h2:first-child { display: none; }
@media (max-width: 760px) { .woocommerce-Tabs-panel--description .section { flex-direction: column; gap: 14px; } }

/* ---------- treść stron (regulaminy) ---------- */
.sm-tresc { max-width: 980px; margin: 0 auto; }
.sm-tresc h1 { font: 400 34px/1.2 "Oswald", sans-serif; margin: 0 0 26px; }
.sm-tresc h2 { font-size: 19px; margin: 34px 0 12px; }
.sm-tresc h3 { font-size: 16px; margin: 24px 0 8px; }
.sm-tresc p, .sm-tresc li { color: #333; }
.sm-tresc ol, .sm-tresc ul { padding-left: 22px; }
.sm-tresc li { margin-bottom: 6px; }
.sm-tresc table { width: 100%; border-collapse: collapse; margin: 18px 0 28px; font-size: 14px; }
.sm-tresc th, .sm-tresc td { border-bottom: 1px solid var(--sm-linia); padding: 12px 10px; text-align: left; vertical-align: top; }
.sm-tresc th { background: #f6f6f6; font-weight: 600; }
.sm-tresc a { color: var(--sm-akcent); text-decoration: underline; }
.sm-tresc dl dt { font-weight: 700; margin-top: 10px; }
.sm-tresc dl dd { margin: 2px 0 0; }
.sm-wybor { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0 40px; }
.sm-wybor__opcja { border: 1px solid var(--sm-linia); border-radius: 4px; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.sm-wybor__opcja h2 { margin: 0; }
.sm-wybor__opcja .wp-element-button, .sm-btn { align-self: flex-start; display: inline-block; background: var(--sm-akcent); color: #fff !important; text-decoration: none !important; padding: 12px 22px; border-radius: 3px; font-weight: 600; }
.sm-kontakt-boksy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 22px 0 36px; }
.sm-kontakt-boksy > div { background: #f6f6f6; padding: 24px; border-radius: 4px; }
.sm-kontakt-boksy strong { display: block; font-size: 17px; margin-bottom: 6px; }
.sm-faq details { border-bottom: 1px solid var(--sm-linia); padding: 14px 0; }
.sm-faq summary { cursor: pointer; font-weight: 600; }
.sm-faq details p { margin: 10px 0 0; }

/* ---------- stopka ---------- */
.sm-footer { background: #f6f6f6; border-top: 1px solid var(--sm-linia); font-size: 14px; color: var(--sm-szary); }
.sm-footer__kolumny { display: grid; grid-template-columns: 2fr 1.2fr 1fr 1fr; gap: 40px; padding-top: 50px; padding-bottom: 40px; }
.sm-footer h3 { color: var(--sm-tekst); font-size: 16px; margin: 0 0 14px; }
.sm-footer ul { list-style: none; margin: 0; padding: 0; }
.sm-footer li { margin-bottom: 8px; }
.sm-footer__tel { font-size: 22px; font-weight: 700; color: var(--sm-tekst); display: block; margin-bottom: 4px; }
.sm-footer__dol { border-top: 1px solid var(--sm-linia); padding: 18px 0; font-size: 12px; text-align: center; }

/* ---------- responsywność ---------- */
@media (max-width: 1100px) {
	.sm-nav { display: none; }
	.sm-kafle { grid-template-columns: repeat(2, 1fr); }
	.woocommerce ul.products { grid-template-columns: repeat(3, 1fr); }
	.sm-footer__kolumny { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
	:root { --sm-odstep: 16px; }
	.sm-topbar .sm-wrap > :not(:first-child) { display: none; }
	.sm-header__row { flex-wrap: wrap; gap: 12px 16px; min-height: 0; padding: 10px 0; }
	.sm-logo { flex: 1; }
	.sm-logo img { max-height: 40px; }
	.sm-search { order: 5; flex-basis: 100%; }
	.sm-ikona span { display: none; }
	.sm-kafle, .sm-kafle--3 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.sm-kafel__tytul { font-size: 20px; }
	.sm-karuzela__tor { grid-auto-columns: 72%; gap: 14px; }
	.sm-karuzela__btn { display: none; }
	.sm-banery, .sm-wybor, .sm-kontakt-boksy { grid-template-columns: 1fr; }
	.woocommerce ul.products { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
	.sm-footer__kolumny { grid-template-columns: 1fr; gap: 26px; }
}

/* ---------- koszyk i zamówienie (bloki WooCommerce): bez fragmentów opisu przy produktach ---------- */
.wc-block-components-product-metadata__description,
.wc-block-cart-item__product .wc-block-components-product-metadata,
.wc-block-components-order-summary-item__description .wc-block-components-product-metadata__description { display: none !important; }
.wc-block-cart-items img, .wc-block-components-order-summary img { max-width: 100%; height: auto; }
.wp-block-woocommerce-cart-cross-sells-block h2 { font-size: 21px; text-transform: uppercase; text-align: center; padding-bottom: 22px; border-bottom: 1px solid var(--sm-linia); }
.cross-sells-product .wc-block-components-product-name,
.cross-sells-product h3 { font-size: 14px !important; font-weight: 400 !important; text-transform: none; line-height: 1.6; }
.cross-sells-product img { aspect-ratio: 1; object-fit: cover; }
.wp-block-woocommerce-product-collection .wc-block-product .wp-block-post-title { font-size: 14px !important; font-weight: 400 !important; line-height: 1.6; margin: 10px 0 6px; }
.wp-block-woocommerce-product-collection .wc-block-product .wp-block-post-title a:hover { color: var(--sm-akcent); }
.wp-block-woocommerce-product-collection .wc-block-product img { aspect-ratio: 1; object-fit: cover; }
.wp-block-woocommerce-product-collection .wc-block-product .wc-block-components-product-price { font-size: 16px; }

/* Przyciski bloków w treści stron: biały tekst (styl linków .sm-tresc a ich nie nadpisuje) */
.sm-tresc .wp-block-button__link, .sm-tresc .wp-block-button__link:hover { color: #fff !important; text-decoration: none !important; background: var(--sm-akcent); border-radius: 3px; padding: 12px 22px; font-weight: 600; }
.sm-tresc .wp-block-table table { border-collapse: collapse; }
.sm-tresc .wp-block-table td, .sm-tresc .wp-block-table th { border: 0; border-bottom: 1px solid var(--sm-linia); }

/* ---------- Blog (poradniki) ---------- */
.sm-okruszki { font-size: 13px; color: var(--sm-szary); margin-bottom: 18px; }
.sm-okruszki a { color: var(--sm-szary); }
.sm-autor { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0 18px; margin: -10px 0 24px; border-bottom: 1px solid var(--sm-linia); }
.sm-autor__znak { flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--sm-akcent); color: #fff; font: 400 22px/44px "Oswald", sans-serif; text-align: center; }
.sm-autor p { margin: 0; font-size: 14px; }
.sm-autor__linia { color: var(--sm-tekst); }
.sm-autor__bio { color: var(--sm-szary) !important; margin-top: 4px !important; }
.sm-wskrocie { background: #f3f7fb; border-left: 4px solid var(--sm-akcent); padding: 16px 20px 6px; margin: 0 0 26px; border-radius: 0 4px 4px 0; }
.sm-wskrocie p { margin: 0 0 8px; }
.sm-artykul .wp-block-table { overflow-x: auto; margin: 18px 0 28px; }
.sm-artykul .wp-block-table table { min-width: 520px; margin: 0; }
.sm-artykul .wp-block-table thead th { background: #f6f6f8; font-weight: 600; }
.sm-artykul figcaption { font-size: 13px; color: var(--sm-szary); margin-top: 8px; }
.sm-artykul .wp-block-image { margin: 22px 0; }
.sm-artykul .wp-block-image img { border-radius: 4px; }
.sm-faq h3 { font-size: 16px; margin: 22px 0 6px; }

/* ShortPixel podaje WebP przez <picture>: obudowa nie może zmieniać układu (kafle, karuzele, siatki) */
picture { display: contents; }

/* Okruszki: linki odróżnione od tekstu nie tylko kolorem (Lighthouse: link-in-text-block) */
.woocommerce .woocommerce-breadcrumb a { color: var(--sm-tekst); text-decoration: underline; text-underline-offset: 2px; }
/* Paginacja: pola klikalne min. 36x36 px (Lighthouse: target-size, minimum 24 px) */
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span { min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
