/*
 * Shop nativo Watersports Center.
 * Token dal DESIGN.md "Watersports Center, lago e teal" (Novamira).
 * Caricato solo su pagine WooCommerce e home (griglia prodotti in evidenza).
 */

/* I vecchi nomi --ws-* restano, ma puntano ai token di base.css (DESIGN.md): Epilogue, angoli vivi, teal. */
:root {
	--ws-bg: var(--paper);
	--ws-surface: var(--paper);
	--ws-surface-alt: var(--mist);
	--ws-border: var(--stone);
	--ws-border-strong: #B9C4C1;
	--ws-ink: var(--ink);
	--ws-muted: #545B59;
	--ws-accent: var(--teal);
	--ws-accent-dark: var(--teal-deep);
	--ws-alert: #B42318;
	--ws-r-sm: 0;
	--ws-r-md: 0;
	--ws-r-lg: 0;
	--ws-font: var(--font);
}

/* ---------- Base WooCommerce ---------- */

.woocommerce,
.woocommerce-page .site-main {
	font-family: var(--ws-font);
	color: var(--ws-ink);
}

/* Il wrapper è quello standard di Woo (#primary > main.site-main): il CSS legacy di Hello lo stringe a 1140px. */
body.woocommerce-page main.site-main {
	max-width: none;
	margin-inline: 0;
	padding-inline: max(var(--m), env(safe-area-inset-left, 0px));
}

.woocommerce a { color: var(--ws-ink); }
.ws-details__content a,
.woocommerce-info a,
.woocommerce-message a,
.woocommerce-privacy-policy-text a { text-decoration: underline; text-underline-offset: 2px; }

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce .wc-block-components-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 52px;
	padding: 0 28px;
	border: 0;
	border-radius: 0;
	background: var(--ws-accent);
	color: var(--ws-ink);
	font: 500 var(--s-body)/1.2 var(--ws-font);
	text-decoration: none;
	transition: background-color .2s, transform .2s var(--ease);
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
	background: #00BD98;
	color: var(--ws-ink);
	transform: translateY(-2px);
}

.woocommerce button.button:disabled,
.woocommerce button.button.disabled,
.woocommerce button.button.alt:disabled,
.woocommerce button.button.alt.disabled,
.woocommerce button.button.alt.disabled:hover {
	opacity: .5;
	background: var(--ws-accent);
}

.woocommerce form .input-text,
.woocommerce form select,
.woocommerce .quantity .qty,
.woocommerce-page form .form-row input.input-text,
.woocommerce-page form .form-row textarea,
.ws-filters input[type="search"],
.ws-filters input[type="number"] {
	width: 100%;
	min-height: 52px;
	padding: 10px 16px;
	border: 2px solid var(--ws-border);
	border-radius: var(--ws-r-sm);
	background: #FFFFFF;
	color: var(--ws-ink);
	font: 400 16px/1.3 var(--ws-font);
}

.woocommerce form .input-text:focus,
.woocommerce form select:focus,
.ws-filters input:focus {
	outline: 0;
	border-color: var(--ws-ink);
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-top-color: var(--ws-accent);
	background: var(--ws-surface-alt);
	color: var(--ws-ink);
	font-family: var(--ws-font);
}

.woocommerce-message::before,
.woocommerce-info::before { color: var(--ws-accent); }
.woocommerce-error { border-top-color: var(--ws-alert); }
.woocommerce-error::before { color: var(--ws-alert); }

/* Titoli: battono le regole globali del kit Elementor (.elementor-kit-N h1/h2). */
.woocommerce-page .page-header .entry-title {
	margin: 48px 0 32px;
	font: 900 var(--s-head)/.95 var(--ws-font);
	letter-spacing: -.04em;
}
.woocommerce-page .woocommerce h2,
.woocommerce-page .woocommerce h3 {
	font: 900 clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem)/1.1 var(--ws-font);
	letter-spacing: -.02em;
}

.ws-breadcrumb {
	margin: 0 0 8px;
	font-size: 14px;
	color: var(--ws-muted);
}
.ws-breadcrumb a { color: var(--ws-ink); font-weight: 700; text-decoration: none; }
.ws-breadcrumb .breadcrumb_last { color: var(--ws-muted); }

/* ---------- Hero archivi ---------- */

.ws-hero {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: clamp(48px, 6vw, 96px) max(var(--m), env(safe-area-inset-right, 0px)) clamp(32px, 4vw, 56px) max(var(--m), env(safe-area-inset-left, 0px));
	border-bottom: 2px solid var(--ws-ink);
}

.ws-hero h1.ws-hero__title {
	margin: 0;
	color: var(--ws-ink);
	font: 900 var(--s-display)/.9 var(--ws-font);
	letter-spacing: -.045em;
}

.ws-hero__intro {
	max-width: 52ch;
	margin: 0;
	font: 400 var(--s-lead)/1.3 var(--ws-font);
}
.ws-hero__intro a { text-decoration: underline; text-underline-offset: 3px; }

/* Reparti: le voci del menu Negozio */
.ws-chips ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.ws-chips a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 16px;
	background: var(--ws-surface-alt);
	color: var(--ws-ink);
	font-weight: 500;
	text-decoration: none;
	transition: background-color .2s;
}
.ws-chips a:hover { background: var(--ws-border); }
.ws-chips a[aria-current] { background: var(--ws-ink); color: var(--paper); }

.ws-shop-intro {
	max-width: 68ch;
	padding-top: 32px;
	line-height: 1.5;
}

/* ---------- Layout shop + filtri ---------- */

.ws-shop {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 40px;
	padding: 32px 0 64px;
}

.ws-filters-open { display: none; }

.ws-filters {
	display: flex;
	flex-direction: column;
	gap: 20px;
	position: sticky;
	top: 24px;
}

.ws-filters__search {
	border-width: 0 0 1px !important;
	border-radius: 0 !important;
}

.ws-filters__apply { width: 100%; }

.ws-filters__reset {
	align-self: center;
	color: var(--ws-ink);
	text-decoration: underline;
	font-size: 14px;
}

.ws-filter {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.ws-filter__title {
	margin-bottom: 8px;
	padding: 0;
	font: 900 16px/1.2 var(--ws-font);
	letter-spacing: -.01em;
}

.ws-filter__list {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
	line-height: 1.35;
}

.ws-filter__list .ws-filter__list { padding-left: 18px; }

.ws-filter__list label {
	display: flex;
	gap: 8px;
	align-items: center;
	padding: 3px 0;
	cursor: pointer;
}

.ws-filter__list input[type="checkbox"] {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--ws-ink);
}

.ws-filter__price {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	font-size: 14px;
}
.ws-filter__price label { display: flex; align-items: center; gap: 4px; }
.ws-filter__price input { min-height: 38px; padding: 6px 8px; font-size: 15px; }

/* Ordinamento */
.woocommerce .woocommerce-ordering {
	float: none;
	display: flex;
	justify-content: flex-end;
	margin: 0 0 24px;
}
.woocommerce .woocommerce-ordering select {
	width: auto;
	min-height: 40px;
	padding: 8px 36px 8px 12px;
	font-size: 15px;
}

/* ---------- Griglia prodotti (shop, categorie, home) ---------- */

.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 40px 24px;
	margin: 0;
	padding: 0;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none; }

.woocommerce ul.products li.product {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0;
	text-align: left;
}

.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	color: var(--ws-ink);
	text-decoration: none;
}

.woocommerce ul.products li.product a img {
	box-sizing: border-box; /* col padding in content-box la foto era larga il 116% e l'ultima colonna usciva dalla pagina */
	width: 100%;
	aspect-ratio: 1;
	object-fit: contain;
	margin: 0 0 8px;
	padding: 8%;
	background: var(--ws-surface-alt);
	mix-blend-mode: multiply; /* il fondo bianco delle foto prende il colore della card */
	transition: transform .4s var(--ease);
}
.woocommerce ul.products li.product a:hover img { transform: scale(1.03); }

.ws-card__badge {
	align-self: flex-start;
	padding: 4px 8px;
	background: var(--ws-accent);
	color: var(--ws-ink);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	margin: 0;
	padding: 0;
	font: 500 18px/1.2 var(--ws-font);
	letter-spacing: -.01em;
	color: var(--ws-ink);
}

.woocommerce ul.products li.product .price {
	margin: 2px 0 0;
	color: var(--ws-ink);
	font: 900 20px/1.3 var(--ws-font);
	font-variant-numeric: tabular-nums;
}

.woocommerce ul.products li.product .price del,
.woocommerce div.product .summary .price del {
	color: var(--ws-muted);
	font-weight: 400;
	opacity: 1;
}

.woocommerce ul.products li.product .price ins,
.woocommerce div.product .summary .price ins {
	color: var(--ws-accent-dark);
	text-decoration: none;
}

.ws-card__cat {
	font-size: 13px;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--ws-muted);
}

.woocommerce ul.products li.product a:hover .woocommerce-loop-product__title { text-decoration: underline; text-underline-offset: 3px; }

/* Paginazione */
.woocommerce nav.woocommerce-pagination { margin-top: 48px; }
.woocommerce nav.woocommerce-pagination ul { border: 0; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; margin: 0 2px; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	min-width: 40px;
	padding: 10px;
	border-radius: var(--ws-r-sm);
	color: var(--ws-ink);
	font: 700 16px/1 var(--ws-font);
}
.woocommerce nav.woocommerce-pagination ul li span.current {
	background: var(--ws-ink);
	color: var(--paper);
}
.woocommerce nav.woocommerce-pagination ul li a:hover { background: var(--ws-surface-alt); color: var(--ws-ink); }

/* ---------- Scheda prodotto ---------- */
/* Due campi che si toccano: galleria su nebbia fino al bordo sinistro della pagina, riepilogo su bianco.
   Griglia: colonna 1 = galleria (righe 1-2), colonna 2 = titolo (riga 1) e riepilogo (riga 2). */

html:has(body.single-product) { scroll-behavior: smooth; }
#ws-cart { display: block; scroll-margin-top: 24px; }

.woocommerce div.product {
	display: grid;
	grid-template-columns: min(42%, 600px) minmax(0, 1fr); /* galleria al 42%, come l'asse dell'hero; mai oltre 600px */
	grid-template-rows: auto 1fr;
	column-gap: clamp(32px, 5vw, 88px);
	align-items: start;
	padding: 0 0 clamp(64px, 8vw, 120px);
}

.ws-single-head { grid-column: 2; grid-row: 1; padding-top: clamp(24px, 3vw, 48px); }
.ws-single-head .ws-breadcrumb { margin: 0 0 20px; }

.woocommerce div.product .product_title {
	margin: 0 0 20px;
	font: 900 clamp(2rem, 1.1rem + 2.8vw, 3.75rem)/.95 var(--ws-font); /* i nomi dei prodotti sono lunghi */
	letter-spacing: -.04em;
	text-wrap: balance;
}

/* Galleria dentro .ws-gal: campo nebbia che prosegue fino al bordo sinistro della pagina e 24px sotto le
   miniature. Il campo sta sul contenitore perché la galleria di Woo ha overflow nascosto (vedi sotto). */
.ws-gal {
	grid-column: 1;
	grid-row: 1 / span 2;
	position: relative;
	isolation: isolate;
	padding: clamp(24px, 3vw, 48px) 0 0;
}
.ws-gal::before {
	content: "";
	position: absolute;
	inset: 0 0 -24px -50vw;
	background: var(--ws-surface-alt);
	z-index: -1;
}
.woocommerce div.product div.images.woocommerce-product-gallery {
	float: none;
	width: 100%;
	margin: 0;
}
.woocommerce div.product div.images img {
	border-radius: 0;
	mix-blend-mode: multiply; /* il fondo bianco delle foto prende il colore del campo */
}
.woocommerce div.product div.images .flex-control-thumbs { margin-top: 12px; }
.woocommerce div.product div.images .flex-control-thumbs li img { opacity: .55; transition: opacity .2s; }
.woocommerce div.product div.images .flex-control-thumbs li img:hover,
.woocommerce div.product div.images .flex-control-thumbs li img.flex-active { opacity: 1; }
.woocommerce div.product div.images .flex-control-thumbs li img.flex-active { outline: 3px solid var(--ws-ink); outline-offset: -3px; }

/* Woo nasconde la galleria (opacity:0 inline) finché il suo JS non parte, e LiteSpeed
   ritarda il JS al primo tocco: senza questo su mobile si vede un buco al posto della foto.
   Prima dello slider Woo mostra già la foto principale con le altre in fila al 25%, alte quanto
   le miniature che lo slider mette dopo: nessuno spazio da riservare (era la causa del CLS 0,2). */
.woocommerce div.product div.images.woocommerce-product-gallery { opacity: 1 !important; }
/* Mentre lo slider parte, per un attimo le foto stanno una sotto l'altra e spingono giù il riepilogo
   (CLS 0,25 su mobile). La galleria ha quindi un'altezza fissa: foto quadrata più le file di miniature
   da 4 (una fila ogni 4 foto in più), e quello che sporge nel frattempo resta nascosto. */
.woocommerce div.product div.images .woocommerce-product-gallery__image img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.woocommerce div.product div.images.woocommerce-product-gallery { aspect-ratio: 1; overflow: hidden; }
/* Appena creato, il riquadro dello slider contiene tutte le foto in colonna (2.800 px) e le miniature finiscono
   fuori schermo; quando lo slider si sistema risalgono e il browser lo conta come spostamento. Quadrato da subito. */
.woocommerce div.product div.images .flex-viewport { aspect-ratio: 1; overflow: hidden; }
/* Le miniature che lo slider crea non hanno misure: quadrate da subito, così la fila non cresce quando arrivano le foto. */
.woocommerce div.product div.images .flex-control-thumbs li img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.woocommerce div.product div.images.woocommerce-product-gallery:has(.woocommerce-product-gallery__image:nth-child(2)) { aspect-ratio: 4 / 5; }
.woocommerce div.product div.images.woocommerce-product-gallery:has(.woocommerce-product-gallery__image:nth-child(6)) { aspect-ratio: 2 / 3; }
.woocommerce div.product div.images.woocommerce-product-gallery:has(.woocommerce-product-gallery__image:nth-child(10)) { aspect-ratio: 4 / 7; }

/* Riepilogo */
.woocommerce div.product div.summary {
	grid-column: 2;
	grid-row: 2;
	float: none;
	width: 100%;
	margin: 0;
	font-size: 16px;
	line-height: 1.45;
}

.ws-price { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 20px; }
.woocommerce div.product .ws-price p.price,
.woocommerce div.product .ws-price span.price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	margin: 0;
	color: var(--ws-ink);
	font: 900 clamp(2.25rem, 1.6rem + 2vw, 3.5rem)/1 var(--ws-font);
	letter-spacing: -.03em;
	font-variant-numeric: tabular-nums;
}
.woocommerce div.product .ws-price .price del { order: 2; font-size: .45em; font-weight: 400; color: var(--ws-muted); opacity: 1; }
.woocommerce div.product .ws-price .price ins { order: 1; color: var(--ws-ink); text-decoration: none; }
.ws-save {
	padding: 8px 12px;
	background: var(--ws-accent);
	color: var(--ws-ink);
	font: 500 15px/1 var(--ws-font);
	white-space: nowrap;
}

.woocommerce div.product .woocommerce-product-details__short-description {
	max-width: 58ch;
	margin: 0 0 28px;
	font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
	line-height: 1.45;
	text-wrap: pretty;
}
.woocommerce div.product .woocommerce-product-details__short-description p { margin: 0 0 .8em; }
.woocommerce div.product .woocommerce-product-details__short-description p:last-child { margin: 0; }

/* Varianti: etichetta sopra, opzioni come tessere piene (plugin swatches), scelta = inchiostro. */
.woocommerce div.product form.cart { margin: 0; }
.woocommerce div.product form.cart .variations { display: block; margin: 0 0 4px; border: 0; }
.woocommerce div.product form.cart .variations tbody { display: grid; gap: 16px; }
.woocommerce div.product form.cart .variations tr { display: grid; gap: 8px; }
.woocommerce div.product form.cart .variations th,
.woocommerce div.product form.cart .variations td { display: block; background: transparent; border: 0; padding: 0; }
.woocommerce div.product form.cart .variations th.label {
	width: auto;
	font-weight: 500;
	font-size: 15px;
	color: var(--ws-ink);
	text-align: left;
	line-height: 1.3;
}
.woocommerce div.product form.cart .variations th.label label { display: inline; }
.woocommerce div.product form.cart .variations select {
	min-height: 48px;
	padding: 0 40px 0 14px;
	background: var(--ws-surface-alt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23131313' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 18px no-repeat;
	border: 0;
	border-radius: 0;
	color: var(--ws-ink);
	font: 500 15px/1 var(--ws-font);
	appearance: none;
	-webkit-appearance: none;
}
.woocommerce div.product form.cart .variations .reset_variations { display: none !important; } /* si cambia scelta toccando un'altra tessera */
.woocommerce div.product ul.variable-items-wrapper {
	display: flex !important;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	/* il plugin swatches colora con queste variabili e con selettori più pesanti dei nostri */
	--wvs-item-background-color: var(--ws-surface-alt);
	--wvs-item-text-color: var(--ws-ink);
	--wvs-hover-item-background-color: var(--ws-border);
	--wvs-hover-item-text-color: var(--ws-ink);
	--wvs-selected-item-background-color: var(--ws-ink);
	--wvs-selected-item-text-color: var(--paper);
	--wvs-item-box-shadow: none;
	--wvs-hover-item-box-shadow: none;
	--wvs-selected-item-box-shadow: none;
	--wvs-item-border-radius: 0;
}
.woocommerce div.product ul.variable-items-wrapper li.variable-item,
.woocommerce div.product ul.variable-items-wrapper li.variable-item:not(.radio-variable-item) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	margin: 0;
	padding: 0 16px;
	background: var(--ws-surface-alt);
	color: var(--ws-ink);
	border: 0;
	border-radius: 0;
	box-shadow: none;
	font: 500 15px/1 var(--ws-font);
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
.woocommerce div.product ul.variable-items-wrapper li.variable-item .variable-item-span { padding: 0; font: inherit; color: inherit; }
.woocommerce div.product ul.variable-items-wrapper li.variable-item:hover,
.woocommerce div.product ul.variable-items-wrapper li.variable-item:focus-visible { background: var(--ws-border); box-shadow: none; }
.woocommerce div.product ul.variable-items-wrapper li.variable-item.selected,
.woocommerce div.product ul.variable-items-wrapper li.variable-item.selected:hover { background: var(--ws-ink) !important; color: var(--paper) !important; box-shadow: none !important; }
.woocommerce div.product ul.variable-items-wrapper li.variable-item.selected .variable-item-span { color: var(--paper); }
.woocommerce div.product ul.variable-items-wrapper li.variable-item.disabled,
.woocommerce div.product ul.variable-items-wrapper li.variable-item.disabled:hover { opacity: .4; text-decoration: line-through; cursor: not-allowed; background: var(--ws-surface-alt); color: var(--ws-ink); }
.woocommerce div.product ul.variable-items-wrapper li.variable-item:focus-visible { outline: 3px solid var(--ws-ink); outline-offset: 2px; }

/* Disponibilità della variante scelta */
.woocommerce div.product .woocommerce-variation.single_variation { margin-top: 12px; }
.woocommerce div.product .woocommerce-variation-price { margin-bottom: 8px; font: 900 20px/1.2 var(--ws-font); }
.woocommerce div.product .woocommerce-variation-price .price del { font-weight: 400; color: var(--ws-muted); }
.woocommerce div.product .stock { margin: 0; color: var(--ws-accent-dark); font-weight: 500; font-size: 15px; }
.woocommerce div.product .stock.out-of-stock { color: var(--ws-alert); }

/* Quantità: meno, campo, più (scheda e carrello). Il campo non ha le freccette del browser. */
.woocommerce .quantity {
	display: inline-flex;
	align-items: stretch;
	height: 52px;
	background: var(--ws-surface-alt);
}
.woocommerce .quantity .ws-qty-btn,
.woocommerce .quantity .ws-qty-btn:hover,
.woocommerce .quantity .ws-qty-btn:focus {
	flex: 0 0 44px;
	width: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--ws-surface-alt);
	color: var(--ws-ink);
	font: 500 22px/1 var(--ws-font);
	cursor: pointer;
	transition: background-color .15s;
}
.woocommerce .quantity .ws-qty-btn:hover { background: var(--ws-border); }
.woocommerce .quantity .ws-qty-btn:focus-visible { outline: 3px solid var(--ws-ink); outline-offset: -3px; }
.woocommerce .quantity .qty {
	flex: 1 1 44px;
	width: 44px;
	min-width: 44px;
	min-height: 0;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--paper);
	text-align: center;
	font: 500 17px/1 var(--ws-font);
	-moz-appearance: textfield;
	appearance: textfield;
}
.woocommerce .quantity .qty::-webkit-outer-spin-button,
.woocommerce .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.woocommerce .quantity .qty:focus { outline: 3px solid var(--ws-ink); outline-offset: -3px; box-shadow: none; }

/* Riga del carrello: quantità stretta + bottone pieno inchiostro (azione primaria su fondo chiaro, DESIGN.md) */
.woocommerce div.product form.cart .woocommerce-variation-add-to-cart,
.woocommerce div.product form.cart:not(.variations_form) {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 8px;
	margin-top: 16px;
}
.woocommerce div.product form.cart .woocommerce-variation-add-to-cart.woocommerce-variation-add-to-cart-disabled { display: grid; }
/* Il clearfix di Woo (::before/::after come tabella) occuperebbe la prima cella della griglia. */
.woocommerce div.product form.cart:not(.variations_form)::before,
.woocommerce div.product form.cart:not(.variations_form)::after { content: none; display: none; }
.woocommerce div.product form.cart div.quantity { float: none; margin: 0; }
.woocommerce div.product form.cart .button,
.woocommerce div.product form.cart .button.alt {
	float: none;
	width: 100%;
	background: var(--ws-ink);
	color: var(--paper);
}
.woocommerce div.product form.cart .button:hover,
.woocommerce div.product form.cart .button.alt:hover { background: #000; color: var(--paper); }
/* Woo scrive sempre il bottone come "disabled, scelta necessaria" e lo accende col JS. Se le opzioni sono già
   scelte nell'HTML (attributi con una sola opzione, vedi shop.php) il bottone si mostra acceso da subito;
   resta spento solo finché manca una scelta o la variante non è disponibile. */
.woocommerce div.product form.cart .button.disabled.wc-variation-selection-needed,
.woocommerce div.product form.cart .button.disabled.wc-variation-selection-needed:hover { opacity: 1; background: var(--ws-ink); color: var(--paper); cursor: pointer; }
.woocommerce div.product form.cart.variations_form:has(select:not(:has(option[selected]:not([value=""])))) .button.disabled.wc-variation-selection-needed,
.woocommerce div.product form.cart .button.disabled.wc-variation-is-unavailable,
.woocommerce div.product form.cart .button.disabled.wc-variation-is-unavailable:hover { opacity: .45; background: var(--ws-ink); color: var(--paper); cursor: not-allowed; }
/* Apple Pay / Google Pay di WooPayments sotto il bottone */
.woocommerce div.product #wcpay-payment-request-wrapper,
.woocommerce div.product .wcpay-payment-request-wrapper { margin-top: 10px; }
.woocommerce div.product #wcpay-payment-request-button-separator { display: none; }

/* Rassicurazioni: campo pietra, testo pieno, nessuna fila di icone (DESIGN.md) */
.ws-trust {
	display: grid;
	gap: 10px;
	margin-top: 20px;
	padding: 20px 24px;
	background: var(--ws-border);
	color: var(--ws-ink);
	font-size: 15px;
	line-height: 1.4;
}
.ws-trust p { margin: 0; }
.ws-trust strong { font-weight: 900; }
.ws-trust a { color: var(--ws-ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 2px; }
.ws-trust__wa { margin-top: 6px !important; }

.woocommerce div.product .product_meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	margin: 20px 0 0;
	font-size: 13px;
	color: var(--ws-muted);
}
.woocommerce div.product .product_meta a { font-weight: 500; text-decoration: underline; text-underline-offset: 2px; color: var(--ws-ink); }

/* Descrizione completa + riquadro fisso */
.ws-details {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: clamp(32px, 5vw, 88px);
	align-items: start;
	margin-top: clamp(56px, 7vw, 112px);
}

.ws-details__content { line-height: 1.5; }
.ws-details .ws-details__content h2,
.ws-details .ws-details__content h3 { font: 900 clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem)/1 var(--ws-font); letter-spacing: -.03em; margin: 40px 0 14px; text-wrap: balance; }
.ws-details__content p, .ws-details__content li { max-width: 68ch; }
.ws-details__content > :first-child { margin-top: 0; }

.ws-advice {
	position: sticky;
	top: 24px;
	display: grid;
	gap: 16px;
	padding: 24px;
	background: var(--ws-accent);
	color: var(--ws-ink);
}
.ws-advice__buy { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: center; }
.ws-advice__buy img { width: 72px; height: 72px; object-fit: contain; background: var(--paper); border-radius: 0; }
.ws-advice__buy strong { display: block; font-weight: 500; font-size: 15px; line-height: 1.25; }
/* selettori pesanti: Woo colora span.price di verde (#77a464) e mostra il barrato */
.woocommerce div.product .ws-advice__buy span.price { display: block; margin: 4px 0 0; font: 900 22px/1 var(--ws-font); color: var(--ws-ink); font-variant-numeric: tabular-nums; }
.woocommerce div.product .ws-advice__buy span.price del { display: none; }
.woocommerce div.product .ws-advice__buy span.price ins { text-decoration: none; color: var(--ws-ink); font-weight: 900; }
.woocommerce .ws-advice a.button { width: 100%; background: var(--ws-ink); color: var(--paper); }
.woocommerce .ws-advice a.button:hover { background: #000; color: var(--paper); }
.ws-advice h2.ws-advice__title { margin: 8px 0 0; color: var(--ws-ink); font: 900 clamp(1.375rem, 1.2rem + .6vw, 1.75rem)/1.05 var(--ws-font); letter-spacing: -.02em; }
.ws-advice p { margin: -8px 0 0; font-size: 15px; line-height: 1.4; }
.ws-advice__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ws-advice__list a { color: var(--ws-ink); text-decoration: underline; text-underline-offset: 2px; font-size: 15px; font-weight: 500; }

/* Guarda anche */
.ws-related { grid-column: 1 / -1; margin-top: clamp(64px, 8vw, 128px); }
.ws-related__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px; margin-bottom: 28px; }
.ws-related__head h2 { margin: 0; font: 900 clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem)/1 var(--ws-font); letter-spacing: -.03em; }
.ws-related__all { color: var(--ws-ink); font-weight: 500; text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 2px; }

/* Barra fissa su telefono: prezzo, carrello, WhatsApp (definita in site.css, qui solo la variante della scheda) */
.ws.dock.dock-buy .dock-price { display: none; }
@media (max-width: 760px) {
	.ws.dock.dock-buy { align-items: center; }
	.ws.dock.dock-buy .dock-price { display: block; flex: none; padding-left: 4px; font: 900 20px/1 var(--ws-font); color: var(--ws-ink); font-variant-numeric: tabular-nums; }
	.ws.dock.dock-buy .dock-price del { display: none; }
	.ws.dock.dock-buy .dock-price ins { text-decoration: none; }
	.ws.dock.dock-buy .btn { font-size: 15px; padding: 0 12px; }
	.ws.dock.dock-buy .btn-teal { flex: 0 0 auto; }
}

/* ---------- Carrello ---------- */
/* Tabella a bande su nebbia (niente linee sottili), quantità coi bottoni, totale su campo nebbia col bottone inchiostro. */

.woocommerce-cart .woocommerce:has(.woocommerce-cart-form) {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: clamp(32px, 5vw, 64px);
	align-items: start;
	padding-bottom: clamp(48px, 6vw, 96px);
}
.woocommerce-cart .woocommerce-notices-wrapper { grid-column: 1 / -1; }

.woocommerce table.shop_table {
	border: 0;
	border-collapse: collapse;
	border-radius: 0;
	font-family: var(--ws-font);
}
.woocommerce table.shop_table th { padding: 0 12px 10px; font-weight: 500; font-size: 15px; text-align: left; border: 0; }
.woocommerce table.shop_table td { padding: 16px 12px; border: 0; vertical-align: middle; }
.woocommerce table.cart tbody tr.cart_item td { background: var(--ws-surface-alt); border-top: 8px solid var(--paper); }
.woocommerce table.cart tbody tr.cart_item:first-child td { border-top: 0; }
.woocommerce table.cart td.product-remove { width: 1%; padding-right: 0; }
.woocommerce table.cart td.product-thumbnail { width: 1%; }
.woocommerce table.shop_table img { display: block; width: 72px; height: 72px; object-fit: contain; mix-blend-mode: multiply; border-radius: 0; }
.woocommerce table.shop_table td.product-name a { color: var(--ws-ink); font-weight: 500; text-decoration: none; }
.woocommerce table.shop_table td.product-name a:hover { text-decoration: underline; text-underline-offset: 2px; }
.woocommerce table.cart td.product-price,
.woocommerce table.cart td.product-quantity,
.woocommerce table.cart td.product-subtotal { width: 1%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.woocommerce table.cart th.product-subtotal,
.woocommerce table.cart td.product-subtotal { text-align: right; font-weight: 900; }
.woocommerce table.cart td.product-quantity .quantity { background: var(--paper); }
.woocommerce table.cart td.product-quantity .ws-qty-btn { background: var(--paper); }
.woocommerce table.cart td.product-quantity .ws-qty-btn:hover { background: var(--ws-border); }
.woocommerce a.remove {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 0;
	color: var(--ws-ink) !important;
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
}
.woocommerce a.remove:hover { background: var(--ws-ink); color: var(--paper) !important; }

/* Riga delle azioni: codice promozionale a sinistra, Aggiorna carrello a destra, entrambi secondari (pietra). */
.woocommerce-cart table.cart td.actions { padding: 20px 0 0; background: transparent; }
.woocommerce-cart table.cart td.actions .coupon { display: flex; gap: 8px; float: none; }
.woocommerce-cart table.cart td.actions .coupon .input-text { flex: 0 0 220px; width: 220px; min-height: 52px; }
.woocommerce-cart table.cart td.actions .button,
.woocommerce-cart table.cart td.actions .button:hover { background: var(--ws-border); color: var(--ws-ink); transform: none; }
.woocommerce-cart table.cart td.actions .button:hover { background: #D3DCD9; }
.woocommerce-cart table.cart td.actions .button:disabled,
.woocommerce-cart table.cart td.actions .button:disabled:hover { background: var(--ws-border); color: var(--ws-muted); opacity: 1; }

.woocommerce .cart-collaterals .cart_totals,
.woocommerce-page .cart-collaterals .cart_totals {
	float: none;
	width: 100%;
	box-sizing: border-box;
	padding: 24px;
	background: var(--ws-surface-alt);
	border: 0;
	border-radius: 0;
}
.cart_totals h2 { margin: 0 0 12px; font: 900 clamp(1.375rem, 1.2rem + .6vw, 1.75rem)/1.1 var(--ws-font); letter-spacing: -.02em; }
.woocommerce .cart_totals table.shop_table th,
.woocommerce .cart_totals table.shop_table td { padding: 12px 0; border: 0; border-top: 2px solid var(--paper); background: transparent; font-size: 16px; }
.woocommerce .cart_totals table.shop_table tr:first-child th,
.woocommerce .cart_totals table.shop_table tr:first-child td { border-top: 0; }
.woocommerce .cart_totals table.shop_table th { font-weight: 500; width: 40%; }
.woocommerce .cart_totals table.shop_table td { text-align: right; }
.woocommerce .cart_totals tr.order-total td,
.woocommerce .cart_totals tr.order-total th { font-weight: 900; font-size: 20px; }
.woocommerce .cart_totals tr.order-total td .includes_tax { display: block; font-size: 13px; font-weight: 400; color: var(--ws-muted); }
.woocommerce .cart_totals .woocommerce-shipping-destination,
.woocommerce .cart_totals .woocommerce-shipping-calculator { font-size: 14px; }
.woocommerce .cart_totals .shipping-calculator-button { color: var(--ws-ink); text-decoration: underline; text-underline-offset: 2px; }
.woocommerce .cart_totals .shipping-calculator-button::after { display: none; }
.woocommerce .wc-proceed-to-checkout { padding: 16px 0 0; }
.woocommerce .wc-proceed-to-checkout a.checkout-button,
.woocommerce .wc-proceed-to-checkout a.checkout-button:hover { display: flex; width: 100%; margin: 0; background: var(--ws-ink); color: var(--paper); font-size: 17px; }
.woocommerce .wc-proceed-to-checkout a.checkout-button:hover { background: #000; }
/* Apple Pay / Google Pay di WooPayments sotto il bottone: il separatore "O" di Woo diventa una riga di testo. */
.woocommerce-cart #wcpay-express-checkout-button-separator,
.woocommerce-cart #wcpay-payment-request-button-separator { margin: 12px 0 0; font-size: 13px; color: var(--ws-muted); text-align: center; }
.woocommerce-cart #wcpay-express-checkout-button-separator::before,
.woocommerce-cart #wcpay-express-checkout-button-separator::after,
.woocommerce-cart #wcpay-payment-request-button-separator::before,
.woocommerce-cart #wcpay-payment-request-button-separator::after { display: none; }

.cart-empty.woocommerce-info { margin: 48px 0 24px; }
.woocommerce-cart .return-to-shop { margin-bottom: 64px; }

/* ---------- Checkout ---------- */

.woocommerce-checkout form.checkout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
	grid-template-rows: auto auto auto 1fr; /* l'ultima riga assorbe l'altezza della colonna sinistra */
	column-gap: 48px;
	align-items: start;
	padding-bottom: 64px;
}
.woocommerce-checkout form.checkout > .woocommerce-NoticeGroup { grid-column: 1 / -1; grid-row: 1; }
.woocommerce-checkout form.checkout > .col2-set { grid-column: 1; grid-row: 2 / span 3; }
.woocommerce-checkout form.checkout > #order_review_heading { grid-column: 2; grid-row: 2; margin: 0 0 16px; }
.woocommerce-checkout form.checkout > #order_review { grid-column: 2; grid-row: 3; position: sticky; top: 24px; }

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 { float: none; width: 100%; }

.woocommerce-checkout h3 { font: 900 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1.1 var(--ws-font); letter-spacing: -.02em; margin: 24px 0 16px; }
.woocommerce form .form-row label { font-size: 15px; margin-bottom: 4px; }
.woocommerce form .form-row .required { color: var(--ws-alert); text-decoration: none; }

.woocommerce-checkout #payment {
	border-radius: var(--ws-r-md);
	background: var(--ws-surface-alt);
}
.woocommerce-checkout #payment #place_order { width: 100%; float: none; }

/* ---------- Il mio account ---------- */

.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation) {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 48px;
	padding: 32px 0 64px;
}
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content { float: none; width: 100%; }
.woocommerce-MyAccount-navigation ul { margin: 0; padding: 0; list-style: none; }
.woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 10px 0;
	border-bottom: 1px solid var(--ws-border);
	color: var(--ws-ink);
	text-decoration: none;
}
.woocommerce-MyAccount-navigation li.is-active a { font-weight: 900; }

.woocommerce-account .u-columns.col2-set { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 32px 0 64px; }
.woocommerce-account .u-columns .u-column1,
.woocommerce-account .u-columns .u-column2 { float: none; width: 100%; }
.woocommerce form.login,
.woocommerce form.register { margin: 0; border: 1px solid var(--ws-border); border-radius: var(--ws-r-md); padding: 24px; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.ws-shop { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; }
	.ws-filters-open {
		display: inline-flex;
		justify-self: start;
		min-height: 52px;
		align-items: center;
		padding: 0 24px;
		background: var(--ws-ink);
		color: var(--paper);
		font: 500 var(--s-body)/1 var(--ws-font);
		cursor: pointer;
	}
	.ws-shop__filters { display: grid; gap: 12px; }
	.ws-filters { display: none; position: static; padding: 16px; border: 1px solid var(--ws-border); border-radius: var(--ws-r-md); }
	.ws-filters-toggle:checked ~ .ws-filters { display: flex; }
	.woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.woocommerce-cart .woocommerce:has(.woocommerce-cart-form),
	.ws-details,
	.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation) { grid-template-columns: 1fr; }
	.woocommerce-checkout form.checkout { display: block; }
	.woocommerce-checkout form.checkout > #order_review { position: static; }
	.ws-advice { position: static; }
	.ws-related ul.products li.product:nth-child(4) { display: none; } /* a 3 colonne il quarto resterebbe solo */
}

@media (max-width: 767px) {
	.woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
	.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 16px; }
	.ws-hero h1.ws-hero__title { font-size: clamp(2.25rem, 10vw, 4.5rem); }
	.woocommerce ul.products li.product .price { font-size: 17px; }
	/* Scheda su telefono: breadcrumb e titolo, poi la galleria su nebbia da bordo a bordo, poi il riepilogo. */
	.woocommerce div.product { display: flex; flex-direction: column; padding-top: 16px; }
	.ws-single-head { padding-top: 0; }
	.ws-single-head .ws-breadcrumb { margin-bottom: 12px; }
	.woocommerce div.product .product_title { margin-bottom: 16px; }
	.ws-gal {
		margin: 0 calc(-1 * max(var(--m), env(safe-area-inset-right, 0px))) 0 calc(-1 * max(var(--m), env(safe-area-inset-left, 0px)));
		padding: 16px max(var(--m), env(safe-area-inset-right, 0px)) 16px max(var(--m), env(safe-area-inset-left, 0px));
		background: var(--ws-surface-alt);
	}
	.ws-gal::before { display: none; }
	.woocommerce div.product div.images .flex-control-thumbs { margin-top: 8px; }
	.woocommerce div.product div.summary { margin-top: 40px; }
	.woocommerce div.product .ws-price p.price,
	.woocommerce div.product .ws-price span.price { font-size: clamp(2rem, 9vw, 2.75rem); }
	.ws-trust { padding: 16px; }
	.ws-details { margin-top: 48px; }
	.ws-advice { padding: 20px; }
	.ws-related { margin-top: 56px; }
	.woocommerce .woocommerce-ordering { justify-content: stretch; }
	.woocommerce .woocommerce-ordering select { width: 100%; }
	.woocommerce-account .u-columns.col2-set { grid-template-columns: 1fr; }
	/* Carrello su telefono: ogni prodotto è un campo nebbia con foto, nome, quantità e subtotale.
	   Selettori pesanti: il foglio "smallscreen" di Woo esce dopo il nostro e impila le celle a destra. */
	.woocommerce-cart .woocommerce table.cart thead { display: none; }
	.woocommerce-cart .woocommerce table.cart tbody tr.cart_item { display: grid; grid-template-columns: 72px minmax(0, 1fr) 32px; gap: 4px 12px; padding: 12px; margin-bottom: 8px; background: var(--ws-surface-alt); }
	.woocommerce-cart .woocommerce table.cart tbody tr.cart_item td { display: block; padding: 0; border: 0 !important; background: transparent; width: auto; text-align: left !important; white-space: normal; }
	.woocommerce-cart .woocommerce table.cart tbody tr.cart_item td::before { display: none; }
	.woocommerce-cart .woocommerce table.cart tbody tr.cart_item td.product-thumbnail { display: block !important; grid-column: 1; grid-row: 1 / span 3; }
	.woocommerce-cart .woocommerce table.cart tbody tr.cart_item td.product-remove { grid-column: 3; grid-row: 1; text-align: right !important; }
	.woocommerce-cart .woocommerce table.cart tbody tr.cart_item td.product-name { grid-column: 2; grid-row: 1; padding-right: 8px; }
	.woocommerce-cart .woocommerce table.cart tbody tr.cart_item td.product-price { display: none !important; }
	.woocommerce-cart .woocommerce table.cart tbody tr.cart_item td.product-quantity { grid-column: 2; grid-row: 2; margin-top: 8px; }
	.woocommerce-cart .woocommerce table.cart tbody tr.cart_item td.product-subtotal { grid-column: 2 / -1; grid-row: 3; margin-top: 8px; text-align: left; }
	.woocommerce-cart .woocommerce table.cart tbody tr.cart_item td.product-subtotal::before { content: "Subtotale "; display: inline; float: none; font-weight: 400; }
	.woocommerce-cart .woocommerce table.cart td.actions { display: block; padding-top: 12px; }
	.woocommerce-cart .woocommerce table.cart td.actions .coupon { display: flex; flex-direction: column; float: none; }
	.woocommerce-cart .woocommerce table.cart td.actions .coupon .input-text { width: 100% !important; flex-basis: auto; box-sizing: border-box; }
	.woocommerce-cart .woocommerce table.cart td.actions .coupon .button,
	.woocommerce-cart .woocommerce table.cart td.actions > .button { display: flex; width: 100% !important; margin-top: 8px; float: none !important; }
	.woocommerce-cart .woocommerce .cart-collaterals .cart_totals { padding: 20px 16px; }
	.woocommerce-cart .woocommerce .cart_totals table.shop_table th,
	.woocommerce-cart .woocommerce .cart_totals table.shop_table td { display: table-cell; }
	.woocommerce-cart .woocommerce .cart_totals table.shop_table tr { display: table-row; }
	.woocommerce-cart .woocommerce .cart_totals table.shop_table td::before { display: none; }
}

/* ---------- Entrata: le card salgono in sequenza (il titolo no, è l'LCP) ---------- */

@keyframes ws-up { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: no-preference) {
	.ws-hero__intro,
	.ws-chips,
	.woocommerce ul.products li.product { animation: ws-up .6s var(--ease) both; }
	.ws-hero__intro { animation-delay: .05s; }
	.ws-chips { animation-delay: .1s; }
	.woocommerce ul.products li.product:nth-child(4n+2) { animation-delay: .06s; }
	.woocommerce ul.products li.product:nth-child(4n+3) { animation-delay: .12s; }
	.woocommerce ul.products li.product:nth-child(4n+4) { animation-delay: .18s; }
}

/* Lente della galleria: Woo la scrive come emoji, qui diventa un'icona disegnata. */
.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
	width: 44px;
	height: 44px;
	border-radius: 0;
	background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23131313' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") center / 22px no-repeat;
	font-size: 0;
}
.woocommerce div.product div.images .woocommerce-product-gallery__trigger::before,
.woocommerce div.product div.images .woocommerce-product-gallery__trigger::after { display: none; }
.woocommerce div.product div.images .woocommerce-product-gallery__trigger span[aria-hidden] { display: none; }
