/* SudGrafica — shop: archivio, scheda prodotto, carrello e cassa a blocchi, conferma ordine.
   Design system v2: foto su fondo carta con raggio card, hairline per le liste, ombra-1 su ciò che si solleva. */

/* ---------- Archivio ---------- */
.sg-prodotti .wc-block-product-template {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40) 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.sg-prodotti .wc-block-product-template > li,
.sg-prodotti .wc-block-product {
	margin: 0;
	padding: 0;
	width: auto;
	max-width: none;
}

.sg-prodotto-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}

/* Foto su fondo carta riciclata, raggio card, prodotto "appoggiato" con margine: come la galleria della scheda */
.sg-prodotto-card__media,
.sg-prodotto-card .wc-block-components-product-image {
	margin: 0;
	aspect-ratio: 1;
	overflow: clip;
	border-radius: var(--sg-radius-card);
	background: var(--wp--preset--color--paper-2);
	transition: transform var(--sg-t2) var(--sg-ease), box-shadow var(--sg-t2) var(--sg-ease);
}

.sg-prodotto-card__media a,
.sg-prodotto-card__media img {
	display: block;
	width: 100%;
	height: 100%;
}

.sg-prodotto-card__media img {
	object-fit: contain;
	padding: 8%;
}

@media (hover: hover) {
	.sg-prodotto-card:hover .sg-prodotto-card__media {
		transform: translateY(-4px);
		box-shadow: var(--sg-shadow-1);
	}
}

.sg-prodotto-card:focus-within .sg-prodotto-card__media {
	box-shadow: var(--sg-shadow-1);
}

.sg-prodotto-card__body {
	padding-block-start: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	flex: 1;
}

.sg-prodotto-card__body > * {
	margin: 0;
}

.sg-prodotto-card__title {
	font-size: var(--wp--preset--font-size--m);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.sg-prodotto-card__title a {
	text-decoration: none;
}

.sg-prodotto-card:hover .sg-prodotto-card__title a,
.sg-prodotto-card__title a:focus-visible {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--wp--preset--color--brand);
	text-underline-offset: 0.12em;
}

.sg-prodotto-card__price,
.sg-prodotto-card__price .wc-block-components-product-price {
	font-size: var(--wp--preset--font-size--ml);
	font-weight: 500;
	line-height: 1.1;
}

.sg-prodotto-card__price .wc-block-formatted-money-amount {
	font-size: inherit;
}

.sg-prodotto-card__excerpt {
	font-size: var(--wp--preset--font-size--s);
	color: var(--wp--preset--color--ink-2);
	max-inline-size: 40ch;
}

.sg-prodotto-card__excerpt .wp-block-post-excerpt__more-text {
	display: none;
}

.sg-prodotto-card__button {
	margin-block-start: auto;
	padding-block-start: 0.75rem;
}

.sg-prodotti .wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	background: transparent;
	border-style: solid;
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: var(--sg-radius-control);
	font-size: var(--wp--preset--font-size--s);
	font-weight: 600;
	padding: 0.7rem 1.2rem;
	min-height: 44px;
	text-decoration: none;
	transition: background-color var(--sg-t1) var(--sg-ease), color var(--sg-t1) var(--sg-ease);
}

.sg-prodotti .wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button:hover,
.sg-prodotti .wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button:focus-visible {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

.sg-filtri__item--vuota {
	color: var(--wp--preset--color--ink-2);
}

/* ---------- Scheda prodotto ---------- */
.sg-prodotto {
	padding-block: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
}

.sg-prodotto__top {
	margin-block-end: var(--wp--preset--spacing--30);
}

.sg-briciole,
.wc-block-breadcrumbs {
	font-size: var(--wp--preset--font-size--s);
	color: var(--wp--preset--color--ink-2);
	margin: 0;
}

.wc-block-breadcrumbs a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.wc-block-breadcrumbs a:hover {
	text-decoration: underline;
}

.sg-prodotto__grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: 1.5rem;
	row-gap: var(--wp--preset--spacing--30);
	align-items: start;
}

.sg-prodotto__grid > *,
.sg-prodotto__summary > * {
	margin-block-start: 0;
}

/* ---- Galleria: immagine grande su fondo carta riciclata, miniature come tile ---- */

.sg-prodotto__gallery {
	grid-column: 1 / span 7;
	position: sticky;
	inset-block-start: calc(var(--sg-header-height) + 1rem);
}

.sg-prodotto__summary {
	grid-column: 8 / span 5;
	padding-inline-start: 1.5rem;
}

.sg-prodotto__summary > * + * {
	margin-block-start: 1.25rem;
}

.sg-prodotto__title {
	font-size: var(--wp--preset--font-size--l);
	line-height: 1.12;
	letter-spacing: -0.015em;
	max-inline-size: 22ch;
}

.sg-prodotto__excerpt {
	max-inline-size: 46ch;
	font-size: var(--wp--preset--font-size--s);
	color: var(--wp--preset--color--ink-2);
}

.sg-prodotto__title + .sg-prodotto__excerpt {
	margin-block-start: 0.5rem;
}

.sg-prodotto__excerpt p {
	margin: 0;
}

/* ---- Prezzo ---- */

.sg-prodotto__prezzo {
	padding-block: 1.25rem;
	border-block: 1px solid var(--sg-hairline);
}

.sg-prodotto__price,
.sg-prodotto__price .woocommerce-Price-amount {
	margin: 0;
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.02em;
}

.sg-prodotto__price del,
.sg-prodotto__price del .woocommerce-Price-amount {
	font-size: 0.55em;
	color: var(--wp--preset--color--ink-2);
	text-decoration: line-through;
	margin-inline-end: 0.5em;
}

.sg-prodotto__price-nota {
	margin: 0.5rem 0 0;
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--brand-ink);
	font-weight: 500;
}

/* Feedback di stato: il prezzo è cambiato per la scelta appena fatta. */
@media (prefers-reduced-motion: no-preference) {
	.sg-prodotto__price.is-updated {
		animation: sg-price-update var(--sg-t3) var(--sg-ease);
	}

	@keyframes sg-price-update {
		from {
			opacity: 0.35;
			transform: translateY(6px);
		}
	}
}

.sg-prodotto__tempi {
	margin: 0.5rem 0 0;
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--ink-2);
}

.sg-prodotto__tempi + .sg-prodotto__tempi {
	margin-block-start: 0.15rem;
}

/* ---- Pannello informativo: quattro voci con icona, bordo hairline, raggio card ---- */

.sg-prodotto__info {
	border: 1px solid var(--sg-hairline);
	border-radius: var(--sg-radius-card);
	padding: 0.25rem var(--sg-inset-m);
}

.sg-info {
	display: grid;
	grid-template-columns: 2.5rem minmax(0, 1fr);
	column-gap: 0.75rem;
	padding-block: 1rem;
}

.sg-info + .sg-info {
	border-block-start: 1px solid var(--sg-hairline-2);
}

.sg-info__icon {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: var(--wp--preset--color--brand-tint);
	color: var(--wp--preset--color--brand-ink);
}

.sg-info__body {
	align-self: center;
	font-size: var(--wp--preset--font-size--s);
}

.sg-info__title {
	display: block;
	font-weight: 600;
}

.sg-info__text {
	display: block;
	margin-block-start: 0.15rem;
	color: var(--wp--preset--color--ink-2);
}

.sg-info__list {
	margin: 0.25rem 0 0;
	padding: 0;
	list-style: none;
	color: var(--wp--preset--color--ink-2);
}

.sg-info__list li::before {
	content: "·";
	margin-inline-end: 0.4rem;
	color: var(--wp--preset--color--brand-ink);
	font-weight: 700;
}

/* ---- Galleria classica (zoom, lightbox, slider) ---- */

.woocommerce-product-gallery {
	position: relative;
	margin: 0;
}

.woocommerce-product-gallery__wrapper {
	margin: 0;
}

/* Flexslider avvolge le slide in .flex-viewport (overflow hidden, altezza via JS): il raggio va lì */
.woocommerce-product-gallery .flex-viewport,
.woocommerce-product-gallery__image {
	border-radius: var(--sg-radius-card);
	background: var(--wp--preset--color--paper-2);
}

.woocommerce-product-gallery .flex-viewport {
	overflow: hidden;
}

.woocommerce-product-gallery__image img,
.woocommerce-product-gallery img {
	width: 100%;
	height: auto;
	display: block;
}

.woocommerce-product-gallery__image > a > img {
	aspect-ratio: 1 / 1;
	object-fit: contain;
	padding: 6%;
}

.woocommerce-product-gallery__trigger {
	position: absolute;
	inset-block-start: 1rem;
	inset-inline-end: 1rem;
	z-index: 9;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	background: var(--wp--preset--color--paper);
	border: 1px solid var(--sg-hairline);
	border-radius: 50%;
	box-shadow: var(--sg-shadow-1);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	font-size: 0;
	transition: transform var(--sg-t2) var(--sg-ease);
}

.woocommerce-product-gallery__trigger:hover {
	transform: scale(1.06);
}

/* Icona lente: SVG in maschera, colore ereditato (il "🔍" di Woo è a font-size 0) */
.woocommerce-product-gallery__trigger::before {
	content: "";
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
}

.flex-control-thumbs li {
	margin: 0;
	border-radius: var(--sg-radius-card);
	background: var(--wp--preset--color--paper-2);
	overflow: clip;
	border: 1.5px solid transparent;
	transition: border-color var(--sg-t1) var(--sg-ease);
}

.flex-control-thumbs li:has(img.flex-active) {
	border-color: var(--wp--preset--color--ink);
}

.flex-control-thumbs img {
	aspect-ratio: 1 / 1;
	object-fit: contain;
	padding: 10%;
	cursor: pointer;
	opacity: 0.75;
	transition: opacity var(--sg-t1) var(--sg-ease);
}

.flex-control-thumbs img.flex-active,
.flex-control-thumbs img:hover {
	opacity: 1;
}

/* ---- Add to cart: varianti come chip, quantità con più/meno, due bottoni ---- */

.sg-prodotto__form form.cart {
	margin: 0;
}

.sg-prodotto__form .variations {
	width: 100%;
	border-collapse: collapse;
	margin-block-end: 1.25rem;
}

.sg-prodotto__form .variations th,
.sg-prodotto__form .variations td {
	display: block;
	padding: 0;
	text-align: left;
	vertical-align: middle;
}

.sg-prodotto__form .variations tr {
	display: block;
	margin-block-end: 1rem;
}

.sg-prodotto__form .variations th label {
	display: block;
	font-size: var(--wp--preset--font-size--s);
	font-weight: 600;
	margin-block-end: 0.6rem;
}

.sg-prodotto__form .variations select {
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, var(--wp--preset--color--ink) 50%), linear-gradient(135deg, var(--wp--preset--color--ink) 50%, transparent 50%);
	background-position: calc(100% - 1.1rem) 50%, calc(100% - 0.75rem) 50%;
	background-size: 0.35rem 0.35rem;
	background-repeat: no-repeat;
	padding-inline-end: 2.5rem;
}

.sg-prodotto__form .variations select[hidden] {
	display: none;
}

.sg-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.sg-chip {
	position: relative;
	display: inline-flex;
	align-items: baseline;
	gap: 0.3rem;
	min-height: 44px;
	padding: 0.55rem 1rem;
	border: 1px solid var(--sg-hairline);
	border-radius: var(--sg-radius-control);
	background: var(--wp--preset--color--paper);
	font-size: var(--wp--preset--font-size--s);
	font-weight: 500;
	cursor: pointer;
	transition: border-color var(--sg-t1) var(--sg-ease), background-color var(--sg-t1) var(--sg-ease), transform var(--sg-t2) var(--sg-ease-spring);
}

.sg-chip input {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.sg-chip__label {
	font-stretch: var(--sg-width-data);
	font-variant-numeric: tabular-nums;
	font-size: var(--wp--preset--font-size--m);
}

.sg-chip__unit {
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--ink-2);
}

.sg-chip:hover {
	border-color: var(--wp--preset--color--ink);
}

.sg-chip.is-selected {
	border-color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	transform: scale(1.03);
}

.sg-chip.is-selected .sg-chip__unit {
	color: rgb(255 255 255 / 0.7);
}

.sg-chip.is-disabled {
	opacity: 0.35;
	cursor: not-allowed;
	text-decoration: line-through;
}

.sg-chip:has(input:focus-visible) {
	outline: 2px solid var(--sg-focus);
	outline-offset: 2px;
}

.sg-prodotto__form .reset_variations {
	display: inline-block;
	margin-block-start: 0.5rem;
	font-size: var(--wp--preset--font-size--xs);
}

.sg-prodotto__form .woocommerce-variation:has(.price, .stock) {
	padding-block: 0.75rem 1rem;
}

.sg-prodotto__form .woocommerce-variation-price .price,
.sg-prodotto__form .woocommerce-variation-price .woocommerce-Price-amount {
	font-size: var(--wp--preset--font-size--l);
	font-weight: 500;
	font-stretch: var(--sg-width-data);
}

.sg-variante-totale {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem;
}

.sg-variante-totale__q {
	font-size: var(--wp--preset--font-size--l);
	font-weight: 500;
	font-stretch: var(--sg-width-data);
	font-variant-numeric: tabular-nums;
}

.sg-variante-totale__sep {
	color: var(--wp--preset--color--ink-2);
}

.sg-prodotto__form .woocommerce-variation-availability .stock {
	margin: 0.25rem 0 0;
	font-size: var(--wp--preset--font-size--s);
	color: var(--wp--preset--color--ink-2);
}

.sg-prodotto__form .woocommerce-variation-add-to-cart,
.sg-prodotto__form form.cart:not(.variations_form) {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.75rem;
	align-items: stretch;
}

/* Quantità fissa a 1 (input hidden): il bottone prende tutta la riga */
.sg-prodotto__form .woocommerce-variation-add-to-cart:has(> .quantity > input[type="hidden"]),
.sg-prodotto__form form.cart:not(.variations_form):has(> .quantity > input[type="hidden"]) {
	grid-template-columns: minmax(0, 1fr);
}

.sg-prodotto__form .woocommerce-variation-add-to-cart:has(> .quantity > input[type="hidden"]) .single_add_to_cart_button,
.sg-prodotto__form form.cart:not(.variations_form):has(> .quantity > input[type="hidden"]) .single_add_to_cart_button {
	grid-column: 1 / -1;
}

/* Add-on (fieldset radio) occupa tutta la riga sopra i bottoni */
.sg-prodotto__form form.cart:not(.variations_form) .sg-addons {
	grid-column: 1 / -1;
}

/* Quantità: più / campo / meno in un unico controllo */
.sg-prodotto__form .quantity {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--sg-hairline);
	border-radius: var(--sg-radius-control);
	overflow: clip;
}

.sg-prodotto__form .quantity:has(> input[type="hidden"]) {
	display: none;
}

.sg-prodotto__form .quantity input.qty {
	width: 3.5rem;
	min-height: 46px;
	text-align: center;
	padding-inline: 0.25rem;
	border: 0;
	border-radius: 0;
	appearance: textfield;
	-moz-appearance: textfield;
	font-stretch: var(--sg-width-data);
	font-variant-numeric: tabular-nums;
}

.sg-prodotto__form .quantity .qty::-webkit-outer-spin-button,
.sg-prodotto__form .quantity .qty::-webkit-inner-spin-button {
	appearance: none;
	margin: 0;
}

.sg-prodotto__form .quantity .qty:focus-visible {
	outline-offset: -2px;
}

.sg-qty__btn {
	width: 44px;
	border: 0;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--ml);
	line-height: 1;
	cursor: pointer;
	transition: background-color var(--sg-t1) var(--sg-ease);
}

.sg-qty__btn:hover {
	background: var(--wp--preset--color--paper-2);
}

.sg-qty__btn:focus-visible {
	outline-offset: -2px;
}

.sg-prodotto__form .quantity .screen-reader-text {
	position: absolute;
}

.sg-prodotto__form .single_add_to_cart_button,
.sg-prodotto__quote-btn {
	width: 100%;
	justify-self: stretch;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.85rem 1.4rem;
	border: 1px solid var(--wp--preset--color--action);
	border-radius: var(--sg-radius-control);
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--s);
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--sg-t1) var(--sg-ease), color var(--sg-t1) var(--sg-ease), border-color var(--sg-t1) var(--sg-ease), transform var(--sg-t2) var(--sg-ease), box-shadow var(--sg-t2) var(--sg-ease);
}

.sg-prodotto__form .single_add_to_cart_button:hover,
.sg-prodotto__form .single_add_to_cart_button:focus-visible {
	background: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

.sg-prodotto__form .single_add_to_cart_button.disabled,
.sg-prodotto__form .single_add_to_cart_button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.sg-prodotto__quote-btn {
	background: transparent;
	border-color: var(--wp--preset--color--ink);
}

/* Uscita verso il preventivo quando le opzioni dello shop non bastano */
.sg-prodotto__su-misura {
	display: grid;
	gap: 0.75rem;
	margin-block-start: 0.75rem;
	padding: var(--sg-inset-m, 1.25rem);
	border-radius: var(--sg-radius-card);
	background: var(--wp--preset--color--paper-2);
}

.sg-prodotto__su-misura p {
	margin: 0;
	font-size: var(--wp--preset--font-size--s);
	line-height: 1.45;
}

.sg-prodotto__su-misura strong {
	display: block;
	margin-block-end: 0.15rem;
	font-weight: 600;
}

.sg-prodotto__su-misura .sg-prodotto__su-misura-tel {
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--ink-2);
}

.sg-prodotto__su-misura-tel a {
	color: var(--wp--preset--color--ink);
}

.sg-prodotto__quote-btn:hover,
.sg-prodotto__quote-btn:focus-visible {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

.sg-prodotto__form .woocommerce-variation-add-to-cart-disabled {
	opacity: 0.6;
}

.sg-prodotto__meta {
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--ink-2);
}

.sg-prodotto__meta .wp-block-group {
	gap: 0.25rem 1.5rem;
}

.sg-prodotto__meta a {
	color: var(--wp--preset--color--ink-2);
	text-decoration: none;
}

.sg-prodotto__meta a:hover {
	text-decoration: underline;
}

.sg-prodotto__desc {
	margin-block-start: var(--wp--preset--spacing--50);
	padding-block-start: var(--wp--preset--spacing--30);
	border-block-start: 1px solid var(--sg-hairline);
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: 1.5rem;
}

.sg-prodotto__desc > * {
	margin-block-start: 0;
}

.sg-prodotto__h2 {
	grid-column: 1 / span 3;
	font-size: var(--wp--preset--font-size--l);
}

.sg-prodotto__desc .wp-block-post-content {
	grid-column: 5 / span 7;
}

.sg-prodotto__quote {
	margin-block-start: var(--wp--preset--spacing--50);
	padding: var(--wp--preset--spacing--40) 0;
	border-block: 1px solid var(--sg-hairline);
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: 1.5rem;
}

.sg-prodotto__quote > * {
	margin-block-start: 0;
}

.sg-prodotto__quote-title {
	grid-column: 1 / span 6;
	font-size: var(--wp--preset--font-size--l);
	margin: 0;
	max-inline-size: 24ch;
}

.sg-prodotto__quote-text {
	grid-column: 8 / span 5;
	margin: 0;
}

.sg-correlati--shop {
	margin-block-start: var(--wp--preset--spacing--50);
	border: 0;
	padding: 0;
}

.sg-correlati--shop:not(:has(.wc-block-product)) {
	display: none;
}

/* ---------- Carrello e cassa (blocchi) ---------- */
.sg-carrello,
.sg-cassa {
	padding-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
}

.wc-block-components-button,
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	border-radius: var(--sg-radius-control);
	font-weight: 600;
	min-height: 44px;
	box-shadow: none;
}

.wc-block-components-button:not(.is-secondary):not(.is-link),
.wc-block-cart__submit-button {
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--action);
}

.wc-block-components-button:not(.is-secondary):not(.is-link):hover,
.wc-block-cart__submit-button:hover {
	background: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-block-components-country-input .components-combobox-control__input,
.wc-block-components-combobox .components-combobox-control__input,
.wc-block-components-select .components-custom-select-control__button,
.wc-block-components-quantity-selector {
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: var(--sg-radius-control);
	box-shadow: none;
}

.wc-block-components-quantity-selector::after {
	display: none;
}

.wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img,
.wc-block-components-product-image img {
	border-radius: 0;
}

.wc-block-components-sidebar-layout .wc-block-components-sidebar,
.wc-block-components-panel,
.wc-block-components-totals-wrapper,
.wc-block-components-order-summary,
.wc-block-cart__sidebar,
.wc-block-checkout__sidebar {
	box-shadow: none;
	border-radius: 0;
}

.wc-block-components-checkout-step,
.wc-block-components-checkout-step__container,
.wc-block-components-radio-control__option,
.wc-block-components-radio-control-accordion-option {
	border-radius: 0;
}

.wc-block-components-radio-control .wc-block-components-radio-control__option {
	border-color: var(--sg-hairline);
}

.wc-block-components-notice-banner {
	border-radius: 0;
	box-shadow: none;
	border-color: var(--wp--preset--color--ink);
}

.wc-block-store-notice,
.wc-block-components-notice-banner {
	border-radius: 0;
}

/* Woo sposta il fuoco sull'avviso (per i lettori di schermo) dopo "Aggiungi al carrello": niente riquadro nero di focus intorno */
.wc-block-components-notice-banner:focus,
.woocommerce-notices-wrapper [tabindex="-1"]:focus {
	outline: none;
}

/* Cassa, contatti: la password subito sotto l'email, i dati per la fattura solo se si spunta "Ho bisogno della fattura" */
#contact.wc-block-components-address-form { display: flex; flex-direction: column; }
#contact.wc-block-components-address-form > * { order: 3; }
#contact .wc-block-components-address-form__email { order: 0; }
#contact .wc-block-components-address-form__password { order: 1; }
#contact .wc-block-components-address-form__sudgrafica-fattura { order: 2; margin-block-start: 1rem; }
#contact:has(#contact-sudgrafica-fattura:not(:checked)) :is(
	.wc-block-components-address-form__sudgrafica-ragione-sociale,
	.wc-block-components-address-form__sudgrafica-piva,
	.wc-block-components-address-form__sudgrafica-cf,
	.wc-block-components-address-form__sudgrafica-sdi,
	.wc-block-components-address-form__sudgrafica-pec
) {
	display: none;
}

.wc-block-cart .wc-block-components-product-name,
.wc-block-components-order-summary-item__description .wc-block-components-product-name {
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.wc-block-components-checkout-return-to-cart-button {
	text-decoration: underline;
}

/* ---------- Conferma ordine ---------- */
.sg-conferma {
	padding-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
}

.sg-conferma__head > * {
	margin-block-start: 0;
}

.sg-conferma__status {
	margin-block-end: 1.25rem;
}

.sg-conferma__status h1 {
	font-size: var(--wp--preset--font-size--xl);
	margin: 0 0 0.5rem;
}

.sg-conferma__status p {
	margin: 0;
	font-size: var(--wp--preset--font-size--ml);
	max-inline-size: 48ch;
}

.wc-block-order-confirmation-totals-wrapper table,
.wc-block-order-confirmation-totals table {
	border: 0;
}

.wc-block-order-confirmation-totals th,
.wc-block-order-confirmation-totals td {
	border-inline: 0;
	border-block-start: 0;
}

.wc-block-order-confirmation-shipping-address,
.wc-block-order-confirmation-billing-address,
.wc-block-order-confirmation-shipping-address address,
.wc-block-order-confirmation-billing-address address,
.wc-block-order-confirmation-additional-fields {
	border: 0;
	padding: 0;
	margin: 0;
	font-size: var(--wp--preset--font-size--s);
	line-height: 1.5;
}

.wc-block-order-confirmation-additional-information,
.wc-block-order-confirmation-shipping-wrapper,
.wc-block-order-confirmation-billing-wrapper {
	margin: 0;
}

.sg-conferma__summary .wc-block-order-confirmation-summary-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	gap: 0;
	border-block: 1px solid var(--sg-hairline);
	padding: 0;
	margin: 0;
}

.sg-conferma__summary .wc-block-order-confirmation-summary-list-item {
	padding: 0.9rem 1.25rem 0.9rem 0;
	border-inline-start: 1px solid var(--sg-hairline);
	padding-inline-start: 1.25rem;
	margin: 0;
}

.sg-conferma__summary .wc-block-order-confirmation-summary-list-item:first-child {
	border-inline-start: 0;
	padding-inline-start: 0;
}

.sg-conferma__summary .wc-block-order-confirmation-summary-list-item__key {
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--ink-2);
	display: block;
}

.sg-conferma__summary .wc-block-order-confirmation-summary-list-item__value {
	font-weight: 600;
}

.sg-conferma__grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: 1.5rem;
	row-gap: var(--wp--preset--spacing--40);
	margin-block-start: var(--wp--preset--spacing--40);
}

.sg-conferma__grid > * {
	margin-block-start: 0;
}

.sg-conferma__totals {
	grid-column: 1 / span 7;
}

.sg-conferma__side {
	grid-column: 9 / span 4;
}

.sg-conferma__side > * + * {
	margin-block-start: var(--wp--preset--spacing--30);
}

.sg-conferma__h2 {
	font-size: var(--wp--preset--font-size--s);
	font-weight: 600;
	letter-spacing: 0;
	padding-block-end: 0.5rem;
	border-block-end: 1px solid var(--sg-hairline);
	margin-block-end: 0.75rem;
}

.wc-block-order-confirmation-totals table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--s);
}

.wc-block-order-confirmation-totals th,
.wc-block-order-confirmation-totals td {
	padding: 0.75rem 0;
	border-block-end: 1px solid var(--sg-hairline);
	text-align: left;
	vertical-align: top;
}

.wc-block-order-confirmation-totals th:last-child,
.wc-block-order-confirmation-totals td:last-child {
	text-align: right;
	font-stretch: var(--sg-width-data);
	font-variant-numeric: tabular-nums;
}

.wc-block-order-confirmation-totals tfoot th {
	font-weight: 400;
	color: var(--wp--preset--color--ink-2);
}

.wc-block-order-confirmation-totals tfoot tr:last-child th,
.wc-block-order-confirmation-totals tfoot tr:last-child td {
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--m);
}

.wc-block-order-confirmation-totals img {
	border-radius: 0;
}

.wc-block-order-confirmation-shipping-address address,
.wc-block-order-confirmation-billing-address address {
	font-style: normal;
	font-size: var(--wp--preset--font-size--s);
	line-height: 1.5;
}

/* Altre informazioni (fattura, note), in conferma ordine e nel dettaglio ordine dell'account: etichetta sopra, valore sotto,
   a ogni larghezza (Woo su mobile li metteva in riga, nell'account restavano senza stile) */
.woocommerce-account .wc-block-order-confirmation-additional-fields-wrapper {
	margin-block-start: var(--wp--preset--spacing--40);
}

.woocommerce-account .wc-block-order-confirmation-additional-fields-wrapper h2 {
	margin-block-end: 0.75rem;
}

.wp-site-blocks .wc-block-components-additional-fields-list.wc-block-components-additional-fields-list {
	display: block;
	margin: 0;
	padding: 0;
	border: 1px solid var(--sg-hairline);
	border-radius: 0;
}

.wp-site-blocks .wc-block-components-additional-fields-list.wc-block-components-additional-fields-list dt,
.wp-site-blocks .wc-block-components-additional-fields-list.wc-block-components-additional-fields-list dd {
	display: block;
	margin: 0;
	border: 0;
	text-align: left;
}

.wp-site-blocks .wc-block-components-additional-fields-list.wc-block-components-additional-fields-list dt {
	padding: 0.75rem 1rem 0;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 400;
	color: var(--wp--preset--color--ink-2);
}

.wp-site-blocks .wc-block-components-additional-fields-list.wc-block-components-additional-fields-list dd {
	padding: 0.15rem 1rem 0.75rem;
	font-weight: 600;
	border-block-end: 1px solid var(--sg-hairline);
}

.wp-site-blocks .wc-block-components-additional-fields-list.wc-block-components-additional-fields-list dd:last-of-type {
	border-block-end: 0;
}

.wp-site-blocks .wc-block-components-additional-fields-list.wc-block-components-additional-fields-list :is(dt, dd)::before,
.wp-site-blocks .wc-block-components-additional-fields-list.wc-block-components-additional-fields-list :is(dt, dd)::after {
	content: none;
	display: none;
}

/* Riepilogo in testa: la colonna dell'email più larga, così l'indirizzo non si spezza a metà */
@media (min-width: 1024px) {
	.sg-conferma__summary .wc-block-order-confirmation-summary-list {
		grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2fr) minmax(0, 1fr);
	}
}

.sg-conferma__summary .wc-block-order-confirmation-summary-list-item__value {
	overflow-wrap: anywhere;
}

/* Carica file: il bottone del campo file con lo stile del tema invece di quello del sistema */
.sg-upload input[type="file"]::file-selector-button {
	margin-inline-end: 0.75rem;
	padding: 0.45rem 0.9rem;
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: var(--sg-radius-control);
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.sg-upload input[type="file"]::file-selector-button:hover {
	background: var(--wp--preset--color--paper-2);
}

/* ---------- Responsive ---------- */
@media (max-width: 1023.98px) {
	.sg-prodotti .wc-block-product-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sg-prodotto__gallery,
	.sg-prodotto__summary,
	.sg-prodotto__h2,
	.sg-prodotto__desc .wp-block-post-content,
	.sg-prodotto__quote-title,
	.sg-prodotto__quote-text,
	.sg-conferma__totals,
	.sg-conferma__side {
		grid-column: 1 / -1;
	}

	.sg-prodotto__quote-text {
		margin-block-start: 1rem;
	}

	.sg-prodotto__summary {
		padding-inline-start: 0;
	}

	.sg-prodotto__gallery {
		position: static;
	}
}

@media (max-width: 599.98px) {
	.sg-prodotti .wc-block-product-template {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--wp--preset--spacing--30);
	}

	.sg-prodotto__title {
		max-inline-size: none;
	}

	.flex-control-thumbs {
		gap: 0.5rem;
	}

	.sg-conferma__summary .wc-block-order-confirmation-summary-list {
		grid-template-columns: minmax(0, 1fr);
	}

	.sg-conferma__summary .wc-block-order-confirmation-summary-list-item {
		border-inline-start: 0;
		padding-inline-start: 0;
		border-block-end: 1px solid var(--sg-hairline);
	}
}

/* Intestazioni delle tabelle Woo: niente maiuscolo spaziato */
.wc-block-cart-items__header,
.wc-block-cart-items__header-product,
.wc-block-cart-items__header-total,
.wc-block-components-totals-item__label,
.wc-block-components-order-summary__button-text,
.wc-block-components-checkout-step__title,
.wc-block-components-sidebar .wc-block-components-title {
	text-transform: none;
	letter-spacing: 0;
}

.wc-block-cart-items__header th {
	font-size: var(--wp--preset--font-size--s);
	font-weight: 600;
	padding-inline-start: 0;
}

/* "Prodotto", "Totale" e "Totale carrello" con lo stesso registro (Woo mette il maiuscolo sugli span interni) */
.wc-block-cart-items__header th,
.wc-block-cart-items__header span,
.wc-block-cart .wc-block-cart__totals-title {
	text-transform: none;
	letter-spacing: 0;
	font-size: var(--wp--preset--font-size--s);
	font-weight: 600;
}

.wc-block-cart .wc-block-cart-items {
	margin: 0;
}

.wp-block-woocommerce-cart.alignwide,
.wp-block-woocommerce-checkout.alignwide {
	margin-inline: 0;
}

/* Add-on personalizzazione */
.sg-addons {
	margin: 0 0 1.25rem;
	padding: 0;
	border: 0;
	min-width: 0;
}

.sg-addons__legend {
	font-size: var(--wp--preset--font-size--s);
	font-weight: 600;
	margin-block-end: 0.5rem;
	padding: 0;
}

.sg-addons__option {
	display: grid;
	grid-template-columns: 1.25rem minmax(0, 1fr) auto;
	align-items: center;
	column-gap: 0.75rem;
	min-height: 44px;
	padding: 0.35rem 0;
	border-block-end: 1px solid var(--sg-hairline);
	font-weight: 400;
	margin: 0;
	cursor: pointer;
}

.sg-addons__option:first-of-type {
	border-block-start: 1px solid var(--sg-hairline);
}

.sg-addons__option input {
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	accent-color: var(--wp--preset--color--ink);
}

.sg-addons__option:has(input:checked) .sg-addons__label {
	font-weight: 600;
}

.sg-addons__price {
	font-size: var(--wp--preset--font-size--s);
	color: var(--wp--preset--color--ink-2);
	white-space: nowrap;
}

.sg-addons__note {
	margin: 0.75rem 0 0;
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--ink-2);
}

/* Upload file post-ordine */
.sg-upload {
	margin-block: var(--wp--preset--spacing--30) 0;
	padding: var(--wp--preset--spacing--30);
	border: 1px solid var(--wp--preset--color--ink);
	border-inline-start-width: 4px;
	border-inline-start-color: var(--wp--preset--color--brand);
}

.sg-upload__title {
	font-size: var(--wp--preset--font-size--l);
	margin: 0 0 0.5rem;
}

.sg-upload__lead {
	max-inline-size: 60ch;
	margin: 0 0 1.25rem;
}

.sg-upload__list {
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0;
	border-block-start: 1px solid var(--sg-hairline);
	font-size: var(--wp--preset--font-size--s);
}

.sg-upload__list li {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	padding-block: 0.5rem;
	border-block-end: 1px solid var(--sg-hairline);
}

.sg-upload__meta {
	color: var(--wp--preset--color--ink-2);
}

.sg-upload__form .sg-form__actions {
	margin-block-start: 1rem;
}

/* Cassa: i campi con errore hanno anche il bordo rosso, non solo l'etichetta */
.wc-block-components-text-input.has-error input,
.wc-block-components-select-input.has-error select,
.wc-block-components-combobox.has-error input {
	border-color: var(--wc-red, #cc1818);
}

/* Dettaglio ordine nell'account: stessi angoli delle schede indirizzo accanto */
.woocommerce-account .wp-site-blocks .wc-block-components-additional-fields-list.wc-block-components-additional-fields-list {
	border-radius: var(--sg-radius-card);
	overflow: hidden;
}
