/*
 * Header 2026 – La Meccanica Online (fase 5, 23/10/2026, staging2)
 * Caricato su tutte le pagine (anche carrello e checkout) da inc/fix-grafica-20261022.php.
 * Annullare: cancellare questo file (oppure togliere il blocco che lo carica).
 */

/* ---------- Barra in alto: blu notte come il footer (fix-1, 24/10; prima #004B8F dal header builder) ---------- */
.whb-top-bar .wd-nav-header > li > a { font-weight: 600; font-family: 'Archivo', Arial, sans-serif; }
.whb-top-bar, .whb-top-bar.whb-row, .whb-top-bar .whb-flex-row { background-color: #14202E !important; }
.whb-top-bar { border-bottom-color: rgba(255,255,255,.08) !important; }

/* ---------- Riga principale bianca ---------- */
.whb-general-header { background: #fff; border-bottom: 0 !important; }
.whb-general-header .wd-logo img,
.whb-gs8bcnxektjsro21n657 img {
	width: 384px !important; max-width: none !important; height: 56px !important;
	object-fit: cover; object-position: 50% 50%;
}
.whb-sticked .whb-gs8bcnxektjsro21n657 img,
.whb-clone .whb-gs8bcnxektjsro21n657 img { width: 274px !important; height: 40px !important; }

/* ricerca larga, arrotondata, pulsante arancio */
.whb-general-header .wd-search-form { width: 100%; }
.whb-general-header form.searchform { --wd-form-brd-radius: 999px; --wd-form-height: 48px; }
.whb-general-header form.searchform input[type="text"] {
	border: 2px solid #E4DED4 !important; border-radius: 999px !important; background: #fff !important;
	padding-left: 22px !important; font-family: 'Archivo', Arial, sans-serif; font-size: 15px; color: #14202E;
}
.whb-general-header form.searchform input[type="text"]:focus { border-color: #014B8F !important; }
.whb-general-header form.searchform .searchsubmit {
	background: #FF5E2B !important; color: #14202E !important; border-radius: 0 999px 999px 0 !important;
	width: 56px; right: 0;
}
.whb-general-header form.searchform .searchsubmit:hover { background: #EC5727 !important; }

/* Accedi / Preferiti / Carrello con etichette */
.whb-general-header .wd-tools-element > a { color: #14202E; }
.whb-general-header .wd-tools-element .wd-tools-text {
	font-family: 'Archivo', Arial, sans-serif; font-weight: 600; font-size: 14px; color: #14202E; text-transform: none;
}
.whb-general-header .wd-header-compare { display: none !important; }
.whb-general-header .wd-header-cart .wd-tools-count { background: #FF5E2B; color: #14202E; font-weight: 700; }

/* logo: la colonna si allarga quanto il logo */
.whb-general-header .whb-column8 { flex: 0 0 auto; }
.whb-gs8bcnxektjsro21n657, .whb-gs8bcnxektjsro21n657 .wd-logo, .whb-gs8bcnxektjsro21n657 a { max-width: none !important; width: auto !important; }
.whb-general-header .whb-column9 { padding-left: 28px; }
/* etichetta "Carrello" sopra il totale */
.whb-general-header .wd-header-cart .wd-tools-text { display: inline-flex; flex-direction: column; line-height: 1.15; }
.whb-general-header .wd-header-cart .wd-tools-text::before { content: "Carrello"; font-weight: 600; font-size: 14px; color: #14202E; }

/* ---------- Riga menù su crema ---------- */
.whb-header-bottom { background: #F6F3EE !important; border-color: #E4DED4 !important; }
.whb-header-bottom .whb-flex-row { gap: 6px; }
/* "Tutti i prodotti": arancio con testo blu notte */
.whb-csu6udh2p2i2edzbby9u .menu-opener {
	background: #FF5E2B !important; color: #14202E !important; border-radius: 8px; min-height: 42px;
	font-family: 'Archivo', Arial, sans-serif; font-weight: 700; font-size: 15px;
}
.whb-csu6udh2p2i2edzbby9u .menu-opener * { color: #14202E !important; }
.whb-csu6udh2p2i2edzbby9u .menu-opener:hover { background: #EC5727 !important; }
/* "Marchi" */
.whb-sutm3gcou0jvp9som6tz .menu-opener {
	background: #fff !important; border-color: #E4DED4 !important; border-radius: 8px; min-height: 42px; color: #14202E;
	font-family: 'Archivo', Arial, sans-serif; font-weight: 700;
}
/* menù principale: reparti più grandi + Offerte */
.whb-header-bottom .wd-nav-main > li > a {
	font-family: 'Archivo', Arial, sans-serif; font-weight: 600; font-size: 15px; color: #14202E; text-transform: none;
}
.whb-header-bottom .wd-nav-main > li > a:hover,
.whb-header-bottom .wd-nav-main > li.current-menu-item > a { color: #014B8F; }
.whb-header-bottom .wd-nav-main > li.lmo-offerte > a { color: #C2410C; }
/* Assistenza WhatsApp */
.lmo-hdr-wa { display: flex; align-items: center; gap: 10px; text-decoration: none !important; color: #14202E !important; }
.lmo-hdr-wa svg { flex: 0 0 auto; }
.lmo-hdr-wa span { display: flex; flex-direction: column; line-height: 1.15; font-family: 'Archivo', Arial, sans-serif; }
.lmo-hdr-wa strong { font-size: 14px; color: #14202E; }
.lmo-hdr-wa small { font-size: 14px; color: #1E7A46; font-weight: 700; }
.whb-7ep4ilcbgn5rhkxfgo1t:empty, .whb-7ep4ilcbgn5rhkxfgo1t .wd-header-text:empty { display: none; }

/* ---------- Menù a reparti (dropdown "Tutti i prodotti") ---------- */
.wd-header-cats .wd-dropdown-cats { border-radius: 0 0 10px 10px; box-shadow: 0 14px 34px rgba(20,32,46,.16); }
.wd-header-cats .wd-nav-vertical > li > a {
	font-family: 'Archivo', Arial, sans-serif; font-weight: 700; font-size: 15px; color: #14202E;
}
.wd-header-cats .wd-nav-vertical > li:hover > a { background: #F6F3EE; color: #014B8F; }
.wd-header-cats .wd-sub-menu a { font-family: 'Archivo', Arial, sans-serif; color: #14202E; }
.wd-header-cats .wd-sub-menu > li > a { font-weight: 700; }
.wd-header-cats .lmo-vedi-tutte > a { color: #014B8F !important; font-weight: 700; }
.wd-header-cats .wd-dropdown-menu { min-width: 280px; }
.wd-header-cats .wd-sub-menu > li > a { padding-top: 8px; padding-bottom: 8px; font-size: 14.5px; }
.wd-header-cats .sub-sub-menu { min-width: 260px; }
.wd-header-cats .sub-sub-menu a { font-weight: 500; font-size: 14px; }

/* ---------- Telefono ---------- */
@media (max-width: 1024px) {
	.whb-lt7vdqgaccmapftzurvt img { width: 267px !important; max-width: none !important; height: 40px !important; object-fit: cover; object-position: 50% 50%; }
	/* un solo pulsante WhatsApp: resta quello fisso in basso, via il doppione nell'header */
	.whb-244a6luxx004sl5ptyrg { display: none !important; }
	.whb-header-bottom .whb-column_mobile5 .wd-search-form,
	.whb-header-bottom .whb-26k3m2wfs4qft0go3enn { flex: 1 1 auto; width: 100%; }
	.whb-26k3m2wfs4qft0go3enn form.searchform input[type="text"] { border: 2px solid #E4DED4 !important; border-radius: 999px !important; }
}

/* ---------- Vecchia fascia newsletter del prefooter (HTML block 7129): nascosta ovunque, resta quella nuova del footer ---------- */
.wd-prefooter .elementor-element-3161ab2,
.wd-prefooter .elementor-element-66623347,
.wd-prefooter .elementor-element-9f4b28d { display: none !important; }

/* ===== Fase 7: reparti a fisarmonica nel menù "Tutti i prodotti" ===== */
/* fix-1 (24/10): chiuso = tutti i reparti visibili, nessuna barra; con un reparto aperto scorre solo in verticale, barra sottile */
.wd-header-cats .wd-dropdown-cats { max-height: none; overflow: visible; }
.wd-header-cats .wd-dropdown-cats:has(.lmo-open) {
	max-height: calc(100vh - 140px); overflow-x: hidden; overflow-y: auto;
	scrollbar-width: thin; scrollbar-color: #CFC6B8 transparent;
}
.wd-header-cats .wd-dropdown-cats::-webkit-scrollbar { width: 6px; height: 0; }
.wd-header-cats .wd-dropdown-cats::-webkit-scrollbar-thumb { background: #CFC6B8; border-radius: 6px; }
.wd-header-cats .wd-dropdown-cats:has(.lmo-open) .lmo-reparto-voce:not(.lmo-open) > .wd-dropdown-menu { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
.wd-header-cats .lmo-reparto-voce.lmo-open > .wd-dropdown-menu {
	position: static !important; opacity: 1 !important; visibility: visible !important; transform: none !important;
	pointer-events: auto !important; display: block !important; box-shadow: none !important; min-width: 0 !important; width: 100% !important;
	background: #F6F3EE; border-radius: 0; margin: 0; padding: 4px 0 8px;
}
.wd-header-cats .lmo-reparto-voce.lmo-open > .wd-dropdown-menu .container { padding: 0; max-width: none; }
.wd-header-cats .lmo-reparto-voce.lmo-open > .wd-dropdown-menu .wd-sub-menu > li > a { padding-left: 28px; font-weight: 600; }
.wd-header-cats .lmo-reparto-voce.lmo-open .sub-sub-menu { display: none !important; }
.wd-header-cats .lmo-reparto-voce.lmo-open > a { background: #F6F3EE; color: #014B8F; }
/* finestra stretta: niente sottomenù che escono a destra, solo fisarmonica al clic */
@media (max-width: 1299px) {
	.wd-header-cats .lmo-reparto-voce:not(.lmo-open) > .wd-dropdown-menu { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
}
/* menù del telefono: i reparti si aprono anche toccando il nome */
.wd-nav-mobile .lmo-reparto-voce.lmo-open > .wd-sub-menu, .wd-nav-mobile .lmo-reparto-voce.lmo-open > ul { display: block !important; }

/* finestra media (1025-1299 px): riga menù su una riga sola */
@media (min-width: 1025px) and (max-width: 1299px) {
	.whb-header-bottom .wd-nav-main > li:nth-child(n+4):not(.lmo-offerte) { display: none; }
	.whb-header-bottom .wd-nav-main > li > a { font-size: 14px; padding-left: 8px; padding-right: 8px; }
	.lmo-hdr-wa strong { font-size: 13px; }
	.whb-sutm3gcou0jvp9som6tz .menu-opener { min-width: 0; }
	.whb-header-bottom .wd-nav-main { flex-wrap: nowrap; }
	.whb-header-bottom .wd-nav-main > li > a { white-space: nowrap; }
	.whb-csu6udh2p2i2edzbby9u, .whb-csu6udh2p2i2edzbby9u .menu-opener { width: 200px !important; min-width: 0 !important; }
	.whb-sutm3gcou0jvp9som6tz, .whb-sutm3gcou0jvp9som6tz .menu-opener { width: 140px !important; min-width: 0 !important; }
	.whb-header-bottom .whb-column12 { flex: 1 1 auto; min-width: 0; }
}

/* ===== fix-1 (24/10): avvisi WooCommerce puliti, ovunque (errore rosso tenue, conferma verde, info crema) ===== */
:root {
	--notices-warning-bg: #FDF1F0; --notices-warning-color: #14202E;
	--notices-success-bg: #EEF6F1; --notices-success-color: #14202E;
}
html body .woocommerce-error, html body .wc-block-components-notice-banner.is-error {
	background: #FDF1F0 !important; color: #14202E !important; border: 0 !important; border-left: 4px solid #B32D2E !important;
	border-radius: 10px !important; box-shadow: none !important;
}
html body .woocommerce-message, html body .wc-block-components-notice-banner.is-success {
	background: #EEF6F1 !important; color: #14202E !important; border: 0 !important; border-left: 4px solid #1E7A46 !important;
	border-radius: 10px !important; box-shadow: none !important;
}
html body .woocommerce-info, html body .wc-block-components-notice-banner.is-info {
	background: #F6F3EE !important; color: #14202E !important; border: 1px solid #E4DED4 !important;
	border-radius: 10px !important; box-shadow: none !important; outline: 0 !important;
}
html body .woocommerce-error::before { color: #B32D2E !important; }
html body .woocommerce-message::before { color: #1E7A46 !important; }
html body .woocommerce-info::before { color: #014B8F !important; }
html body .woocommerce-error li, html body .woocommerce-error li a { color: #14202E !important; }
html body .woocommerce-error a, html body .woocommerce-error li a { color: #B32D2E !important; text-decoration: underline !important; }
html body .woocommerce-message a:not(.button) { color: #1E7A46 !important; text-decoration: underline; }
html body .woocommerce-info a:not(.button) { color: #014B8F !important; text-decoration: underline !important; }

/* ===== fix-1 stile B (24/10): riga menù bianca, pulsante "Reparti" compatto, "Marchi" come voce di testo ===== */
@media (min-width: 1025px) {
	html body .whb-header-bottom { background: #fff !important; border-top: 1px solid #EFEAE2 !important; border-bottom: 1px solid #E4DED4 !important; }
	html body .whb-header-bottom .whb-flex-row { gap: 0; }
	/* pulsante Reparti */
	html body .whb-csu6udh2p2i2edzbby9u { width: auto !important; min-width: 0 !important; flex: 0 0 auto; margin-right: 22px; }
	html body .whb-csu6udh2p2i2edzbby9u .menu-opener {
		width: auto !important; min-width: 0 !important; min-height: 42px; height: 42px; padding: 10px 18px !important; gap: 10px;
		background: #FF5E2B !important; color: #14202E !important; border-radius: 8px !important; font-weight: 600 !important; font-size: 15px;
		display: inline-flex; align-items: center;
	}
	html body .whb-csu6udh2p2i2edzbby9u .menu-opener:hover { background: #FF7447 !important; }
	html body .whb-csu6udh2p2i2edzbby9u .menu-open-label { font-weight: 600 !important; }
	html body .whb-csu6udh2p2i2edzbby9u .wd-dropdown-cats { width: 320px !important; min-width: 320px; left: 0; right: auto; border-radius: 10px; margin-top: 6px; }
	/* Marchi: solo testo con freccia */
	html body .whb-sutm3gcou0jvp9som6tz { width: auto !important; min-width: 0 !important; flex: 0 0 auto; display: flex; align-items: center; }
	html body .whb-sutm3gcou0jvp9som6tz .menu-opener {
		width: auto !important; min-width: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important;
		padding: 0 !important; min-height: 42px; color: #14202E !important; font-weight: 600 !important; font-size: 15px; gap: 6px;
	}
	html body .whb-sutm3gcou0jvp9som6tz .menu-opener * { color: inherit !important; }
	html body .whb-sutm3gcou0jvp9som6tz .menu-opener-icon { display: none !important; }
	html body .whb-sutm3gcou0jvp9som6tz .menu-opener:hover { color: #014B8F !important; }
	html body .whb-sutm3gcou0jvp9som6tz .wd-dropdown-cats { width: 300px !important; min-width: 300px; left: 0; right: auto; border-radius: 10px; }
	html body .whb-sutm3gcou0jvp9som6tz::after { content: ""; display: block; width: 1px; height: 22px; background: #E4DED4; margin: 0 13px 0 26px; flex: 0 0 1px; }
	/* link di testo */
	html body .whb-header-bottom .wd-nav-main > li > a { color: #14202E; font-weight: 600; padding-left: 13px; padding-right: 13px; }
	html body .whb-header-bottom .wd-nav-main > li > a:hover { color: #014B8F; }
	html body .whb-header-bottom .wd-nav-main > li.lmo-offerte > a { color: #D9480F; }
	html body .lmo-hdr-wa small { color: #1E7A46; }
}
@media (min-width: 1025px) and (max-width: 1299px) {
	html body .whb-csu6udh2p2i2edzbby9u, html body .whb-csu6udh2p2i2edzbby9u .menu-opener,
	html body .whb-sutm3gcou0jvp9som6tz, html body .whb-sutm3gcou0jvp9som6tz .menu-opener { width: auto !important; }
	html body .whb-csu6udh2p2i2edzbby9u { margin-right: 14px; }
	html body .whb-sutm3gcou0jvp9som6tz::after { margin: 0 6px 0 16px; }
	html body .whb-header-bottom .wd-nav-main > li > a { padding-left: 9px; padding-right: 9px; }
}
