/* ==========================================================================
   PZ Pavimenti — contenuti: offerte, realizzazioni e componenti condivisi
   (pillole, specifiche, riquadro richiesta, galleria con lightbox).
   Sempre caricato: non dipende da WooCommerce.
   ========================================================================== */

/* ============ FILTRI A PILLOLA ============ */
.pz-filter-bar {
	background: var(--pz-bg);
	padding: 1.5rem var(--pz-gutter) 0;
}
.pz-pills {
	display: flex;
	gap: 0.6rem;
	overflow-x: auto;
	scrollbar-width: none;
	padding-bottom: 0.25rem;
}
.pz-pills::-webkit-scrollbar { display: none; }
.pz-pill {
	display: inline-flex;
	white-space: nowrap;
	padding: 0.65rem 1.1rem;
	border: 1px solid var(--pz-line-strong);
	border-radius: 999px;
	font-size: 0.62rem;
	font-weight: 400;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--pz-black);
	transition: all 0.3s ease;
}
.pz-pill:hover,
.pz-pill.is-active { background: var(--pz-black); border-color: var(--pz-black); color: var(--pz-white); }
.pz-pills--wrap { flex-wrap: wrap; overflow: visible; list-style: none; margin: 0; padding: 0; }
/* Pillole lunghe ("Piastrelle Effetto Carta da Parati"): a capo tra le parole, mai fuori dalla colonna. */
.pz-pills--wrap .pz-pill { white-space: normal; }
.pz-pill__count { margin-left: 0.5rem; opacity: 0.5; letter-spacing: 0.1em; }

.pz-offer-badge {
	display: inline-flex;
	margin: -0.5rem 0 1.5rem;
	padding: 0.45rem 0.85rem;
	border-radius: 999px;
	background: var(--pz-black);
	color: var(--pz-white);
	font-size: 0.58rem;
	font-weight: 400;
	letter-spacing: 0.3em;
	text-transform: uppercase;
}

/* Categorie e marchio */
.pz-product-terms { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; align-items: start; margin-top: 1.25rem; }
.pz-product-terms__label {
	font-size: 0.6rem;
	font-weight: 500;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--pz-muted);
	padding-top: 0.75rem;
}
.pz-product-terms .pz-pills { gap: 0.4rem; }
.pz-product-terms .pz-pill { padding: 0.5rem 0.85rem; font-size: 0.56rem; }
@media (max-width: 480px) { .pz-product-terms { grid-template-columns: 1fr; gap: 0.5rem; } }

.pz-specs { margin: 0 0 2.25rem; padding: 0; }
.pz-specs__row {
	display: grid;
	grid-template-columns: 9rem 1fr;
	gap: 1rem;
	padding: 1rem 0;
	border-top: 1px solid var(--pz-line);
}
.pz-specs__row:last-child { border-bottom: 1px solid var(--pz-line); }
.pz-specs dt {
	font-size: 0.6rem;
	font-weight: 500;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--pz-muted);
	padding-top: 0.2rem;
}
.pz-specs dd { margin: 0; font-size: 0.98rem; line-height: 1.5; }
@media (max-width: 480px) { .pz-specs__row { grid-template-columns: 1fr; gap: 0.35rem; } }

.pz-inquiry {
	padding: 1.75rem;
	background: var(--pz-white);
	margin-bottom: 2rem;
}
.pz-inquiry__text { margin: 0 0 1.25rem; font-size: 0.98rem; line-height: 1.6; }
.pz-inquiry__ctas { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.pz-inquiry__alt { margin: 1.25rem 0 0; font-size: 0.82rem; color: var(--pz-muted); }
.pz-inquiry__alt a { color: var(--pz-black); }
@media (max-width: 480px) {
	.pz-inquiry { padding: 1.25rem; }
	.pz-inquiry__ctas { flex-direction: column; }
	.pz-inquiry__ctas .btn { justify-content: space-between; }
}

/* ============ COMUNI ============ */
.pz-kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.8rem;
	font-size: 0.62rem;
	font-weight: 400;
	letter-spacing: 0.35em;
	text-transform: uppercase;
	color: var(--pz-muted);
	margin-bottom: 1.25rem;
	line-height: 1.7;
}
.pz-kicker::before { content: ''; width: 28px; height: 1px; background: currentColor; flex-shrink: 0; }

.pz-notice {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 2.5rem;
	padding: 1rem 1.25rem;
	background: var(--pz-white);
	border-left: 2px solid var(--pz-black);
	font-size: 0.95rem;
	line-height: 1.5;
}
.pz-notice a { font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }

/* Prezzo */
.pz-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.6rem; margin: 0 0 0.9rem; line-height: 1.1; }
.pz-price__old { font-size: 0.9rem; color: var(--pz-muted); }
.pz-price__now { font-size: 1.35rem; font-weight: 300; letter-spacing: -0.01em; }
.pz-price__unit { font-size: 0.8rem; color: var(--pz-muted); margin-left: -0.35rem; }
.pz-price--large .pz-price__now { font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 200; }
.pz-price--large .pz-price__old { font-size: 1.05rem; }
.pz-price--large .pz-price__unit { font-size: 1rem; }
.pz-price-note { margin: -0.25rem 0 1.75rem; font-size: 0.8rem; color: var(--pz-muted); }

/* ============ OFFERTE: GRIGLIA E CARD ============ */
.pz-offers { background: var(--pz-bg); }
.pz-offers-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 3rem 1.75rem;
}
@media (min-width: 560px) { .pz-offers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .pz-offers-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.offer-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.offer-card__media {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #c8c8c8;
	margin-bottom: 1.25rem;
}
.offer-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--pz-ease); }
.offer-card:hover .offer-card__img { transform: scale(1.05); }
.offer-card__badge {
	position: absolute;
	top: 1rem;
	left: 1rem;
	padding: 0.45rem 0.85rem;
	border-radius: 999px;
	background: var(--pz-black);
	color: var(--pz-white);
	font-size: 0.62rem;
	font-weight: 400;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}
.offer-card__body { display: flex; flex-direction: column; flex: 1; }
.offer-card__meta {
	font-size: 0.58rem;
	font-weight: 400;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--pz-muted);
	margin-bottom: 0.6rem;
	line-height: 1.6;
}
.offer-card__title {
	font-size: clamp(1.1rem, 1.5vw, 1.3rem);
	font-weight: 300;
	letter-spacing: 0.04em;
	line-height: 1.15;
	margin: 0 0 0.8rem;
}
.offer-card__note { font-size: 0.8rem; color: var(--pz-muted); margin-bottom: 1.1rem; }
.offer-card__cta {
	margin-top: auto;
	padding-top: 0.9rem;
	border-top: 1px solid var(--pz-line-strong);
	font-size: 0.65rem;
	font-weight: 400;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	display: flex;
	justify-content: space-between;
}
.offer-card:hover .offer-card__cta .arr { transform: translateX(4px); }
.pz-offers__note { margin: 3.5rem auto 0; max-width: 40rem; text-align: center; font-size: 0.85rem; color: var(--pz-muted); }

/* ============ SCHEDA OFFERTA ============ */
.pz-single-offer { background: var(--pz-bg); padding-top: clamp(2.5rem, 5vw, 4.5rem); }
.pz-single-offer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 3rem;
	align-items: start;
}
@media (min-width: 960px) {
	.pz-single-offer__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(3rem, 6vw, 6rem); }
}
.pz-single-offer__media { position: relative; }
.pz-single-offer__badge { z-index: 2; pointer-events: none; }
.pz-single-offer__summary { container-type: inline-size; }
.pz-single-offer__title {
	font-size: min(clamp(2rem, 4vw, 3.4rem), 10cqi);
	line-height: 1;
	letter-spacing: -0.015em;
	font-weight: 200;
	margin: 0 0 1.5rem;
}
.pz-single-offer__lead { font-size: 1.02rem; line-height: 1.7; color: rgba(10, 10, 10, 0.82); margin: 0 0 2rem; }
.pz-single-offer__description,
.pz-related { margin-top: clamp(4rem, 8vw, 7rem); }
.pz-single-offer__description .entry-content { margin: 0; }
.pz-single-offer__description .section-label,
.pz-related .section-label { margin-bottom: 2rem; }

/* ============ REALIZZAZIONE ============ */
.pz-project-hero { min-height: clamp(460px, 78vh, 820px); }
.pz-project-hero .page-hero__inner { display: flex; flex-direction: column; justify-content: space-between; align-self: stretch; }

.pz-single-project { background: var(--pz-bg); }
.pz-single-project__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 3.5rem;
	align-items: start;
}
@media (min-width: 960px) {
	.pz-single-project__grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(3rem, 6vw, 6rem); }
}
.pz-single-project__story .section-label { margin-bottom: 2rem; }
.pz-single-project__story .entry-content { max-width: 46rem; margin: 0; }

.pz-project-facts .pz-specs { margin-bottom: 2.5rem; }
.pz-project-facts .pz-specs dd a { color: inherit; text-underline-offset: 0.2em; }
.pz-project-facts__title {
	font-size: 0.62rem;
	font-weight: 500;
	letter-spacing: 0.3em;
	color: var(--pz-muted);
	margin: 0 0 0.75rem;
}
.pz-used-products { list-style: none; margin: 0 0 2.5rem; padding: 0; }
.pz-used-products__item { border-top: 1px solid var(--pz-line); }
.pz-used-products__item:last-child { border-bottom: 1px solid var(--pz-line); }
.pz-used-products__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.2rem 1rem;
	padding: 1rem 0;
	text-decoration: none;
	color: inherit;
}
.pz-used-products__name { grid-column: 1; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.06em; }
.pz-used-products__brand { grid-column: 1; font-size: 0.75rem; color: var(--pz-muted); }
.pz-used-products__row .arr { grid-column: 2; grid-row: 1 / span 2; }
.pz-used-products__row--link:hover .pz-used-products__name { opacity: 0.65; }
.pz-used-products__row--link:hover .arr { transform: translateX(4px); }

.pz-single-project__gallery { margin-top: clamp(4rem, 8vw, 7rem); }
.pz-single-project__gallery-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 2rem; }
.pz-single-project__gallery-head .section-label { margin: 0; }
.pz-single-project__count { font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--pz-muted); white-space: nowrap; }

/* ============ GALLERIA ============ */
.pz-gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.pz-gallery__item { margin: 0; min-width: 0; }
.pz-gallery__link { display: block; height: 100%; overflow: hidden; background: #c8c8c8; cursor: zoom-in; }
.pz-gallery__img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--pz-ease); }
.pz-gallery__link:hover .pz-gallery__img { transform: scale(1.04); }

/* Foto principale + miniature (scheda offerta) */
.pz-gallery--thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pz-gallery--thumbs .pz-gallery__item:first-child { grid-column: 1 / -1; }
.pz-gallery--thumbs .pz-gallery__item:first-child .pz-gallery__link { aspect-ratio: 4 / 5; }
.pz-gallery--thumbs .pz-gallery__item:not(:first-child) .pz-gallery__link { aspect-ratio: 1; }

/* Griglia (realizzazione): la prima foto più grande */
.pz-gallery--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; }
.pz-gallery--grid .pz-gallery__link { aspect-ratio: 4 / 3; }
.pz-gallery--grid .pz-gallery__item:first-child { grid-column: 1 / -1; }
@media (min-width: 900px) {
	.pz-gallery--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
	.pz-gallery--grid .pz-gallery__item:first-child { grid-column: span 2; grid-row: span 2; }
	.pz-gallery--grid .pz-gallery__item:first-child .pz-gallery__link { aspect-ratio: auto; }
}

/* ============ LIGHTBOX ============ */
.pz-lb {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	background: rgba(10, 10, 10, 0.96);
	color: var(--pz-white);
	padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
	opacity: 0;
	transition: opacity 0.3s ease;
}
.pz-lb[hidden] { display: none; }
.pz-lb.is-open { opacity: 1; }
.pz-lb__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.pz-lb__count { font-size: 0.65rem; letter-spacing: 0.35em; text-transform: uppercase; color: var(--pz-muted-inv); }
.pz-lb__stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 1rem 0; touch-action: pan-y; }
.pz-lb__img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.pz-lb__foot { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.pz-lb__caption { flex: 1; min-height: 1.5rem; text-align: center; font-size: 0.85rem; color: rgba(255, 255, 255, 0.75); }
.pz-lb__btn {
	width: 48px;
	height: 48px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: var(--pz-white);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	flex-shrink: 0;
	transition: background-color 0.3s ease, color 0.3s ease;
}
.pz-lb__btn:hover { background: var(--pz-white); color: var(--pz-black); }
.pz-lb__btn[hidden] { visibility: hidden; display: inline-flex; }
html.pz-lb-open { overflow: hidden; }
