/* ---------------------------------------------------------------
   Vesta — integrazioni a theme.json.
   Solo ciò che i blocchi non coprono: barra di servizio, schede
   prodotto, tabella specifiche, stati WooCommerce.
   --------------------------------------------------------------- */

/* Barra di servizio sopra la testata */
.vesta-topbar {
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: .01em;
}

/* Testata appiccicata in alto: utile nelle registrazioni schermo */
.vesta-header {
	position: sticky;
	top: 0;
	z-index: 40;
	border-bottom: 1px solid var(--wp--preset--color--border);
	background: var(--wp--preset--color--base);
}
.admin-bar .vesta-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .vesta-header { top: 46px; } }

/* Occhiello sopra i titoli */
.vesta-eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .12em;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--primary);
}

/* Riquadri categoria e schede generiche */
.vesta-card {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	background: var(--wp--preset--color--base);
	transition: box-shadow .18s ease, border-color .18s ease;
}
.vesta-card:hover {
	border-color: color-mix(in srgb, var(--wp--preset--color--primary) 40%, var(--wp--preset--color--border));
	box-shadow: var(--wp--preset--shadow--card);
}

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

/* Griglia prodotti: schede squadrate, da catalogo tecnico */
.wc-block-grid__product,
.woocommerce ul.products li.product,
.wp-block-post-template li.product {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	padding: var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--base);
	transition: box-shadow .18s ease, border-color .18s ease;
}
.wc-block-grid__product:hover,
.woocommerce ul.products li.product:hover,
.wp-block-post-template li.product:hover {
	border-color: color-mix(in srgb, var(--wp--preset--color--primary) 40%, var(--wp--preset--color--border));
	box-shadow: var(--wp--preset--shadow--card);
}

/* Lo SKU in griglia: è il campo che si riconosce negli screenshot */
.woocommerce ul.products li.product .sku-wrapper,
.wc-block-components-product-sku {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--contrast-2);
	letter-spacing: .02em;
}

.woocommerce ul.products li.product .price,
.wc-block-components-product-price {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	color: var(--wp--preset--color--contrast);
}

/* Etichetta "in offerta" in tinta col marchio */
.woocommerce span.onsale,
.wc-block-components-product-sale-badge {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: .06em;
	border-radius: 3px;
	min-height: 0;
	min-width: 0;
	padding: .25em .6em;
	line-height: 1.4;
}

/* Tabella attributi della scheda prodotto: è il "catalogo tecnico" */
.woocommerce table.shop_attributes {
	border: 1px solid var(--wp--preset--color--border);
	border-collapse: collapse;
	width: 100%;
	font-size: var(--wp--preset--font-size--small);
}
.woocommerce table.shop_attributes th,
.woocommerce table.shop_attributes td {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding: .7em .9em;
	text-align: left;
	font-style: normal;
}
.woocommerce table.shop_attributes th {
	width: 38%;
	background: var(--wp--preset--color--base-2);
	font-weight: 600;
	color: var(--wp--preset--color--contrast-2);
}
.woocommerce table.shop_attributes td p { margin: 0; }

/* Giacenza: nel B2B è un dato, non una rassicurazione */
.woocommerce .stock {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}
.woocommerce .stock.in-stock { color: #1d7a4d; }
.woocommerce .stock.out-of-stock { color: #b3261e; }

/* Selettore varianti: taglia e colore sono il cuore della demo */
.woocommerce table.variations th.label {
	font-weight: 600;
	padding-right: 1em;
}
.woocommerce table.variations select {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 4px;
	padding: .55em .7em;
	min-width: 12rem;
	background: var(--wp--preset--color--base);
}

/* Messaggi WooCommerce in tinta */
.woocommerce-message,
.woocommerce-info {
	border-top-color: var(--wp--preset--color--primary);
}
.woocommerce-error { border-top-color: #b3261e; }
