/* ==========================================================================
   Shop e archivi categoria prodotto
   Palette del sito: verde #537D5D, testo #1D231E, dettagli #727A35, bordi #E2E2E2, fondo crema #F7F2E4
   ========================================================================== */

body.osm-shop,
body.osm-cards,
.osm-drawer,
.osm-drawer-overlay {
	--osm-accent: #537D5D;
	--osm-ink: #1D231E;
	--osm-muted: #727A35;
	--osm-line: #E2E2E2;
	--osm-soft: #F7F2E4;
}

/* --- Colonne del template ------------------------------------------------- */

/* la colonna filtri vive nel pannello laterale: il wrap che la conteneva sparisce
   (prima regola prima che il JS la sposti, seconda dopo lo spostamento).
   Senza JavaScript i filtri restano nella colonna e il bottone sparisce. */
html.osm-js body.osm-shop .mcb-section .mcb-wrap:has(.column_filters),
html.osm-js body.osm-shop .mcb-section .mcb-wrap.osm-filters-origin {
	display: none;
}

html:not(.osm-js) body.osm-shop .osm-toolbar-filters {
	display: none;
}

body.osm-shop .mcb-section .mcb-wrap:has(.column_shop_products),
body.osm-shop .mcb-section .mcb-wrap.osm-products-wrap {
	width: 100%;
}

/* --- Testi dell'archivio (sopra e sotto la griglia) ----------------------- */

body.osm-shop .osm-archive-text {
	margin: 0 0 32px;
	font-size: 15px;
	line-height: 1.7;
	color: #1D231E;
}

body.osm-shop .osm-archive-outro {
	margin: 40px 0 0;
	padding: 32px 0 0;
	border-top: 1px solid var(--osm-line);
}

/* il JS lo sposta sotto la griglia: prima di allora resterebbe sopra ai prodotti.
   Senza JavaScript il testo e' comunque visibile, solo piu' in alto. */
html.osm-js body.osm-shop .osm-archive-outro:not(.osm-archive-outro-placed) {
	display: none;
}

body.osm-shop .osm-archive-text > *:first-child {
	margin-top: 0;
}

body.osm-shop .osm-archive-text > *:last-child {
	margin-bottom: 0;
}

body.osm-shop .osm-archive-text h1,
body.osm-shop .osm-archive-text h2,
body.osm-shop .osm-archive-text h3,
body.osm-shop .osm-archive-text h4 {
	margin: 24px 0 10px;
	color: var(--osm-ink);
}

body.osm-shop .osm-archive-text a {
	color: var(--osm-accent);
	text-decoration: underline;
}

/* FAQ ad accordion (sc_faq del tema): stessi colori dell'elemento FAQ delle guide */
body.osm-shop .osm-archive-text .faq {
	--mfn-faq-line: rgba(114, 122, 53, .35);
}

body.osm-shop .osm-archive-text .faq .question .title {
	color: #1D231E;
}

body.osm-shop .osm-archive-text .faq .question .title i {
	color: #727A35;
}

body.osm-shop .osm-archive-text .faq .question .answer {
	color: rgba(29, 35, 30, .78);
}

/* --- Barra strumenti ------------------------------------------------------ */

body.osm-shop .mfn-woo-filters-wrapper.shop-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	margin: 0 0 32px;
	padding: 0 0 16px;
	border-bottom: 1px solid var(--osm-line);
}

body.osm-shop .shop-filters .woocommerce-notices-wrapper {
	order: -1;
	width: 100%;
}

/* conteggio e opzioni originali del tema: sostituiti dalla barra */
body.osm-shop .shop-filters .woocommerce-result-count,
body.osm-shop .shop-filters .mfn-woo-list-options,
body.osm-shop .shop-filters .open-filters {
	display: none !important;
}

body.osm-shop .osm-toolbar-filters {
	order: 1;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 11px 20px;
	border: 1px solid var(--osm-line);
	border-radius: 999px;
	background: #fff;
	box-shadow: none;
	color: var(--osm-ink);
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	transition: border-color .2s ease, color .2s ease;
}

body.osm-shop .osm-toolbar-filters[hidden] {
	display: none;
}

body.osm-shop .osm-toolbar-filters:before,
body.osm-shop .osm-toolbar-filters:after {
	display: none !important;
}

body.osm-shop .osm-toolbar-filters:hover,
body.osm-shop .osm-toolbar-filters:focus,
body.osm-shop .osm-toolbar-filters[aria-expanded="true"] {
	background: #fff !important;
	border-color: var(--osm-accent);
	color: var(--osm-accent) !important;
	box-shadow: none !important;
}

body.osm-shop .osm-toolbar-filters .osm-icon {
	width: 18px;
	height: 18px;
}

.osm-toolbar-filters-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--osm-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
}

body.osm-shop p.osm-toolbar-count {
	order: 2;
	margin: 0;
	color: var(--osm-muted);
	font-size: 14px;
	line-height: 1.4;
}

body.osm-shop .shop-filters form.woocommerce-ordering {
	order: 3;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 0 auto;
}

body.osm-shop .shop-filters form.woocommerce-ordering label {
	margin: 0;
	color: var(--osm-muted);
	font-size: 13px;
	line-height: 1.4;
	white-space: nowrap;
}

body.osm-shop .shop-filters form.woocommerce-ordering select.orderby {
	width: auto;
	min-width: 200px;
	height: auto;
	margin: 0;
	padding: 11px 42px 11px 18px;
	border: 1px solid var(--osm-line);
	border-radius: 999px;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D231E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 13px;
	box-shadow: none;
	color: var(--osm-ink);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.2;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

body.osm-shop .shop-filters form.woocommerce-ordering select.orderby:focus {
	border-color: var(--osm-accent);
	outline: none;
}

/* --- Filtri attivi -------------------------------------------------------- */

.osm-toolbar-chips {
	order: 4;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	width: 100%;
}

body.osm-shop a.osm-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	border: 1px solid var(--osm-line);
	border-radius: 999px;
	background: var(--osm-soft);
	color: var(--osm-ink);
	font-size: 13px;
	line-height: 1.3;
	text-decoration: none;
	transition: border-color .2s ease, color .2s ease;
}

body.osm-shop a.osm-chip:hover {
	border-color: var(--osm-accent);
	color: var(--osm-accent);
}

body.osm-shop a.osm-chip .osm-icon {
	width: 12px;
	height: 12px;
	color: var(--osm-muted);
}

body.osm-shop a.osm-chip-clear {
	background: none;
	border-color: transparent;
	color: var(--osm-muted);
	text-decoration: underline;
}

/* --- Pannello filtri ------------------------------------------------------ */

.osm-drawer-overlay {
	position: fixed;
	inset: 0;
	z-index: 100010;
	background: rgba(20, 20, 12, .45);
	opacity: 0;
	visibility: hidden;
	transition: opacity .32s ease, visibility 0s linear .32s;
}

body.osm-drawer-open .osm-drawer-overlay {
	opacity: 1;
	visibility: visible;
	transition: opacity .32s ease, visibility 0s;
}

.osm-drawer {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 100011;
	display: flex;
	flex-direction: column;
	width: min(400px, 92vw);
	background: #fff;
	box-shadow: 0 0 40px rgba(0, 0, 0, .18);
	transform: translateX(-100%);
	visibility: hidden;
	transition: transform .32s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .32s;
}

body.osm-drawer-open .osm-drawer {
	transform: none;
	visibility: visible;
	transition: transform .32s cubic-bezier(.4, 0, .2, 1), visibility 0s;
}

body.osm-drawer-open {
	overflow: hidden;
	padding-right: var(--osm-scrollbar, 0px);
}

.osm-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 24px;
	border-bottom: 1px solid var(--osm-line);
}

.osm-drawer p.osm-drawer-title {
	margin: 0;
	color: var(--osm-ink);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.osm-drawer button.osm-drawer-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--osm-soft);
	box-shadow: none;
	color: var(--osm-ink);
	cursor: pointer;
}

.osm-drawer button.osm-drawer-close:before,
.osm-drawer button.osm-drawer-close:after {
	display: none !important;
}

.osm-drawer button.osm-drawer-close:hover {
	background: var(--osm-soft) !important;
	color: var(--osm-accent) !important;
}

.osm-drawer button.osm-drawer-close .osm-icon {
	width: 16px;
	height: 16px;
}

.osm-drawer-body {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 20px 24px;
}

.osm-drawer-foot {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--osm-line);
	background: #fff;
}

.osm-drawer a.osm-drawer-clear {
	color: var(--osm-muted);
	font-size: 14px;
	line-height: 1.3;
	text-decoration: underline;
	white-space: nowrap;
}

.osm-drawer a.osm-drawer-clear:hover {
	color: var(--osm-accent);
}

.osm-drawer button.osm-drawer-apply {
	flex: 1 1 auto;
	margin: 0;
	padding: 14px 20px;
	border: 0;
	border-radius: 999px;
	background: var(--osm-accent);
	box-shadow: none;
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
}

.osm-drawer button.osm-drawer-apply:before,
.osm-drawer button.osm-drawer-apply:after {
	display: none !important;
}

.osm-drawer button.osm-drawer-apply:hover {
	background: var(--osm-ink) !important;
	color: #fff !important;
}

/* colonna del builder spostata dentro al pannello */
.osm-drawer .column_filters,
.osm-drawer .column_filters .mcb-column-inner {
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* --- Campi dei filtri ----------------------------------------------------- */

.column_filters .mfn-advanced-filters {
	--range-slider-height: 2px;
	--range-slider-background: #E2E2E2;
	--range-slider-border-radius: 0;
	--range-slider-handle-size: 14px;
	--range-slider-handle-border-radius: 100%;
	--range-slider-handle-background: #537D5D;
	--range-slider-handle-box-shadow: 0 0 0 3px #fff, 0 0 0 4px #537D5D;
	--range-slider-handle-hover-background: #1D231E;
	--tip-background: #1D231E;
	--tip-color: #fff;
	gap: 0;
}

/* Categorie demo Cosmetics4: FACE, HAIR, BODY, FOR KIDS */
.column_filters .mfn-advanced-filters li:has(> input[value="14"]),
.column_filters .mfn-advanced-filters li:has(> input[value="19"]),
.column_filters .mfn-advanced-filters li:has(> input[value="20"]),
.column_filters .mfn-advanced-filters li:has(> input[value="60"]) {
	display: none !important;
}

.column_filters .mfn-advanced-filters .mfn-form-row {
	margin: 0;
	padding: 0 0 20px;
	border-bottom: 1px solid var(--osm-line);
}

.column_filters .mfn-advanced-filters .mfn-form-row + .mfn-form-row {
	padding-top: 20px;
}

.column_filters .mfn-advanced-filters .mfn-form-row:last-of-type {
	border-bottom: 0;
	padding-bottom: 0;
}

.column_filters .mfn-advanced-filters-group-label {
	margin: 0;
}

.column_filters .mfn-advanced-filters-group-label .mfn-advanced-filters-label-name {
	font-size: 12px;
	line-height: 1.4;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--osm-ink);
}

.column_filters .mfn-advanced-filters-accordion .mfn-advanced-filters-field-switcher {
	color: var(--osm-muted);
	font-size: 12px;
}

.column_filters .mfn-advanced-filters .mfn-form-row-wrapper {
	margin-top: 14px;
}

.column_filters .mfn-advanced-filters-options {
	gap: 10px;
}

.column_filters .mfn-advanced-filters-options li {
	gap: 10px;
	margin: 0;
	padding: 0;
	align-items: center;
}

.column_filters .mfn-advanced-filters-options-vertical li ul {
	padding-left: 0;
	margin-top: 10px;
	gap: 10px;
}

.column_filters .mfn-advanced-filters-checkbox li input[type="checkbox"] {
	width: 16px;
	height: 16px;
	min-width: 16px;
	border: 1px solid #cfcfc6;
	border-radius: 3px;
	background: #fff;
	box-shadow: none;
}

.column_filters .mfn-advanced-filters-checkbox li input[type="checkbox"]:after {
	width: 4px;
	height: 7px;
	border-color: #fff;
}

.column_filters .mfn-advanced-filters-checkbox li input[type="checkbox"]:hover {
	border-color: var(--osm-accent);
}

.column_filters .mfn-advanced-filters-checkbox li input[type="checkbox"]:checked {
	background: var(--osm-accent);
	border-color: var(--osm-accent);
}

.column_filters .mfn-advanced-filters-checkbox-label {
	font-size: 14px;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: none;
	color: var(--osm-ink);
}

.column_filters .mfn-advanced-filters-options li:hover .mfn-advanced-filters-checkbox-label {
	color: var(--osm-accent);
}

.column_filters .mfn-form-row-range-slider .mfn-form-row-wrapper {
	padding-top: 10px;
	padding-bottom: 8px;
}

.column_filters .mfn-advanced-filters .mfn-ui-slider-wrapper .ui-widget-header {
	background-color: var(--osm-accent);
}

.column_filters .mfn-advanced-filters .mfn-ui-tip {
	opacity: 0;
	pointer-events: none;
	top: auto;
	transform: translate(-50%, -160%);
	font-size: 12px;
	letter-spacing: .04em;
	padding: 3px 6px;
	border-radius: 2px;
	white-space: nowrap;
}

.column_filters .mfn-advanced-filters .ui-slider-handle:hover .mfn-ui-tip,
.column_filters .mfn-advanced-filters .ui-slider-handle:focus .mfn-ui-tip,
.column_filters .mfn-advanced-filters .ui-slider-handle.ui-state-active .mfn-ui-tip {
	opacity: 1;
}

/* invio automatico: il bottone del form non serve */
.column_filters .mfn-advanced-filters-auto-submit button.mfn-btn {
	display: none !important;
}

/* --- Griglia prodotti ----------------------------------------------------- */

body.osm-cards ul.products {
	--osm-cols: 4;
	display: grid;
	grid-template-columns: repeat(var(--osm-cols), minmax(0, 1fr));
	/* card della stessa riga alte uguali (stretch della griglia), anche se il
	   titolo va a capo. Non 1fr: ogni riga sarebbe alta come la card piu' alta
	   di tutta la griglia e le altre resterebbero con un grande vuoto */
	grid-auto-rows: auto;
	gap: 28px 24px;
	margin: 0;
	padding: 0;
}

/* correlati, upsell ecc. dichiarano il numero di colonne: :where() non aggiunge
   specificita', cosi' i breakpoint qui sotto restano quelli che comandano */
body.osm-cards ul.products:where(.columns-1) { --osm-cols: 1; }
body.osm-cards ul.products:where(.columns-2) { --osm-cols: 2; }
body.osm-cards ul.products:where(.columns-3) { --osm-cols: 3; }
body.osm-cards ul.products:where(.columns-4) { --osm-cols: 4; }
body.osm-cards ul.products:where(.columns-5) { --osm-cols: 5; }
body.osm-cards ul.products:where(.columns-6) { --osm-cols: 6; }

/* il widget BeTheme "Shop" dichiara le colonne sul contenitore, non sulla lista */
body.osm-cards :where(.woocommerce.columns-1) ul.products { --osm-cols: 1; }
body.osm-cards :where(.woocommerce.columns-2) ul.products { --osm-cols: 2; }
body.osm-cards :where(.woocommerce.columns-3) ul.products { --osm-cols: 3; }
body.osm-cards :where(.woocommerce.columns-4) ul.products { --osm-cols: 4; }
body.osm-cards :where(.woocommerce.columns-5) ul.products { --osm-cols: 5; }
body.osm-cards :where(.woocommerce.columns-6) ul.products { --osm-cols: 6; }

/* i clearfix di WooCommerce diventerebbero celle vuote della griglia */
body.osm-cards ul.products:before,
body.osm-cards ul.products:after {
	display: none;
}

/* card: immagine, (categoria + titolo) | prezzo, informazioni in fondo */
body.osm-cards ul.products li.product {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto auto 1fr;
	grid-template-areas:
		"image image"
		"title price"
		"meta  meta";
	width: 100% !important;
	/* senza min-width la card si allarga oltre la colonna invece di far scorrere le info */
	min-width: 0;
	margin: 0 !important;
	padding: 0;
	float: none !important;
	clear: none !important;
	text-align: left;
	background: #fff;
	border: 1px solid var(--osm-line);
	border-radius: 12px;
	overflow: hidden;
}

body.osm-cards ul.products li.product > * {
	min-width: 0;
	max-width: 100%;
}

body.osm-cards ul.products li.product .mfn-li-product-row-image { grid-area: image; }
body.osm-cards ul.products li.product .mfn-li-product-row-title { grid-area: title; }
body.osm-cards ul.products li.product .mfn-li-product-row-price { grid-area: price; }
body.osm-cards ul.products li.product .mfn-after-shop-loop-item-title { grid-area: meta; }

/* contenitori dei bottoni: vuoti, altrimenti creerebbero righe in più */
body.osm-cards ul.products li.product .mfn-before-shop-loop-item,
body.osm-cards ul.products li.product .mfn-after-shop-loop-item {
	display: none;
}

/* immagine */

body.osm-cards ul.products li.product .mfn-li-product-row-image {
	margin: 0;
	border-bottom: 1px solid var(--osm-line);
}

/* fondo bianco come le foto JPG: dietro i PNG trasparenti degli oli il crema si vedeva come un riquadro */
body.osm-cards ul.products li.product .image_frame {
	margin: 0;
	border: 0;
	border-radius: 0;
	overflow: hidden;
	background: #fff;
}

body.osm-cards ul.products li.product .image_frame img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform .5s ease;
}

body.osm-cards ul.products li.product:hover .image_frame img {
	transform: scale(1.04);
}

/* categoria, titolo, prezzo */

body.osm-cards ul.products li.product .mfn-li-product-row-title {
	padding: 16px 10px 20px 18px;
}

body.osm-cards ul.products li.product a.osm-card-cat {
	display: block;
	margin-bottom: 5px;
	color: var(--osm-accent);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: .1em;
	text-transform: uppercase;
}

body.osm-cards ul.products li.product a.osm-card-cat:hover {
	color: var(--osm-ink);
}

body.osm-cards ul.products li.product .mfn-li-product-row-title .title {
	margin: 0;
	font-size: 17px;
	line-height: 1.35;
	font-weight: 400;
	letter-spacing: 0;
}

body.osm-cards ul.products li.product .mfn-li-product-row-title .title a {
	color: var(--osm-ink);
}

body.osm-cards ul.products li.product .mfn-li-product-row-title .title a:hover {
	color: var(--osm-accent);
}

body.osm-cards ul.products li.product .mfn-li-product-row-price {
	align-self: end;
	padding: 16px 18px 20px 10px;
	text-align: right;
}

body.osm-cards ul.products li.product .price {
	margin: 0;
	color: var(--osm-ink);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
	white-space: nowrap;
}

body.osm-cards ul.products li.product .price del {
	display: block;
	margin: 0;
	color: var(--osm-muted);
	font-size: 12px;
	font-weight: 400;
	opacity: 1;
}

body.osm-cards ul.products li.product .price ins {
	text-decoration: none;
}

/* informazioni della scheda prodotto: in fondo alla card, su piu' righe.
   Prima era una riga a scorrimento orizzontale: la terza voce restava tagliata
   dal bordo della card ("Format|o") e su smartphone della seconda si vedeva
   solo l'icona. Ora le voci vanno a capo in una griglia; la larghezza decisa
   e' quella della card (container query), non dello schermo, cosi' vale
   uguale in archivi, slider e correlati. */

body.osm-cards ul.products li.product .mfn-after-shop-loop-item-title {
	align-self: end;
	border-top: 1px solid var(--osm-line);
	container-type: inline-size;
}

body.osm-cards ul.products li.product .mfn-after-shop-loop-item-title:empty {
	border-top: 0;
}

/* selettori lunghi: WooCommerce azzera padding e margin di ogni ul dentro .products */
body.osm-cards ul.products li.product ul.osm-card-meta {
	display: grid;
	/* 96px: due colonne gia' nelle card da ~240px (slider della home a 1280) */
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 12px;
	margin: 0;
	padding: 16px;
	list-style: none;
}

/* i clearfix di WooCommerce diventerebbero celle della griglia */
body.osm-cards ul.products li.product ul.osm-card-meta:before,
body.osm-cards ul.products li.product ul.osm-card-meta:after {
	display: none;
}

body.osm-cards ul.products li.product ul.osm-card-meta > li.osm-card-meta-item {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	list-style: none;
}

body.osm-cards .osm-card-meta-icon {
	display: inline-flex;
	flex-shrink: 0;
	color: var(--osm-ink);
}

body.osm-cards .osm-card-meta-icon .osm-icon {
	width: 19px;
	height: 19px;
}

body.osm-cards .osm-card-meta-text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

body.osm-cards .osm-card-meta-label {
	font-size: 12px;
	line-height: 1.3;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	color: var(--osm-ink);
	white-space: nowrap;
}

/* il valore puo' andare a capo ("Favolosa, Leccino") invece di essere tagliato */
body.osm-cards .osm-card-meta-value {
	font-size: 12px;
	line-height: 1.3;
	font-weight: 400;
	color: var(--osm-muted);
	overflow-wrap: anywhere;
}

/* card strette (smartphone, ~170px): una voce per riga, icona e valore.
   L'etichetta resta per gli screen reader: l'icona e il valore bastano
   ("Ottobre 2025" accanto al calendario, "500 ml" accanto alla bottiglia). */
@container (max-width: 220px) {
	body.osm-cards ul.products li.product ul.osm-card-meta {
		grid-template-columns: minmax(0, 1fr);
		gap: 7px;
		padding: 14px;
	}

	body.osm-cards ul.products li.product ul.osm-card-meta > li.osm-card-meta-item {
		gap: 8px;
	}

	body.osm-cards .osm-card-meta-icon .osm-icon {
		width: 16px;
		height: 16px;
	}

	body.osm-cards .osm-card-meta-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	body.osm-cards .osm-card-meta-value {
		font-size: 12px;
		color: var(--osm-ink);
	}
}

/* --- Prodotti correlati / upsell ------------------------------------------ */

body.osm-cards .mfn-related > .title,
body.osm-cards .products.related > .title,
body.osm-cards .products.upsells > .title {
	margin-bottom: 24px;
}

/* --- Stato di caricamento e paginazione ----------------------------------- */

body.osm-shop #Content.is-loading .products_wrapper {
	opacity: .4;
	pointer-events: none;
}

body.osm-shop .products_wrapper {
	transition: opacity .2s ease;
}

body.osm-shop .pager_wrapper {
	margin-top: 48px;
}

/* via lo sfondo a righe del tema */
body.osm-shop .pager_wrapper .pager .pages {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	border-radius: 0;
	background-color: transparent;
	background-image: none;
}

body.osm-shop .pager .pages a.page-numbers,
body.osm-shop .pager .pages span.page-numbers {
	width: 40px;
	height: 40px;
	margin: 0;
	border: 1px solid var(--osm-line);
	border-radius: 999px;
	background: #fff;
	color: var(--osm-ink);
	font-size: 14px;
	line-height: 38px;
}

body.osm-shop .pager .pages a.page-numbers:hover,
body.osm-shop .pager .pages span.page-numbers.current {
	border-color: var(--osm-accent);
	background: var(--osm-accent);
	color: #fff;
}

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

@media (max-width: 1239px) {

	body.osm-cards ul.products {
		--osm-cols: 3;
		gap: 38px 22px;
	}
}

@media (max-width: 959px) {

	body.osm-cards ul.products {
		--osm-cols: 2;
		gap: 32px 20px;
	}

	body.osm-shop .shop-filters form.woocommerce-ordering select.orderby {
		min-width: 0;
	}
}

@media (max-width: 767px) {

	body.osm-shop .mfn-woo-filters-wrapper.shop-filters {
		gap: 10px;
		margin-bottom: 24px;
	}

	body.osm-shop .osm-toolbar-filters {
		flex: 1 1 0;
		justify-content: center;
		padding: 12px 14px;
	}

	body.osm-shop .shop-filters form.woocommerce-ordering {
		flex: 1 1 0;
		margin-left: 0;
	}

	body.osm-shop .shop-filters form.woocommerce-ordering label {
		display: none;
	}

	body.osm-shop .shop-filters form.woocommerce-ordering select.orderby {
		width: 100%;
		padding: 12px 38px 12px 16px;
		text-overflow: ellipsis;
	}

	body.osm-shop p.osm-toolbar-count {
		order: 5;
		width: 100%;
		font-size: 13px;
	}

	body.osm-cards ul.products {
		--osm-cols: 2;
		gap: 28px 12px;
	}

	/* card strette: prezzo sotto al titolo invece che a fianco */
	body.osm-cards ul.products li.product {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto auto auto 1fr;
		grid-template-areas:
			"image"
			"title"
			"price"
			"meta";
	}

	body.osm-cards ul.products li.product .mfn-li-product-row-title {
		padding: 14px 14px 0;
	}

	/* senza prezzo lo spazio sotto al titolo lo darebbe la riga che manca */
	body.osm-cards ul.products li.product:not(:has(.mfn-li-product-row-price)) .mfn-li-product-row-title {
		padding-bottom: 16px;
	}

	body.osm-cards ul.products li.product .mfn-li-product-row-title .title {
		font-size: 15px;
	}

	body.osm-cards ul.products li.product .mfn-li-product-row-price {
		align-self: start;
		padding: 5px 14px 16px;
		text-align: left;
	}

	body.osm-cards ul.products li.product .price {
		font-size: 14px;
	}

	body.osm-cards ul.products li.product .price del {
		display: inline;
		margin-right: 6px;
	}

	.osm-drawer {
		width: min(420px, 100vw);
	}

	.osm-drawer-head,
	.osm-drawer-body,
	.osm-drawer-foot {
		padding-left: 20px;
		padding-right: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {

	.osm-drawer,
	.osm-drawer-overlay,
	body.osm-cards ul.products li.product .image_frame img {
		transition: none;
	}

	body.osm-cards ul.products li.product:hover .image_frame img {
		transform: none;
	}
}

/* --- Hero delle categorie (inc/category-hero.php) --------------------------
   Riquadro salvia con il motivo a foglie della hero della home: categoria
   madre, nome della categoria e descrizione. Prende il posto del titolo del
   template: la sezione con .column_shop_title sparisce solo se nella pagina
   c'e' la hero. */

.mfn-archive-product-tmpl-builder:has(.osm-cat-hero) .mcb-section:has(.column_shop_title) {
	display: none;
}

body.osm-shop .osm-cat-hero {
	margin: 64px 0 40px;
	padding: 64px 56px;
	border-radius: 8px;
	background: #CCD5AE url("/wp-content/uploads/2026/09/pattern.svg") center / cover no-repeat;
}

/* titoletto e titolo: stile e scala comuni a tutto il sito (custom.css,
   "Tipografia comune") */
body.osm-shop .osm-cat-hero__eyebrow {
	margin: 0 0 12px;
	color: var(--osm-muted);
	font-family: Nunito, sans-serif;
	font-size: 13px;
	font-weight: 600;
	line-height: 20px;
	letter-spacing: 2px;
	text-transform: uppercase;
}

body.osm-shop .osm-cat-hero__title {
	margin: 0;
	color: var(--osm-ink);
	font-family: "EB Garamond", serif;
	font-size: var(--osm-h1, 54px);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -1px;
}

/* il testo arriva all'80% della riga; sul telefono occupa tutta la larghezza */
body.osm-shop .osm-cat-hero__desc {
	max-width: 80%;
	margin-top: 20px;
	color: var(--osm-ink);
	font-family: "EB Garamond", serif;
	font-size: 19px;
	line-height: 1.5;
}

body.osm-shop .osm-cat-hero__desc > * {
	margin: 0 0 12px;
}

body.osm-shop .osm-cat-hero__desc > *:last-child {
	margin-bottom: 0;
}

/* con la foto di dettaglio (osm_cat_hero_photo_config): testo a sinistra,
   piccolo riquadro con la foto a destra, centrato in altezza */
body.osm-shop .osm-cat-hero--photo {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 48px;
	align-items: center;
}

body.osm-shop .osm-cat-hero__photo {
	width: 200px;
	margin: 0;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: 8px;
}

body.osm-shop .osm-cat-hero__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 1239px) {
	body.osm-shop .osm-cat-hero {
		padding: 56px 40px;
	}

	body.osm-shop .osm-cat-hero--photo {
		gap: 32px;
	}

	body.osm-shop .osm-cat-hero__photo {
		width: 160px;
	}
}

@media (max-width: 959px) {
	body.osm-shop .osm-cat-hero {
		margin: 48px 0 32px;
	}
}

@media (max-width: 767px) {
	body.osm-shop .osm-cat-hero {
		margin: 32px 0 24px;
		padding: 40px 24px 44px;
	}

	body.osm-shop .osm-cat-hero__eyebrow {
		margin-bottom: 8px;
	}

	body.osm-shop .osm-cat-hero__desc {
		max-width: none;
		margin-top: 16px;
		font-size: 17px;
	}

	/* sul telefono il testo prende tutta la riga: la foto non c'e' */
	body.osm-shop .osm-cat-hero--photo {
		display: block;
	}

	body.osm-shop .osm-cat-hero__photo {
		display: none;
	}
}

/* --- Galleria nel testo sotto i prodotti (inc/category-hero.php) -----------
   Slider a scorrimento (scroll-snap): 4 foto quadrate per volta sul desktop,
   3 sui portatili piccoli, poi sempre meno con il bordo della successiva in
   vista. Le frecce (assets/js/cat-gallery.js) solo con il mouse: sui
   dispositivi touch si scorre col dito. */

body.osm-shop .osm-cat-gallery {
	position: relative;
	margin: 32px 0;
}

body.osm-shop .osm-cat-gallery__track {
	--osm-gallery-gap: 12px;
	--osm-gallery-cols: 4;
	display: flex;
	gap: var(--osm-gallery-gap);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

body.osm-shop .osm-cat-gallery__track::-webkit-scrollbar {
	display: none;
}

body.osm-shop .osm-cat-gallery__track:focus-visible {
	outline: 2px solid var(--osm-accent);
	outline-offset: 4px;
}

body.osm-shop .osm-cat-gallery__photo {
	position: relative;
	flex: 0 0 calc((100% - (var(--osm-gallery-cols) - 1) * var(--osm-gallery-gap)) / var(--osm-gallery-cols));
	aspect-ratio: 1;
	margin: 0;
	overflow: hidden;
	border-radius: 8px;
	background: var(--osm-soft);
	scroll-snap-align: start;
}

body.osm-shop .osm-cat-gallery__photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

/* etichetta della foto, piccola, in basso a sinistra */
body.osm-shop .osm-cat-gallery__photo figcaption {
	position: absolute;
	left: 12px;
	bottom: 12px;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(247, 242, 228, .92);
	color: var(--osm-ink);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: .08em;
	text-transform: uppercase;
}

body.osm-shop .osm-cat-gallery__arrow {
	position: absolute;
	top: 50%;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: -22px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(247, 242, 228, .95);
	box-shadow: 0 2px 10px rgba(29, 35, 30, .15);
	cursor: pointer;
	transition: background-color .2s ease;
}

body.osm-shop .osm-cat-gallery__arrow[hidden] {
	display: none;
}

body.osm-shop .osm-cat-gallery__arrow::before {
	content: "";
	width: 20px;
	height: 20px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D231E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") no-repeat center / contain;
}

body.osm-shop .osm-cat-gallery__arrow--prev {
	left: 12px;
}

body.osm-shop .osm-cat-gallery__arrow--prev::before {
	transform: scaleX(-1);
}

body.osm-shop .osm-cat-gallery__arrow--next {
	right: 12px;
}

body.osm-shop .osm-cat-gallery__arrow:hover,
body.osm-shop .osm-cat-gallery__arrow:focus-visible {
	background-color: #fff;
}

body.osm-shop .osm-cat-gallery__arrow:focus-visible {
	outline: 2px solid var(--osm-accent);
	outline-offset: 2px;
}

@media (max-width: 1239px) {
	body.osm-shop .osm-cat-gallery__track {
		--osm-gallery-cols: 3;
	}
}

@media (max-width: 959px) {
	body.osm-shop .osm-cat-gallery__track {
		--osm-gallery-cols: 2.4;
	}
}

@media (max-width: 767px) {
	body.osm-shop .osm-cat-gallery {
		margin: 24px 0;
	}

	body.osm-shop .osm-cat-gallery__track {
		--osm-gallery-gap: 8px;
		--osm-gallery-cols: 1.25;
	}

	body.osm-shop .osm-cat-gallery__photo figcaption {
		left: 8px;
		bottom: 8px;
		padding: 3px 10px;
		font-size: 12px;
	}
}

/* senza mouse si scorre col dito: le frecce servono solo con il puntatore */
@media (hover: none), (pointer: coarse) {
	body.osm-shop .osm-cat-gallery__arrow {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.osm-shop .osm-cat-gallery__arrow {
		transition: none;
	}
}
