/* Świat Dachu: karta produktu. */
.sd-pdp { padding-bottom: clamp(32px, 5vw, 64px); }
.sd-pdp__top { gap: clamp(20px, 3.5vw, 56px) !important; margin-top: 8px !important; }
.sd-pdp__buy { position: sticky; top: 16px; align-self: flex-start; }
.sd-pdp__eyebrow { gap: 8px 16px !important; font-size: 12.5px; margin-bottom: 4px; }
.sd-pdp__brand { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--gold-dark); }
.sd-pdp__brand a { color: inherit; }
.sd-pdp__sku { color: var(--wp--preset--color--ink-3); }
.sd-pdp__title { font-size: clamp(24px, 2.6vw, 34px) !important; line-height: 1.12 !important; margin: 0 0 8px !important; }
.sd-pdp__price { font-size: clamp(26px, 2.8vw, 34px) !important; font-weight: 800; color: var(--wp--preset--color--navy-900); margin: 10px 0 !important; }
.sd-pdp__summary { color: var(--wp--preset--color--ink-2); font-size: 15px; }
.sd-highlights { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.sd-highlights li { position: relative; padding-left: 26px; }
.sd-highlights li::before { content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border-radius: 50%; background: #E7F4EC url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E7F4A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / 10px no-repeat; }
.sd-pdp__atc .wc-block-components-product-button__button, .sd-pdp__atc button[type="submit"], .sd-pdp__atc .wp-block-button__link { min-height: 54px; font-size: 16px !important; font-weight: 800 !important; border-radius: 12px !important; background: linear-gradient(135deg, var(--wp--preset--color--orange-light), var(--wp--preset--color--orange)) !important; color: #fff !important; }
.sd-pdp__details { margin-top: clamp(28px, 4vw, 56px) !important; }
@media (max-width: 781px) { .sd-pdp__buy { position: static; } }

.sd-vat { font-size: 13px; font-weight: 700; color: var(--wp--preset--color--ink-3); margin-left: 4px; }
.sd-pdp__price .wc-block-components-product-price__value, .sd-pdp__price .price { white-space: nowrap; }

/* ---------- Opis produktu (układ z Allegro: wiersze tekst + zdjęcie) ---------- */
.sd-desc { display: grid; gap: clamp(22px, 3vw, 40px); max-width: 1080px; margin: 8px 0 24px; }
.sd-desc__row { display: grid; gap: clamp(18px, 3vw, 40px); align-items: center; }
.sd-desc__row.is-split { grid-template-columns: 1fr 1fr; }
.sd-desc__text { font-size: 16px; line-height: 1.7; color: var(--wp--preset--color--ink-2); max-width: 760px; }
.sd-desc__text > :first-child { margin-top: 0; }
.sd-desc__text > :last-child { margin-bottom: 0; }
.sd-desc__text h2 { font-size: clamp(20px, 2vw, 24px); line-height: 1.25; margin: 0 0 12px; color: var(--wp--preset--color--navy-900); letter-spacing: -.01em; }
.sd-desc__text h3, .sd-desc__text h4 { font-size: 17px; margin: 18px 0 8px; color: var(--wp--preset--color--navy-900); }
.sd-desc__text p { margin: 0 0 12px; }
.sd-desc__text b, .sd-desc__text strong { color: var(--wp--preset--color--navy-900); }
.sd-desc__text ul { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 8px; }
.sd-desc__text ul li { position: relative; padding-left: 28px; }
.sd-desc__text ul li::before {
	content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%;
	background: #E7F4EC url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E7F4A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.sd-desc__text ol { padding-left: 22px; }
.sd-desc__text table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.sd-desc__text th, .sd-desc__text td { border-bottom: 1px solid var(--wp--custom--line); padding: 8px 10px; text-align: left; }
.sd-desc__media { margin: 0; text-align: center; }
.sd-desc__img { display: inline-block; max-width: 100%; height: auto; max-height: 560px; object-fit: contain; border-radius: 14px; background: #fff; }
.sd-desc__row:not(.is-split) .sd-desc__media .sd-desc__img { max-height: 520px; }
@media (max-width: 781px) {
	.sd-desc__row.is-split { grid-template-columns: 1fr; }
	.sd-desc__text { font-size: 15.5px; }
}

/* Pasek zakupu na telefonie (pdp.js): gdy główny przycisk jest poza ekranem. */
.sd-buybar { display: none; }
@media (max-width: 781px) {
	.sd-buybar {
		position: fixed; z-index: 9000; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px;
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--sd-line, #E6E1D6);
		box-shadow: 0 -10px 30px -12px rgba(7, 24, 43, .35); transform: translateY(110%); transition: transform .2s ease-out; visibility: hidden;
	}
	.sd-buybar.is-on { transform: none; visibility: visible; }
	.sd-buybar__info { min-width: 0; flex: 1; display: flex; flex-direction: column; }
	.sd-buybar__name { font-size: 12.5px; font-weight: 600; color: #516070; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.sd-buybar__price { font-size: 17px; font-weight: 800; color: var(--wp--preset--color--navy-900, #07182B); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.sd-buybar__price del { font-size: 13px; font-weight: 600; color: #8A96A3; margin-right: 4px; }
	.sd-buybar__price ins { text-decoration: none; }
	.sd-buybar__btn {
		flex: none; min-height: 48px; padding: 0 20px; border: 0; border-radius: 12px; font: inherit; font-size: 15px; font-weight: 800; color: #fff; cursor: pointer;
		background: linear-gradient(135deg, var(--wp--preset--color--orange-light, #F59A3A), var(--wp--preset--color--orange, #E8760E));
	}
	.sd-buybar__btn.is-loading { opacity: .7; }
	html.sd-buybar-on body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .sd-buybar { transition: none; } }

/* Kolory na karcie produktu: nazwa pod każdą próbką (Woo ukrywa ją jak tekst dla czytników), żeby podobnych
   odcieni (grafit RAL 7011 i antracyt RAL 7016) nie trzeba było zgadywać ani najeżdżać myszą. */
.sd-pdp__atc .is-style-swatch .wc-block-product-filter-chips__items { gap: 8px 6px; align-items: stretch; }
.sd-pdp__atc .is-style-swatch .wc-block-product-filter-chips__item {
	width: 92px !important; height: auto !important; min-height: 0; padding: 6px 3px 7px !important; border-radius: 12px !important;
	background: #fff !important; border: 1px solid var(--sd-line, #E6E1D6) !important; outline: none !important; box-shadow: none !important;
}
.sd-pdp__atc .is-style-swatch .wc-block-product-filter-chips__label { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.sd-pdp__atc .is-style-swatch .wc-block-product-filter-chips__swatch { flex: none; width: 32px !important; height: 32px !important; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(7, 24, 43, .14); }
.sd-pdp__atc .is-style-swatch .wc-block-product-filter-chips__text {
	position: static !important; clip: auto !important; clip-path: none !important; width: auto !important; height: auto !important;
	margin: 0 !important; overflow: visible !important; white-space: normal !important; word-break: normal;
	font-size: 11px; line-height: 1.25; font-weight: 600; text-align: center; color: #3A4652;
}
.sd-pdp__atc .is-style-swatch .wc-block-product-filter-chips__item:hover { border-color: var(--sd-navy-600, #2A5C8F) !important; }
.sd-pdp__atc .is-style-swatch .wc-block-product-filter-chips__item[aria-checked="true"] { border: 2px solid var(--wp--preset--color--orange, #E8760E) !important; background: #FFF7EF !important; padding: 5px 2px 6px !important; }
.sd-pdp__atc .is-style-swatch .wc-block-product-filter-chips__item[aria-checked="true"] .wc-block-product-filter-chips__text { color: var(--wp--preset--color--navy-900, #07182B); font-weight: 800; }
.sd-pdp__atc .is-style-swatch .wc-block-product-filter-chips__item:disabled { opacity: .45; }

/* Jednostka ceny (blachodachówki: za arkusz i za m²) i podpowiedź do rozmiaru. */
.sd-unit { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; letter-spacing: 0; color: #516070; }
.sd-size-hint { margin: -6px 0 12px; font-size: 13px; line-height: 1.45; color: #516070; }
.sd-size-hint a { font-weight: 700; color: var(--wp--preset--color--navy-600, #2A5C8F); white-space: nowrap; }

/* Telefon: zdjęcie produktu 4:3 zamiast kwadratu (zdjęcia z Base są zwykle poziome), nazwa i cena na pierwszym ekranie.
   Średnica, długość i rozmiar jako przyciski 44 px (Woo daje 30 px, łatwo trafić w sąsiedni). Kolory mają własne kafle wyżej. */
@media (max-width: 781px) {
	.sd-pdp .wc-block-product-gallery-large-image__wrapper { aspect-ratio: 4 / 3; }
	.sd-pdp__atc .wc-block-product-filter-chips__items { gap: 8px; }
	.sd-pdp__atc .wc-block-product-filter-chips__item { min-height: 44px; min-width: 56px; padding: 8px 14px; font-size: 15px; border-radius: 10px; }
	.sd-pdp__atc .wc-block-product-filter-chips__item .wc-block-product-filter-chips__label { font-size: inherit; }
}

/* Otwarte powiększenie zdjęć (Woo otwiera <dialog> atrybutem, nie w górnej warstwie): pasek zakupu i kompaktowy
   nagłówek nie zasłaniają zdjęć. */
body:has(dialog.wc-block-product-gallery-dialog[open]) .sd-buybar,
body:has(dialog.wc-block-product-gallery-dialog[open]) .sd-minibar { display: none !important; }
