/**
 * eBoots — Scheda prodotto (PDP). Mockup "PDP eBoots" mobile-first.
 * Caricato solo su is_product() (vedi inc/enqueue.php). Markup:
 * woocommerce/single-product.php. Comportamento: assets/js/product.js.
 * Dipende dai token del design system (tokens.css) + utility base.css.
 */

/* Fondo scuro dell'intera pagina prodotto: il single Blocksy non dipinge il
   content-area (default chiaro), a differenza di home/shop. Tinge body + #main
   così non restano gutter bianchi attorno al contenuto centrato. */
body.single-product,
.single-product #main.site-main {
	background: var(--bg);
}

.eb-pdp {
	max-width: 1120px;
	margin: 0 auto;
	padding: 1.25rem max(16px, env(safe-area-inset-left)) 3rem;
	background: var(--bg);
	color: var(--txt);
}

/* Colore chiaro sugli heading della PDP: Blocksy applica un colore heading scuro
   (tema chiaro di default) che, per specificità, vincerebbe sull'ereditarietà.
   :is() copre tutti gli heading dentro la scheda, anche quelli futuri (niente
   lista di selettori da mantenere a mano). Il pulsante accordion ha già il suo
   color in .eb-pdp__acc-q; i <p> ereditano il chiaro da .eb-pdp. */
.eb-pdp :is( h1, h2, h3 ) {
	color: var( --txt );
}

/* ------------------------------------------------------------------ */
/* 1. Galleria                                                         */
/* ------------------------------------------------------------------ */
.eb-pdp__stage {
	position: relative;
	background: linear-gradient(160deg, var(--surface-2), var(--surface) 70%);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	overflow: hidden;
}
.eb-pdp__counter {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	font-family: var(--font-d);
	font-weight: 700;
	font-size: 0.8125rem;
	color: var(--txt);
	background: rgba(0, 0, 0, 0.5);
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	padding: 0.15rem 0.6rem;
}
.eb-pdp__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	aspect-ratio: 4 / 5; /* variante A "Immersivo": galleria alta */
}
.eb-pdp__track::-webkit-scrollbar { display: none; }
.eb-pdp__slide {
	flex: 0 0 100%;
	scroll-snap-align: center;
	margin: 0;
	display: grid;
	place-items: center;
}
.eb-pdp__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.eb-pdp__stage--empty { aspect-ratio: 1 / 1; }
.eb-pdp__glow {
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 50% 45%, rgba(199, 247, 63, 0.18), transparent 60%);
}

.eb-pdp__thumbs {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	overflow-x: auto;
	scrollbar-width: none;
	padding-bottom: 2px;
}
.eb-pdp__thumbs::-webkit-scrollbar { display: none; }
.eb-pdp__thumb {
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	background: var(--surface-2);
	cursor: pointer;
	overflow: hidden;
	transition: border-color 0.15s ease;
}
.eb-pdp__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eb-pdp__thumb.is-active { border-color: var(--volt); }
.eb-pdp__thumb:hover { border-color: var(--line-strong); }

/* ------------------------------------------------------------------ */
/* 2. Info principali                                                  */
/* ------------------------------------------------------------------ */
.eb-pdp__main { margin-top: 1.5rem; }
.eb-pdp__brand {
	margin: 0 0 0.2rem;
	font-family: var(--font-ui);
	font-weight: 700;
	font-size: 0.6875rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--muted);
}
.eb-pdp__title-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}
.eb-pdp__title {
	margin: 0;
	font-family: var(--font-d);
	font-weight: 800;
	font-size: clamp(1.5rem, 6vw, 2rem);
	line-height: 1.02;
	text-transform: uppercase;
}
.eb-pdp__fav {
	flex: none;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: var(--surface-2);
	color: var(--muted);
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: color 0.15s ease, border-color 0.15s ease;
}
.eb-pdp__fav:hover { color: var(--volt); border-color: var(--line-strong); }
.eb-pdp__fav[aria-pressed="true"] { color: var(--volt); }

.eb-pdp__price {
	margin: 0.6rem 0 0.5rem;
	font-family: var(--font-d);
	font-weight: 800;
	font-size: 2.1rem; /* variante A: prezzo grande */
	line-height: 1;
	color: var(--volt);
}
.eb-pdp__price .woocommerce-Price-amount { color: var(--volt); }
.eb-pdp__price del { color: var(--muted); font-weight: 600; font-size: 1.1rem; margin-right: 0.4rem; }
.eb-pdp__price ins { text-decoration: none; }

.eb-pdp__badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 0.5rem;
}
.eb-pdp__badge {
	display: inline-block;
	font-family: var(--font-d);
	font-weight: 800;
	font-size: 0.6875rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.2rem 0.6rem;
	border-radius: var(--radius-pill);
}
.eb-pdp__badge--sale { background: var(--volt); color: var(--bg); }
.eb-pdp__badge--new { background: var(--mint); color: var(--bg); }
.eb-pdp__badge--best { background: var(--surface-2); color: var(--volt); border: 1px solid var(--volt); }
.eb-pdp__badge--out { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.eb-pdp__badge--terreno { background: var(--surface-2); color: var(--txt); border: 1px solid var(--line); }

.eb-pdp__finalprice {
	display: inline-block;
	margin: 0 0 0.9rem;
	font-family: var(--font-ui);
	font-size: 0.75rem;
	color: var(--volt);
	border: 1px solid rgba(199, 247, 63, 0.4);
	border-radius: var(--radius-sm);
	padding: 0.3rem 0.6rem;
}
.eb-pdp__avail {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0.3rem 0;
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 0.9rem;
}
.eb-pdp__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.eb-pdp__avail--out { color: var(--muted); }
.eb-pdp__ship {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0.3rem 0 0;
	font-family: var(--font-ui);
	font-size: 0.85rem;
	color: var(--muted);
}
.eb-pdp__bolt { color: var(--volt); }

/* ------------------------------------------------------------------ */
/* 3. Taglie                                                           */
/* ------------------------------------------------------------------ */
.eb-pdp__sizes { margin-top: 1.5rem; }
.eb-pdp__sizes-title {
	margin: 0 0 0.7rem;
	font-family: var(--font-ui);
	font-weight: 700;
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
/* Variante A "Immersivo": taglie a pillole larghe scrollabili, con cm sotto. */
.eb-pdp__size-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.eb-pdp__size {
	flex: 0 0 auto;
	min-width: 60px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 0.65rem 0.6rem;
	border: 1px solid var(--line);
	background: var(--surface-2);
	border-radius: var(--radius-md);
	color: var(--txt);
	cursor: pointer;
	font-family: var(--font-d);
	transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}
.eb-pdp__size:hover { border-color: var(--line-strong); }
.eb-pdp__size-eu { font-weight: 800; font-size: 1.05rem; line-height: 1; }
.eb-pdp__size-cm { font-family: var(--font-ui); font-weight: 600; font-size: 0.6rem; color: var(--muted); }
.eb-pdp__size.is-selected { background: var(--volt); border-color: var(--volt); color: var(--bg); }
.eb-pdp__size.is-selected .eb-pdp__size-cm { color: rgba(0, 0, 0, 0.6); }
.eb-pdp__size-sel {
	margin: 0.7rem 0 0;
	font-family: var(--font-ui);
	font-size: 0.85rem;
	color: var(--muted);
}
.eb-pdp__size-sel strong { color: var(--txt); }

/* ------------------------------------------------------------------ */
/* 4. Paio selezionato                                                 */
/* ------------------------------------------------------------------ */
.eb-pdp__pair { margin-top: 1.5rem; }
.eb-pdp__pair-title {
	margin: 0 0 0.5rem;
	font-family: var(--font-d);
	font-weight: 700;
	font-size: 1.05rem;
	text-transform: uppercase;
}
.eb-pdp__pair-dotazione,
.eb-pdp__pair-code {
	margin: 0.2rem 0;
	font-family: var(--font-ui);
	font-size: 0.9rem;
	color: var(--txt);
}
.eb-pdp__pair-code { color: var(--muted); }
.eb-pdp__pair-code span { color: var(--txt); font-weight: 600; }

/* ------------------------------------------------------------------ */
/* 5. Acquisto                                                         */
/* ------------------------------------------------------------------ */
.eb-pdp__buy { margin-top: 1.5rem; }
.eb-pdp__add {
	width: 100%;
	border: 0;
	cursor: pointer;
	background: var(--volt);
	color: var(--bg);
	border-radius: var(--radius-pill);
	font-family: var(--font-d);
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-size: 1.0625rem;
	padding: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	transition: filter 0.15s ease, transform 0.1s ease;
}
.eb-pdp__add:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.eb-pdp__add:not(:disabled):hover { filter: brightness(1.06); }
.eb-pdp__add:not(:disabled):active { transform: translateY(1px); }

.eb-pdp__express {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.6rem;
	margin-top: 0.6rem;
}
.eb-pdp__express-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	border: 1px solid var(--line-strong);
	background: var(--surface-2);
	color: var(--txt);
	border-radius: var(--radius-md);
	padding: 0.8rem;
	font-family: var(--font-ui);
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	transition: border-color 0.15s ease;
}
.eb-pdp__express-btn:not(:disabled):hover { border-color: var(--txt); }
.eb-pdp__express-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.eb-pdp__express-logo { width: 20px; height: 20px; flex: none; display: block; }
.eb-pdp__express-btn--apple .eb-pdp__express-logo { width: 18px; height: 20px; }
.eb-pdp__sold-note {
	margin: 0.6rem 0 0;
	font-family: var(--font-ui);
	font-size: 0.85rem;
	color: var(--muted);
}

/* ------------------------------------------------------------------ */
/* 6. Accordion                                                        */
/* ------------------------------------------------------------------ */
.eb-pdp__acc { margin-top: 1.75rem; border-top: 1px solid var(--line); }
.eb-pdp__acc-item { border-bottom: 1px solid var(--line); }
.eb-pdp__acc-head { margin: 0; }
.eb-pdp__acc-q {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 0.7rem;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 1rem 0;
	color: var(--txt);
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 0.95rem;
	text-align: left;
}
.eb-pdp__acc-ico { color: var(--volt); display: grid; place-items: center; flex: none; }
.eb-pdp__acc-tx { flex: 1; }
.eb-pdp__acc-pm { position: relative; width: 14px; height: 14px; flex: none; }
.eb-pdp__acc-pm::before,
.eb-pdp__acc-pm::after {
	content: "";
	position: absolute;
	background: var(--muted);
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.eb-pdp__acc-pm::before { top: 6px; left: 0; width: 14px; height: 2px; }
.eb-pdp__acc-pm::after { top: 0; left: 6px; width: 2px; height: 14px; }
.eb-pdp__acc-item.is-open .eb-pdp__acc-pm::after { transform: scaleY(0); opacity: 0; }
.eb-pdp__acc-item.is-open .eb-pdp__acc-ico { color: var(--volt); }
.eb-pdp__acc-a { overflow: hidden; }
.eb-pdp__acc-inner {
	padding: 0 0 1rem 2.4rem;
	font-family: var(--font-ui);
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--muted);
}
.eb-pdp__acc-inner p { margin: 0 0 0.5rem; }

/* ------------------------------------------------------------------ */
/* 7. Correlati                                                        */
/* ------------------------------------------------------------------ */
.eb-pdp__related { margin-top: 2.5rem; }
.eb-pdp__related-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 1rem;
}
.eb-pdp__related-title {
	margin: 0;
	font-family: var(--font-d);
	font-weight: 800;
	font-size: 1.25rem;
	text-transform: uppercase;
}
.eb-pdp__related-track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(190px, 1fr);
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	padding-bottom: 4px;
}
.eb-pdp__related-track::-webkit-scrollbar { display: none; }
.eb-pdp__related-item { scroll-snap-align: start; }

/* ------------------------------------------------------------------ */
/* 8. Community — stories Instagram-style                              */
/* ------------------------------------------------------------------ */
.eb-stories { margin-top: 2.5rem; }
.eb-stories__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}
.eb-stories__title {
	margin: 0;
	font-family: var(--font-d);
	font-weight: 800;
	font-size: 1.25rem;
	line-height: 1.05;
	text-transform: uppercase;
	color: var(--txt);
}
.eb-stories__title span { color: var(--volt); }
.eb-stories__all {
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 0.8rem;
	color: var(--muted);
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.15s ease;
}
.eb-stories__all:hover { color: var(--volt); }
.eb-stories__row {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	scrollbar-width: none;
	padding-bottom: 4px;
}
.eb-stories__row::-webkit-scrollbar { display: none; }
.eb-story {
	flex: 0 0 auto;
	width: 80px;
	text-align: center;
	text-decoration: none;
}
.eb-story__ring {
	display: block;
	width: 72px;
	height: 72px;
	margin: 0 auto;
	border-radius: 50%;
	padding: 2px;
	background: linear-gradient(135deg, var(--volt), var(--mint));
}
.eb-story__av {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	overflow: hidden;
	background: var(--surface-2);
	border: 2px solid var(--bg);
}
.eb-story__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eb-story__img--ph { background: radial-gradient(circle, var(--surface-2), var(--surface)); }
.eb-story__u {
	display: block;
	margin-top: 0.4rem;
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 0.7rem;
	color: var(--txt);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.eb-story__cat {
	display: block;
	font-family: var(--font-ui);
	font-size: 0.65rem;
	color: var(--muted);
}
.eb-story__boot {
	display: block;
	font-family: var(--font-ui);
	font-size: 0.62rem;
	color: var(--volt);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ------------------------------------------------------------------ */
/* Trust bar (3 rassicurazioni)                                        */
/* ------------------------------------------------------------------ */
.eb-pdp__trust {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.75rem;
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
}
.eb-pdp__trust-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.4rem;
	color: var(--volt);
}
.eb-pdp__trust-item span {
	display: flex;
	flex-direction: column;
	font-family: var(--font-ui);
	font-size: 0.7rem;
	color: var(--muted);
	line-height: 1.3;
}
.eb-pdp__trust-item strong { color: var(--txt); font-size: 0.78rem; }

/* ------------------------------------------------------------------ */
/* Desktop: galleria + info affiancate                                 */
/* ------------------------------------------------------------------ */
@media (min-width: 960px) {
	.eb-pdp {
		display: grid;
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
		grid-template-rows: auto;
		column-gap: 3rem;
		align-items: start;
	}
	.eb-pdp__main { margin-top: 0; }
	.eb-pdp__related,
	.eb-pdp__trust,
	.eb-stories { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
	.eb-pdp__track { scroll-behavior: auto; }
	.eb-pdp__acc-pm::before,
	.eb-pdp__acc-pm::after { transition: none; }
}
