/*
 * Base: solo reset minimo su html/body e box-sizing.
 * Nessuna regola globale su img, a, form: ogni elemento è stilizzato dalla sua classe.
 */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--ev-font-sans);
	font-size: var(--ev-text-base);
	line-height: var(--ev-leading-normal);
	color: var(--ev-color-text);
	background: var(--ev-color-bg);
	-webkit-font-smoothing: antialiased;
}

/* Footer in fondo anche sulle pagine corte: il contenuto principale occupa lo spazio libero. */
body.evolution { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body.evolution > .ev-main, body.evolution > main { flex: 1 0 auto; }

/* ---------- Utilità ---------- */
.ev-container {
	width: 100%;
	max-width: var(--ev-container);
	margin-inline: auto;
	padding-inline: var(--ev-gutter);
}
.ev-visually-hidden {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ev-section { padding-block: var(--ev-section-gap); }
.ev-section--surface { background: var(--ev-color-surface); }
.ev-stack > * + * { margin-top: var(--ev-space-4); }

.ev-icon {
	width: 1.25em; height: 1.25em; flex: none;
	fill: none; stroke: currentColor; stroke-width: 1.75;
	stroke-linecap: round; stroke-linejoin: round;
	vertical-align: middle;
}
.ev-icon--fill { fill: currentColor; stroke: none; }

.ev-img { display: block; max-width: 100%; height: auto; }

.ev-link {
	color: var(--ev-color-brand);
	text-decoration: none;
	font-weight: var(--ev-font-weight-semibold);
	display: inline-flex; align-items: center; gap: var(--ev-space-1);
}
.ev-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ev-link--muted { color: var(--ev-color-text-muted); font-weight: var(--ev-font-weight-regular); }

:where(.ev-btn, .ev-link, .ev-input, .ev-select, .ev-chip, .ev-qty__btn, .ev-tabs-nav__link, .ev-nav__link):focus-visible {
	outline: 2px solid var(--ev-color-focus);
	outline-offset: 2px;
}

/* ---------- Titoli ---------- */
.ev-heading { margin: 0; line-height: var(--ev-leading-tight); font-weight: var(--ev-font-weight-bold); }
.ev-heading--3xl { font-size: var(--ev-text-3xl); }
.ev-heading--2xl { font-size: var(--ev-text-2xl); }
.ev-heading--xl { font-size: var(--ev-text-xl); }
.ev-heading--lg { font-size: var(--ev-text-lg); }
.ev-eyebrow {
	font-size: var(--ev-text-xs); font-weight: var(--ev-font-weight-bold);
	letter-spacing: 0.08em; text-transform: uppercase; color: var(--ev-color-brand);
	margin: 0 0 var(--ev-space-2);
}
.ev-text { margin: 0; }
.ev-text--muted { color: var(--ev-color-text-muted); }
.ev-text--sm { font-size: var(--ev-text-sm); }

.ev-section-head {
	display: flex; align-items: end; justify-content: space-between; gap: var(--ev-space-4);
	margin-bottom: var(--ev-space-6);
}
.ev-section-head__title { display: flex; align-items: center; gap: var(--ev-space-3); }
.ev-section-head__title .ev-icon { width: 28px; height: 28px; color: var(--ev-color-text); }

/* ---------- Pulsanti ---------- */
.ev-btn {
	--_bg: var(--ev-color-brand); --_fg: #fff; --_bd: var(--ev-color-brand);
	display: inline-flex; align-items: center; justify-content: center; gap: var(--ev-space-2);
	min-height: var(--ev-control-height);
	padding: 0 var(--ev-space-5);
	border: var(--ev-border-width) solid var(--_bd); border-radius: var(--ev-radius-md);
	background: var(--_bg); color: var(--_fg);
	font: inherit; font-size: var(--ev-text-sm); font-weight: var(--ev-font-weight-bold);
	text-transform: uppercase; letter-spacing: 0.02em; text-decoration: none;
	cursor: pointer; white-space: nowrap;
	transition: background var(--ev-duration) var(--ev-ease), color var(--ev-duration) var(--ev-ease), border-color var(--ev-duration) var(--ev-ease);
}
.ev-btn:hover { --_bg: var(--ev-color-brand-hover); --_bd: var(--ev-color-brand-hover); }
.ev-btn--lg { min-height: var(--ev-control-height-lg); font-size: var(--ev-text-base); padding-inline: var(--ev-space-6); }
.ev-btn--sm { min-height: 36px; padding-inline: var(--ev-space-3); font-size: var(--ev-text-xs); }
.ev-btn--block { width: 100%; }
.ev-btn--outline { --_bg: transparent; --_fg: var(--ev-color-brand); --_bd: var(--ev-color-brand); }
.ev-btn--outline:hover { --_bg: var(--ev-color-brand-soft); --_fg: var(--ev-color-brand-hover); }
.ev-btn--ghost { --_bg: #fff; --_fg: var(--ev-color-text); --_bd: var(--ev-color-border-strong); }
.ev-btn--ghost:hover { --_bg: var(--ev-color-surface); --_bd: var(--ev-color-text); }
.ev-btn--inverse { --_bg: transparent; --_fg: #fff; --_bd: rgb(255 255 255 / 0.85); }
.ev-btn--inverse:hover { --_bg: rgb(255 255 255 / 0.1); --_bd: #fff; }
.ev-btn--white { --_bg: #fff; --_fg: var(--ev-color-brand); --_bd: #fff; }
.ev-btn--white:hover { --_bg: var(--ev-color-brand-soft); --_bd: var(--ev-color-brand-soft); }
.ev-btn--whatsapp { --_bg: #1f8f4e; --_bd: #1f8f4e; }
.ev-btn--whatsapp:hover { --_bg: #187340; --_bd: #187340; }

/* ---------- Form ---------- */
.ev-field { display: grid; gap: var(--ev-space-1); }
.ev-label { font-size: var(--ev-text-sm); font-weight: var(--ev-font-weight-semibold); }
.ev-label__req { color: var(--ev-color-brand); }
.ev-input, .ev-select, .ev-textarea {
	width: 100%; min-height: var(--ev-control-height);
	padding: 0 var(--ev-space-3);
	font: inherit; font-size: var(--ev-text-sm); color: var(--ev-color-text);
	background: #fff; border: var(--ev-border-width) solid var(--ev-color-border-strong);
	border-radius: var(--ev-radius-md);
}
.ev-textarea { min-height: 120px; padding: var(--ev-space-3); resize: vertical; }
.ev-select {
	appearance: none; padding-right: 2.25rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6270' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 16px;
}
.ev-input::placeholder, .ev-textarea::placeholder { color: #8a909c; }
.ev-check { display: flex; gap: var(--ev-space-2); align-items: flex-start; font-size: var(--ev-text-sm); }
.ev-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ev-color-brand); }
.ev-help { font-size: var(--ev-text-xs); color: var(--ev-color-text-muted); }

/* ---------- Badge, rating, prezzo, stock ---------- */
.ev-badge {
	display: inline-flex; align-items: center; gap: var(--ev-space-1);
	padding: 2px 8px; border-radius: var(--ev-radius-sm);
	font-size: var(--ev-text-xs); font-weight: var(--ev-font-weight-bold); line-height: 1.5;
	background: var(--ev-color-brand); color: #fff;
}
.ev-badge--new { background: var(--ev-color-ink); }
.ev-badge--success { background: var(--ev-color-success-soft); color: var(--ev-color-success); }
.ev-badge--soft { background: var(--ev-color-brand-soft); color: var(--ev-color-brand); }

.ev-rating { display: inline-flex; align-items: center; gap: var(--ev-space-2); font-size: var(--ev-text-sm); color: var(--ev-color-text-muted); }
.ev-rating__stars { display: inline-flex; color: var(--ev-color-rating); }
.ev-rating__stars .ev-icon { width: 16px; height: 16px; }
.ev-rating__stars .ev-icon--off { color: var(--ev-color-border-strong); }

.ev-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--ev-space-2) var(--ev-space-3); }
.ev-price__current { font-weight: var(--ev-font-weight-bold); color: var(--ev-color-brand); font-size: var(--ev-text-lg); }
.ev-price__regular { color: var(--ev-color-text-muted); text-decoration: line-through; font-size: var(--ev-text-sm); }
.ev-price--lg .ev-price__current { font-size: var(--ev-text-price); line-height: 1; }
.ev-price--lg .ev-price__regular { font-size: var(--ev-text-lg); }
.ev-price__tax { flex-basis: 100%; font-size: var(--ev-text-xs); color: var(--ev-color-text-muted); }

.ev-stock { display: inline-flex; align-items: center; gap: var(--ev-space-2); font-size: var(--ev-text-sm); font-weight: var(--ev-font-weight-semibold); color: var(--ev-color-success); }
.ev-stock::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.ev-stock--low { color: var(--ev-color-warning); }
.ev-stock--out { color: var(--ev-color-text-muted); }

/* ---------- Contenuto editoriale (pagine e articoli senza Elementor) ---------- */
.ev-entry { padding-block: var(--ev-space-8) var(--ev-section-gap); }
.ev-entry__header { margin-bottom: var(--ev-space-6); }
.ev-entry__meta { font-size: var(--ev-text-sm); color: var(--ev-color-text-muted); margin-top: var(--ev-space-2); }
.ev-entry__content { max-width: 760px; }
.ev-entry__content > * + * { margin-top: var(--ev-space-4); }
.ev-entry__content :where(h2, h3, h4) { line-height: var(--ev-leading-tight); margin-top: var(--ev-space-8); }
.ev-entry__content :where(a) { color: var(--ev-color-brand); text-underline-offset: 3px; }
.ev-entry__content :where(img) { max-width: 100%; height: auto; border-radius: var(--ev-radius-md); }
.ev-entry__thumb { display: block; width: 100%; height: auto; border-radius: var(--ev-radius-lg); margin-bottom: var(--ev-space-6); }

.ev-post-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ev-space-6); margin: 0; padding: 0; list-style: none; }
.ev-post-card { display: grid; gap: var(--ev-space-2); }
.ev-post-card__thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--ev-radius-md); background: var(--ev-color-surface); }
.ev-post-card__title { margin: 0; font-size: var(--ev-text-lg); line-height: var(--ev-leading-tight); }
.ev-post-card__link { color: var(--ev-color-text); text-decoration: none; }
.ev-post-card__link:hover { color: var(--ev-color-brand); }

.ev-entry__content--wide { max-width: none; }

/* Breadcrumb (anche widget ev-breadcrumb) */
.ev-breadcrumb { font-size: var(--ev-text-xs); color: var(--ev-color-text-muted); padding-block: var(--ev-space-4); }
.ev-breadcrumb__list { display: flex; flex-wrap: wrap; gap: var(--ev-space-2); margin: 0; padding: 0; list-style: none; }
.ev-breadcrumb__item + .ev-breadcrumb__item::before { content: "›"; margin-right: var(--ev-space-2); color: var(--ev-color-border-strong); }
.ev-breadcrumb__link { color: var(--ev-color-text-muted); text-decoration: none; }
.ev-breadcrumb__link:hover { color: var(--ev-color-brand); text-decoration: underline; }

.ev-page-title { padding-block: var(--ev-space-6) var(--ev-space-4); }

.ev-404 { text-align: center; max-width: 720px; margin-inline: auto; padding-block: var(--ev-space-12); }
.ev-404__code { font-size: clamp(5rem, 3rem + 8vw, 9rem); font-weight: 800; line-height: 1; color: var(--ev-color-brand); margin: 0; }
.ev-404 .ev-text { margin-top: var(--ev-space-3); }
.ev-404 .ev-search { margin: var(--ev-space-6) auto; max-width: 560px; }
.ev-404__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--ev-space-3); }

.ev-skip-link { position: absolute; left: var(--ev-space-2); top: -100px; z-index: 3000; padding: var(--ev-space-2) var(--ev-space-4); background: var(--ev-color-ink); color: #fff; border-radius: var(--ev-radius-sm); }
.ev-skip-link:focus { top: var(--ev-space-2); }

@media (max-width: 1024px) { .ev-post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .ev-post-list { grid-template-columns: 1fr; } }
