/**
 * Strony produktu z treścią w blokach (od 1.1.0, inc/blocks.php, kontrakt rozdz. 14).
 *
 * Bloki dostają klasy z makiety (.product, .product-sec1/2/3, .desc, .extra, .description,
 * .description-content, .col-left, .col-right, .agpl-gallery), więc wygląd daje CSS makiety
 * (styles.css, mobile.css, product.css). Tutaj tylko wyrównanie znaczników bloków WordPressa
 * (figure, kolumny, tabela, galeria) do tamtych reguł.
 */

/* Nagłówek produktu ------------------------------------------------ */

.l-typ1 .product .wp-block-post-featured-image,
.l-typ1 .product .wp-block-image {
	margin: 0;
}

.l-typ1 .product-sec3 .wp-block-post-featured-image img {
	height: auto;
	max-width: 100%;
	width: auto;
}

/* Lista „Cechy produktu” bez dodatkowego wcięcia listy blokowej. */
.l-typ1 .product-sec1 .features .wp-block-list {
	padding-left: 0;
}

/* Lista „Usługi” (styl bloku Lista): ptaszek rysowany przez CSS – ten sam HTML na stronie i w edytorze.
   Wygląd jak dawne <img> + <strong> (styles.css / mobile.css: .desc ul li img). */
.l-typ1 .product-sec2 .desc ul.is-style-agpl-uslugi li {
	font-weight: 700;
}

.l-typ1 .product-sec2 .desc ul.is-style-agpl-uslugi li::before {
	background: url(../img/ico-check-green.svg) center / contain no-repeat;
	content: "";
	display: inline-block;
	height: 12px;
	margin-right: 9px;
	position: relative;
	top: -1px;
	width: 16px;
}

@media (max-width: 1024px) {
	.l-typ1 .product-sec2 .desc ul.is-style-agpl-uslugi li::before {
		height: 7px;
		width: 8px;
	}
}

/* H1 wypisany przez szablon, gdy w treści nie ma bloku „Tytuł”. */
.l-typ1 .agpl-product-title {
	color: #1c1958;
	font-size: 2.25rem;
	font-weight: 600;
	line-height: 2.75rem;
	margin: 20px 0 20px;
}

/* Obrazki i tabele w opisie obok zdjęcia. */
.l-typ1 .product-sec2 .desc .wp-block-image {
	margin: 0 0 16px;
}

/* Sekcja parametrów (blok „Kolumny” z klasą .description-content) ---- */

.l-typ1 .description-content.wp-block-columns {
	gap: 0;
	margin-bottom: 0;
}

@media (min-width: 1025px) {
	.l-typ1 .description-content.wp-block-columns {
		align-items: flex-start;
		flex-wrap: nowrap !important;
	}

	.l-typ1 .description-content.wp-block-columns:not(.agpl-description--single) > .col-left {
		flex: 0 0 40%;
		margin-right: 5%;
	}

	.l-typ1 .description-content.wp-block-columns:not(.agpl-description--single) > .col-right {
		flex: 0 0 55%;
	}
}

@media (max-width: 1024px) {
	.l-typ1 .description-content.wp-block-columns {
		display: block;
	}
}

/* Tabele: wygląd z makiety zamiast obramowania bloku „Tabela”. */
.l-typ1 .description-content .wp-block-table,
.l-typ1 .product-sec2 .desc .wp-block-table {
	margin: 0 0 20px;
}

.l-typ1 .description-content .wp-block-table td,
.l-typ1 .description-content .wp-block-table th,
.l-typ1 .product-sec2 .desc .wp-block-table td,
.l-typ1 .product-sec2 .desc .wp-block-table th {
	border: 0;
	border-bottom: 1px solid #efefef;
}

.l-typ1 .wp-block-table thead {
	border-bottom: 0;
}

.l-typ1 .description-content .wp-block-image {
	margin: 10px 0 20px;
}

/* Galeria (grupa .agpl-gallery z blokiem „Galeria”) – siatka kwadratów jak w szablonie. */
.l-typ1 .agpl-gallery .wp-block-gallery.has-nested-images {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	margin: 0;
}

.l-typ1 .agpl-gallery .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
	aspect-ratio: 1 / 1;
	background-color: #efefef;
	margin: 0;
	width: auto;
}

.l-typ1 .agpl-gallery .wp-block-gallery.has-nested-images figure.wp-block-image a {
	transition: opacity 100ms ease-in-out;
}

.l-typ1 .agpl-gallery .wp-block-gallery.has-nested-images figure.wp-block-image a:hover {
	opacity: 0.85;
}

@media (max-width: 1024px) {
	.l-typ1 .agpl-gallery .wp-block-gallery.has-nested-images {
		gap: 10px;
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	}
}

/* Strona grupy w blokach ------------------------------------------- */

/* Grupy WordPressa w motywie klasycznym mają wewnętrzny kontener – układ pasa z makiety przeniesiony na niego. */
.group-hero-grid > .wp-block-group__inner-container {
	display: flex;
	flex-direction: column;
	gap: 20px;
}
