/* ==========================================================================
   Milano Cosmetica — vetrina pubblica
   Design di riferimento: Reference/ (home, card prodotto, scheda prodotto).
   Layout desktop fino a 1440px (oltre si centra, cosi' le fotografie non vengono
   ingrandite oltre la loro risoluzione); varianti dedicate per mobile.
   ========================================================================== */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/poppins-300-ZrVH2EM.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-400-heQdAz3.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-500-AuPgurU.woff2") format("woff2"); }

:root {
    --font: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;

    --ink: #1d1d1d;
    --ink-soft: #4a4a4a;
    --muted: #7d7d7d;
    --faint: #b9b9b9;
    --line: #e4e4e4;
    --paper: #ffffff;
    --surface: #f2f2f2;
    --surface-strong: #ececec;
    --button-soft: #ecece8;
    --night: #1f1c1b;

    --pastel-blue: #d6eaec;
    --pastel-pink: #f7e0e6;
    --pastel-sand: #efe7dc;
    --pastel-green: #e2ede0;
    --accent: #cfe5e7;
    --accent-ink: #1f4d52;
    --whatsapp: #1fa855;
    --danger: #b3261e;
    --success: #2f6b3b;

    --radius-xl: 40px;
    --radius-lg: 32px;
    --radius-md: 20px;
    --radius-sm: 14px;

    --frame: clamp(8px, 1.2vw, 16px);
    --frame-max: 1440px;
    --content: 1120px;
    --gutter: clamp(16px, 4vw, 40px);
    --shadow-soft: 0 12px 40px rgba(0, 0, 0, .06);
    --shadow-float: 0 18px 50px rgba(20, 16, 14, .16);
    --ease: cubic-bezier(.2, .7, .2, 1);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.menu-open { overflow: hidden; }

body {
    margin: 0;
    font-family: var(--font);
    font-weight: 300;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: 400; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 200;
    background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
}
.skip-link:focus { top: 12px; }

.container { width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto; }

/* --- Animazioni ---------------------------------------------------------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes hero-zoom { from { transform: scale(1.04); } to { transform: scale(1); } }

/* Comparsa allo scroll: lo stato nascosto lo applica solo JavaScript (controller "reveal"). */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--reveal-delay, 0ms); }
.reveal.is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}

/* --- Header -------------------------------------------------------------- */
/* La barra ha il suo aspetto definitivo fin dal primo disegno della pagina (nessuna animazione
   al caricamento): contenitore in vetro grigio chiaro, fisso in alto, leggermente piu' stretto
   dell'hero e con la stessa distanza dallo sfondo in alto e ai lati. JavaScript (controller "header")
   aggiunge solo il bordo scuro dopo un po' di scroll. */
.header-slot { position: relative; z-index: 30; }
.header-slot--overlay { position: absolute; inset: 0 0 auto 0; }
.page-hero .header-slot--overlay { position: relative; min-height: 104px; }
.header-slot--solid { min-height: 120px; }

.site-header {
    --bar-inset: clamp(6px, 1.5vw, 20px);
    position: fixed; top: calc(var(--frame) + var(--bar-inset)); left: 0; right: 0; z-index: 60;
    display: flex; align-items: center; gap: clamp(20px, 3vw, 44px);
    width: calc(100% - 2 * (var(--frame) + var(--bar-inset))); max-width: calc(var(--frame-max) - 2 * var(--bar-inset)); margin-inline: auto;
    /* il contenuto resta allineato alla colonna della pagina */
    padding-inline: max(12px, calc(var(--gutter) - var(--frame) - var(--bar-inset)), calc((100% - var(--content)) / 2 - max(var(--frame) + var(--bar-inset), (100% - var(--frame-max)) / 2 + var(--bar-inset))));
    padding-block: 12px;
    border-radius: var(--radius-md);
    color: var(--ink);
    isolation: isolate;
}
/* Effetto vetro su un livello dietro il contenuto: un backdrop-filter sulla barra stessa renderebbe
   la barra il riferimento degli elementi "fixed" al suo interno (es. il menu mobile a tutto schermo). */
.site-header::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
    background: rgba(242, 242, 242, .62);
    -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
    box-shadow: 0 0 0 2px rgba(29, 29, 29, 0), 0 14px 36px -10px rgba(20, 16, 14, 0);
    transition: box-shadow .6s var(--ease-out);
}
/* dopo un po' di scroll compare il bordo scuro, che stacca la barra anche dalle pagine bianche */
.header-slot.is-stuck .site-header::before { box-shadow: 0 0 0 2px rgba(29, 29, 29, .12), 0 14px 36px -10px rgba(20, 16, 14, .16); }

.brand { flex: none; display: inline-flex; }
.brand img { height: 46px; width: auto; }

.main-nav { flex: 1; }
.main-nav ul { display: flex; gap: clamp(20px, 2.8vw, 40px); list-style: none; margin: 0; padding: 0; }
.main-nav a { position: relative; font-size: 16px; font-weight: 400; letter-spacing: .005em; white-space: nowrap; padding-block: 6px; }
.main-nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
    transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out);
}
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-button {
    display: inline-grid; place-items: center;
    width: 44px; height: 44px; border-radius: 50%;
    background: transparent; border: 0; cursor: pointer; color: inherit;
    transition: background-color .25s;
}
.icon-button:hover { background: rgba(29, 29, 29, .06); }
.icon-button svg { width: 20px; height: 20px; }

/* <details> usati come dropdown: ricerca, menu mobile, WhatsApp */
.dropdown { position: relative; }
.dropdown > summary, .mobile-menu > summary, .wa-dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker, .mobile-menu > summary::-webkit-details-marker, .wa-dropdown > summary::-webkit-details-marker { display: none; }
.search-panel {
    position: absolute; right: 0; top: calc(100% + 10px);
    width: min(380px, calc(100vw - 32px));
    padding: 10px; border-radius: var(--radius-md);
    background: #fff; color: var(--ink); box-shadow: var(--shadow-float);
    animation: pop-in .35s var(--ease-out);
}
.search-form { display: flex; gap: 6px; }
.search-form input {
    flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px;
    padding: 10px 16px; background: var(--surface);
}
.search-form button { flex: none; }

/* Menu mobile a tutto schermo (<details>, funziona anche senza JS) */
.mobile-menu { display: none; }
.menu-button { position: relative; z-index: 101; }
.menu-icon { display: grid; place-items: center; }
.menu-icon--close { display: none; }
.mobile-menu[open] .menu-icon--open { display: none; }
.mobile-menu[open] .menu-icon--close { display: grid; }
.mobile-menu[open] > summary { color: var(--ink); background: var(--surface); }
.mobile-panel {
    position: fixed; inset: 0; z-index: 100; overflow-y: auto;
    display: flex; flex-direction: column; gap: 28px;
    padding: 110px var(--gutter) 40px; background: #fff; color: var(--ink);
    animation: fade-in .3s ease;
}
.mobile-panel-brand { position: absolute; top: 22px; left: var(--gutter); }
.mobile-panel-brand img { height: 48px; width: auto; }
.mobile-nav { list-style: none; margin: 0; padding: 0; }
.mobile-nav li { animation: fade-up .5s var(--ease-out) both; }
.mobile-nav li:nth-child(2) { animation-delay: .04s; }
.mobile-nav li:nth-child(3) { animation-delay: .08s; }
.mobile-nav li:nth-child(4) { animation-delay: .12s; }
.mobile-nav li:nth-child(5) { animation-delay: .16s; }
.mobile-nav a { display: block; padding: 10px 0; font-size: 32px; line-height: 1.2; letter-spacing: -.02em; }
.mobile-nav a[aria-current="page"] { color: var(--muted); }
.mobile-search input { background: var(--surface); }
.mobile-panel-contacts { margin-top: auto; display: grid; gap: 10px; font-size: 15px; }
.mobile-panel-contacts a { display: inline-flex; align-items: center; gap: 10px; }
.mobile-panel-contacts svg { width: 20px; height: 20px; }

@media (max-width: 900px) {
    .header-slot--solid { min-height: 88px; }
    .page-hero .header-slot--overlay { min-height: 76px; }
    .site-header { gap: 12px; padding-block: 8px; border-radius: var(--radius-sm); }
    .brand img { height: 42px; }
    .main-nav { display: none; }
    .mobile-menu { display: block; }
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 10px 24px;
    border-radius: 999px; border: 1px solid transparent;
    font-size: 16px; font-weight: 400; line-height: 1.2;
    cursor: pointer; transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn:hover svg:last-child { transform: translateX(2px); }
.btn:active { transform: scale(.98); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .14); }
.btn--ghost-light { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn--ghost-light:hover { background: rgba(255, 255, 255, .14); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #3a3a3a; }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: #bcdcdf; }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--whatsapp { border-color: var(--whatsapp); color: #146c38; }
.btn--whatsapp:hover { background: var(--whatsapp); color: #fff; }
.btn--small { min-height: 38px; padding: 6px 16px; font-size: 14px; }

/* --- Hero home (slider con scroll-snap: senza JS si scorre a mano) -------- */
.hero {
    position: relative; margin: var(--frame) auto; width: calc(100% - 2 * var(--frame)); max-width: var(--frame-max);
    border-radius: var(--radius-xl); overflow: hidden; background: #8c6a55; color: #fff;
    /* proporzione vicina a quella delle foto (circa 2:1): riempie senza ingrandire troppo l'immagine */
    height: clamp(560px, 46vw, 660px);
}
.hero-track {
    position: absolute; inset: 0; display: flex; overflow-x: auto;
    scroll-snap-type: x mandatory; scrollbar-width: none;
}
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; display: flex; align-items: flex-end; overflow: hidden; }
.hero-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide > img.focus-cotton { object-position: 50% 62%; }
.hero-slide::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .4) 0%, rgba(0, 0, 0, .1) 55%, rgba(0, 0, 0, 0) 100%),
                linear-gradient(0deg, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0) 45%);
}
.hero-content {
    position: relative; z-index: 1;
    width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto;
    padding-bottom: clamp(48px, 7vw, 56px);
}
.hero-title {
    font-size: clamp(46px, 7vw, 96px); font-weight: 400; line-height: .98; letter-spacing: -.035em;
    margin-bottom: 30px; max-width: 11ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 18px; }
/* Ingresso morbido del testo e lieve zoom-out dell'immagine a ogni cambio di slide */
.hero-slide.is-active .hero-title { animation: fade-up 1s var(--ease-out) both; }
.hero-slide.is-active .hero-actions { animation: fade-up 1s var(--ease-out) .15s both; }
.hero-slide.is-active > img { animation: hero-zoom 9s ease-out both; }

.hero-dots {
    position: absolute; z-index: 2; right: max(var(--gutter), calc((100% - var(--content)) / 2 + 170px));
    /* centrata verticalmente sulla riga dei pulsanti (alti 48px) */
    bottom: calc(clamp(48px, 7vw, 56px) + 12px); display: flex; align-items: center; height: 24px; padding: 0 11px; overflow: hidden;
    border-radius: 999px; background: rgba(255, 255, 255, .22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero-dots ol, .rail-dots ol { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; margin: 0; padding: 0; list-style: none; }
.hero-dots li, .rail-dots li { display: flex; }
.hero-dots button { display: block; width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .55); cursor: pointer; transition: background-color .3s, transform .3s; }
.hero-dots button[aria-current="true"] { background: #fff; transform: scale(1.15); }
/* Avanzamento dell'autoplay: animazione CSS eseguita dal browser (fluida anche se la pagina e' occupata).
   Lo sfondo si riempie fino al cambio di slide e alla fine sfuma, senza azzerarsi di scatto. */
.carousel-progress {
    position: absolute; inset: 0; z-index: 0; background: rgba(255, 255, 255, .4);
    transform: scaleX(0); transform-origin: left center; will-change: transform, opacity;
}
.is-running > .carousel-progress { animation: carousel-progress var(--carousel-duration, 7s) linear forwards; }
.is-paused > .carousel-progress { animation-play-state: paused; }
@keyframes carousel-progress {
    0% { transform: scaleX(0); opacity: 1; }
    93% { transform: scaleX(1); opacity: 1; animation-timing-function: ease-out; }
    100% { transform: scaleX(1); opacity: 0; }
}

@media (max-width: 700px) {
    .hero { height: auto; min-height: 600px; border-radius: var(--radius-lg); }
    .hero-slide > img { object-position: 48% 50%; }
    .hero-content { padding-bottom: 76px; }
    .hero-title { margin-bottom: 22px; }
    .hero-actions { gap: 10px; }
    .hero-actions .btn { flex: 1 1 auto; }
    .hero-dots { right: auto; left: 50%; transform: translateX(-50%); bottom: 24px; }
}

/* --- Hero delle pagine interne (pattern "Account" delle reference) -------- */
.page-hero {
    position: relative; margin: var(--frame) auto; width: calc(100% - 2 * var(--frame)); max-width: var(--frame-max);
    border-radius: var(--radius-xl); overflow: hidden; color: #fff; background: #8c6a55;
    min-height: clamp(280px, 34vw, 360px);
    display: flex; flex-direction: column;
}
.page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: hero-zoom 9s ease-out both; }
.page-hero > img.focus-low { object-position: 50% 62%; }
.page-hero > img.focus-top { object-position: 50% 22%; }
.page-hero::after {
    content: ""; position: absolute; inset: 0;
    /* testo sempre bianco e leggibile: sfumatura scura da sinistra (dove sta il titolo) e dal basso */
    background: linear-gradient(90deg, rgba(20, 16, 14, .52) 0%, rgba(20, 16, 14, .26) 50%, rgba(20, 16, 14, .06) 85%),
                linear-gradient(0deg, rgba(0, 0, 0, .34), rgba(0, 0, 0, 0) 60%);
}
.page-hero-title, .page-hero-lead, .hero-title { text-shadow: 0 1px 20px rgba(0, 0, 0, .22); }
.page-hero--strong::after { background: linear-gradient(90deg, rgba(40, 24, 20, .62) 0%, rgba(40, 24, 20, .28) 60%, rgba(40, 24, 20, .12) 100%); }
.page-hero-content {
    position: relative; z-index: 1; margin-top: auto;
    width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto;
    padding-bottom: clamp(28px, 4vw, 40px);
}
.page-hero-title { font-size: clamp(40px, 6vw, 72px); line-height: 1; letter-spacing: -.03em; animation: fade-up 1s var(--ease-out) both; }
.page-hero-lead { margin: 12px 0 0; max-width: 52ch; font-size: 15px; opacity: .96; animation: fade-up 1s var(--ease-out) .12s both; }
@media (max-width: 700px) { .page-hero { border-radius: var(--radius-lg); min-height: 300px; } }

/* --- Breadcrumb ---------------------------------------------------------- */
.breadcrumb { margin-block: 26px 34px; font-size: 12px; font-weight: 400; color: var(--ink-soft); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "|"; margin-right: 6px; color: var(--faint); }
.breadcrumb a:hover { text-decoration: underline; }

/* --- Sections ------------------------------------------------------------ */
.section { margin-block: clamp(64px, 9vw, 120px); }
.section--tight { margin-block: clamp(40px, 6vw, 72px); }
.section-title { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.1; letter-spacing: -.02em; }
.section-title--spaced { margin-bottom: 26px; }
.section-title sup, .tab-link sup { font-size: 12px; font-weight: 300; vertical-align: super; margin-left: 4px; letter-spacing: 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.section-more { margin: 22px 0 0; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* Tab grandi delle categorie (home): link alle pagine categoria, potenziati da JS */
.category-tabs {
    display: flex; gap: clamp(20px, 3.4vw, 46px); white-space: nowrap;
    overflow-x: auto; scrollbar-width: none;
    /* Un'area a scorrimento orizzontale ritaglia anche in verticale: margine interno + margine negativo
       spostano il bordo di ritaglio fuori dal testo (lettere come "g" non vengono piu' tagliate)
       senza cambiare la posizione dei titoli. */
    padding: 8px 12px 18px; margin: -8px -12px 16px;
    scroll-padding-inline: 12px;
}
.category-tabs::-webkit-scrollbar { display: none; }
.tab-link {
    font-size: clamp(28px, 3.6vw, 48px); line-height: 1.15; letter-spacing: -.02em;
    color: var(--faint); transition: color .35s; background: none; border: 0; padding: 0; cursor: pointer;
}
.tab-link:hover, .tab-link[aria-selected="true"], .tab-link.is-active { color: var(--ink); }
.tab-panel[hidden] { display: none; }
.tab-panel:not([hidden]) { animation: fade-in .5s ease; }

/* --- Product card -------------------------------------------------------- */
.product-card {
    position: relative; display: flex; flex-direction: column; height: 100%;
    padding: 12px 12px 18px; border-radius: var(--radius-lg);
    background: #fff; box-shadow: 0 0 0 1px var(--line);
    transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.product-card:hover {
    transform: translateY(-4px);
    /* ombra delicata e poco estesa */
    box-shadow: 0 0 0 1px rgba(29, 29, 29, .12), 0 8px 18px -6px rgba(20, 16, 14, .08);
}
.product-card-media {
    aspect-ratio: 1 / 1; display: grid; place-items: center; margin-bottom: 16px;
    border-radius: var(--radius-md); overflow: hidden; background: var(--surface);
}
.product-card-media img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding-inline: 8px; }
.product-card-category { font-size: 11px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.product-card-name { font-size: 14px; font-weight: 400; line-height: 1.35; margin: 0; }
.product-card-name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.product-card-name a:focus-visible { outline: none; }
.product-card:has(a:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.product-card-size { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding: 20px 4px 0 8px; }
.price { font-size: 22px; font-weight: 300; letter-spacing: -.01em; }
.price--muted { font-size: 14px; color: var(--muted); }
.card-cta { font-size: 14px; font-weight: 400; color: var(--ink-soft); }
.card-plus {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
    background: var(--button-soft); transition: background-color .35s, color .35s;
}
.card-plus svg { width: 16px; height: 16px; transition: transform .45s var(--ease-out); }
.product-card:hover .card-plus { background: var(--ink); color: #fff; }
.product-card:hover .card-plus svg { transform: rotate(90deg); }
.product-card:hover .card-plus--open svg { transform: translateX(2px); }

.image-placeholder { width: 100%; height: 100%; min-height: 160px; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--faint); font-size: 12px; background: var(--surface-strong); }
.image-placeholder svg { width: 36px; height: 36px; }

/* --- Rail orizzontale (scroll-snap) ------------------------------------- */
.rail {
    list-style: none;
    /* spazio interno per sollevamento e ombre delle card, compensato dal margine negativo:
       le card restano allineate alla colonna ma non vengono piu' ritagliate */
    /* lo spazio laterale non supera il margine della pagina, altrimenti il rail sborderebbe dallo schermo */
    --rail-bleed: min(20px, var(--gutter));
    padding: 16px var(--rail-bleed) 36px; margin: -16px calc(-1 * var(--rail-bleed)) -30px;
    scroll-padding-inline: var(--rail-bleed);
    display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3);
    gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail:focus-visible { outline-offset: 6px; }
.rail-dots { display: flex; justify-content: center; margin-top: 26px; }
.rail-dots ol { height: 22px; padding: 0 10px; border-radius: 999px; background: var(--surface); }
.rail-dots button { display: block; width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: #c9c9c9; cursor: pointer; transition: background-color .3s; }
.rail-dots button[aria-current="true"] { background: var(--ink); }
@media (max-width: 900px) { .rail { grid-auto-columns: calc((100% - 16px) / 2); } }
@media (max-width: 600px) { .rail { grid-auto-columns: 72%; gap: 12px; } }

/* --- Griglia catalogo ---------------------------------------------------- */
.product-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

.catalog-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 16px; white-space: nowrap;
    border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 400;
    transition: background-color .3s, color .3s;
}
.chip:hover { background: var(--surface-strong); }
.chip[aria-current="page"] { background: var(--ink); color: #fff; }
.chip small { font-size: 11px; opacity: .65; }
.catalog-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field-inline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.input, .select {
    min-height: 40px; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 6px 16px; font-size: 14px;
}
.select { padding-right: 34px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.results-count { font-size: 13px; color: var(--muted); margin: 0 0 18px; }

.empty-state { text-align: center; padding: 64px 24px; border-radius: var(--radius-lg); background: var(--surface); }
.empty-state h2 { font-size: 26px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); }

@media (max-width: 640px) {
    /* griglia (non flex column + wrap: la riga si dimensionerebbe sui chip e sborderebbe) */
    .catalog-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .catalog-toolbar nav { min-width: 0; margin-inline: calc(-1 * var(--gutter)); }
    .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-inline: var(--gutter); }
    .chips::-webkit-scrollbar { display: none; }
    .catalog-filters { display: grid; grid-template-columns: 1fr auto; }
    .catalog-filters .input { grid-column: 1 / -1; }
    /* griglia a 2 colonne con card compatte */
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .product-grid .product-card { padding: 8px 8px 12px; border-radius: var(--radius-md); }
    .product-grid .product-card-media { border-radius: 14px; margin-bottom: 10px; }
    .product-grid .product-card-body { padding-inline: 4px; }
    .product-grid .product-card-footer { padding-inline: 4px 0; }
    .product-grid .product-card-name { font-size: 13px; }
    .product-grid .product-card-category { font-size: 10px; }
    .product-grid .product-card-footer { padding-top: 12px; }
    .product-grid .price { font-size: 17px; }
    .product-grid .card-plus { width: 36px; height: 36px; border-radius: 12px; }
}

/* --- Editoriale ("Curated Conscious Beauty") ------------------------------ */
.editorial-title { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.04; letter-spacing: -.035em; margin-bottom: clamp(32px, 4vw, 52px); }
.editorial-layout {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px clamp(32px, 6vw, 96px);
    align-items: center;
}
.editorial-copy .editorial-title { margin-bottom: clamp(24px, 3vw, 36px); }
.editorial-text { font-size: 17px; line-height: 1.6; color: var(--ink-soft); max-width: 46ch; }
.editorial-text p { margin: 0 0 1em; }
.editorial-text p:last-child { margin: 1.4em 0 0; }
.arch-figure { margin: 0; }
@media (max-width: 760px) {
    .editorial-layout { grid-template-columns: 1fr; }
    .editorial-text { font-size: 16px; max-width: none; }
}

.arch {
    margin: 0; border-radius: 46% 46% var(--radius-xl) var(--radius-xl) / 58% 58% var(--radius-xl) var(--radius-xl);
    /* stesse proporzioni della foto (1200x580): viene solo rimpicciolita, mai ingrandita */
    overflow: hidden; aspect-ratio: 1200 / 580; background: var(--surface);
}
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.arch-caption { margin: 16px auto 0; max-width: 60ch; font-size: 13px; color: var(--muted); text-align: center; }
@media (max-width: 700px) {
    /* su mobile un formato piu' orizzontale e un arco morbido: la foto (panoramica) resta leggibile */
    .arch:not(.arch--portrait) { aspect-ratio: 5 / 4; border-radius: 50% 50% var(--radius-md) var(--radius-md) / 26% 26% var(--radius-md) var(--radius-md); }
    .arch.arch--portrait { border-radius: var(--radius-lg); }
    .arch img { object-position: 58% 30%; }
}

/* --- Card dei valori (pastello) ------------------------------------------ */
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.value-card { border-radius: var(--radius-lg); padding: 26px 24px 30px; min-height: 210px; transition: transform .5s var(--ease-out); }
.value-card:hover { transform: translateY(-3px); }
.value-card h3 { font-size: 30px; font-weight: 400; text-transform: lowercase; letter-spacing: -.02em; margin-bottom: 14px; }
.value-card p { font-size: 13px; line-height: 1.5; margin: 0; color: var(--ink-soft); }
.value-card--blue { background: var(--pastel-blue); }
.value-card--pink { background: var(--pastel-pink); }
.value-card--sand { background: var(--pastel-sand); }
.value-card--green { background: var(--pastel-green); }
@media (max-width: 700px) {
    .value-grid { grid-auto-flow: column; grid-auto-columns: 78%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
    .value-grid::-webkit-scrollbar { display: none; }
    .value-card { scroll-snap-align: start; min-height: 180px; }
}

/* --- Instagram / laboratorio --------------------------------------------- */
.insta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.insta-grid a { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5; display: block; background: var(--surface); }
.insta-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.insta-grid a:hover img { transform: scale(1.05); }
@media (max-width: 800px) { .insta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .insta-grid a { border-radius: var(--radius-md); } }

/* --- Scheda prodotto ----------------------------------------------------- */
.product-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .product-layout { grid-template-columns: 1fr; } }

.gallery {
    display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: center;
    background: var(--surface); border-radius: var(--radius-xl); padding: 18px; min-height: 420px;
}
.gallery--single { grid-template-columns: 1fr; }
.gallery-thumbs { display: flex; flex-direction: column; gap: 10px; padding: 8px; border-radius: 22px; background: #fff; list-style: none; margin: 0; }
.gallery-thumbs a, .gallery-thumbs button {
    display: block; width: 100%; aspect-ratio: 1; padding: 0; border-radius: 12px; overflow: hidden;
    border: 1px solid transparent; background: var(--surface); cursor: pointer; transition: border-color .3s, opacity .3s;
}
.gallery-thumbs [aria-current="false"] { opacity: .7; }
.gallery-thumbs [aria-current="true"] { border-color: var(--ink); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main { aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--radius-lg); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; animation: fade-in .5s ease; }
@media (max-width: 520px) {
    .gallery { grid-template-columns: 1fr; min-height: 0; padding: 12px; border-radius: var(--radius-lg); }
    .gallery-thumbs { flex-direction: row; order: 2; justify-content: center; }
    .gallery-thumbs li { width: 56px; }
}

.product-info { padding-top: 6px; }
.product-category { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.product-category a:hover { text-decoration: underline; }
.product-title { font-size: clamp(28px, 3vw, 38px); line-height: 1.15; letter-spacing: -.02em; margin-bottom: 14px; }
.product-short { color: var(--ink-soft); margin-bottom: 22px; }
.product-price { font-size: 28px; font-weight: 300; margin-bottom: 22px; }
.product-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.product-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--muted); list-style: none; padding: 0; margin: 0; }
.product-meta li { display: inline-flex; align-items: center; gap: 6px; }
.product-meta svg { width: 16px; height: 16px; }
@media (max-width: 520px) { .product-cta .btn { flex: 1 1 100%; } }

.detail-tabs { display: flex; flex-wrap: wrap; gap: 6px clamp(18px, 3vw, 34px); margin: 26px 0 22px; }
.detail-tabs .tab-link { font-size: clamp(22px, 2.4vw, 28px); }
.detail-panel h2 { font-size: 15px; font-weight: 400; margin-bottom: 14px; }
.detail-panel p { font-size: 14px; color: var(--ink-soft); max-width: 72ch; }
.detail-panel + .detail-panel { margin-top: 30px; }
.detail-panel[role="tabpanel"] + .detail-panel { margin-top: 0; }
.detail-panel[role="tabpanel"]:not([hidden]) { animation: fade-in .4s ease; }

.features { margin-top: 34px; max-width: 520px; }
.features h3 { font-size: 15px; font-weight: 400; margin-bottom: 12px; }
.features dl { margin: 0; display: grid; gap: 6px; }
.features div { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.features dt { color: var(--muted); flex: none; }
.features dd { margin: 0; flex: none; }
.features .leader { flex: 1; border-bottom: 1px dotted var(--faint); transform: translateY(-4px); }

/* --- Pagine informative -------------------------------------------------- */
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 5vw, 80px); }
@media (max-width: 760px) { .two-columns { grid-template-columns: 1fr; } }
.lead { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.5; }

.split-card { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius-xl); overflow: hidden; background: var(--surface); }
.split-card > img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.split-card > img.split-card-portrait { object-position: 50% 28%; min-height: 460px; }
.split-card--reverse > img { order: 2; }
.split-card-body { padding: clamp(28px, 5vw, 56px); display: flex; flex-direction: column; justify-content: center; }
.split-card .section-title { margin-bottom: 20px; }
.split-card-body p:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
    .split-card { grid-template-columns: 1fr; border-radius: var(--radius-lg); }
    .split-card > img, .split-card > img.split-card-portrait { min-height: 0; aspect-ratio: 4 / 3; height: auto; }
    .split-card--reverse > img { order: 0; }
}

.check-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; }
.check-list svg { flex: none; width: 18px; height: 18px; margin-top: 3px; }

/* --- Contatti e form ----------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-cards { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0 0 28px; }
.contact-cards li { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--radius-md); background: var(--surface); }
.contact-cards .icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; flex: none; }
.contact-cards svg { width: 18px; height: 18px; }
.contact-cards small { display: block; font-size: 12px; color: var(--muted); }
.contact-cards a { border-bottom: 1px solid currentColor; word-break: break-word; }

.form-card { background: #fff; border-radius: var(--radius-xl); padding: clamp(22px, 4vw, 40px); box-shadow: 0 0 0 1px var(--line), var(--shadow-soft); }
.form-card h2 { font-size: 30px; margin-bottom: 6px; }
.form-card .form-intro { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 13px; font-weight: 400; margin-bottom: 6px; }
.form-row input[type="text"], .form-row input[type="email"], .form-row input[type="number"], .form-row input[type="url"], .form-row input[type="tel"], .form-row input[type="password"],
.form-row textarea, .form-row select {
    width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
    padding: 12px 16px; font-size: 15px; transition: border-color .25s, background-color .25s, box-shadow .25s;
}
.form-row textarea { min-height: 150px; resize: vertical; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(29, 29, 29, .06); }
.form-row ul { list-style: none; padding: 0; margin: 6px 0 0; color: var(--danger); font-size: 13px; }
.form-row--check { display: flex; gap: 10px; align-items: flex-start; }
.form-row--check label { margin: 0; }
.form-help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-errors { color: var(--danger); }

/* --- Flash --------------------------------------------------------------- */
.flash { padding: 14px 20px; margin-bottom: 20px; border-radius: var(--radius-md); font-size: 14px; animation: fade-up .5s var(--ease-out); }
.flash-success { background: #e6f2e7; color: var(--success); }
.flash-error { background: #fbe9e8; color: var(--danger); }

/* --- Footer: un unico blocco scuro che contiene tutto -------------------- */
.site-footer {
    margin: clamp(80px, 10vw, 140px) auto var(--frame); width: calc(100% - 2 * var(--frame)); max-width: var(--frame-max);
    border-radius: var(--radius-xl); background: var(--night); color: #f3efec;
    box-shadow: 0 -24px 60px rgba(0, 0, 0, .08);
}
.footer-inner {
    width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 32px 56px;
    padding-block: clamp(48px, 6vw, 72px) clamp(20px, 3vw, 28px);
}
.footer-brand { display: flex; flex-direction: column; gap: 32px; }
.footer-logo img { height: clamp(130px, 12vw, 170px); width: auto; }
.footer-claim { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.2; letter-spacing: -.02em; margin: 0; color: #fff; max-width: 16ch; }
.footer-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) max-content; gap: 24px 32px; align-self: end; }
.footer-col h2 { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 18px; color: #a59d97; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; color: #e6e0db; }
.footer-col a { transition: color .25s; }
.footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-contacts a { display: inline-flex; gap: 10px; align-items: flex-start; }
.footer-contacts a[href^="mailto:"] { white-space: nowrap; }
.footer-contacts svg { flex: none; width: 17px; height: 17px; margin-top: 3px; opacity: .8; }
.footer-legal {
    grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px;
    margin-top: clamp(12px, 3vw, 28px); padding: 14px 20px; border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .05); font-size: 12px; color: #a59d97;
}
@media (max-width: 760px) {
    .site-footer { border-radius: var(--radius-lg); }
    .footer-inner { grid-template-columns: 1fr; gap: 28px; padding-block: 40px 16px; }
    .footer-brand { flex-direction: row; align-items: center; gap: 20px; }
    .footer-logo img { height: 96px; }
    .footer-claim { font-size: 21px; }
    .footer-col--categories { display: none; }
    .footer-columns { grid-template-columns: 1fr; }
    .footer-legal { flex-direction: column; text-align: center; align-items: center; margin-top: 4px; }
}

/* --- WhatsApp: "Hai bisogno di aiuto?" ----------------------------------- */
.wa-widget {
    position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 80;
    animation: fade-up .8s var(--ease-out) 1.2s both;
}
.wa-button {
    display: flex; align-items: center; gap: 12px; padding: 8px 20px 8px 8px; cursor: pointer;
    border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px;
    box-shadow: var(--shadow-float), 0 0 0 1px rgba(0, 0, 0, .04);
    transition: transform .35s var(--ease-out), box-shadow .35s;
}
.wa-button:hover { transform: translateY(-2px); box-shadow: 0 22px 60px rgba(20, 16, 14, .22); }
.wa-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--whatsapp); color: #fff; }
.wa-icon svg { width: 24px; height: 24px; }
.wa-label strong { font-weight: 500; }
.wa-dropdown { position: relative; }
.wa-dropdown[open] .wa-button { box-shadow: 0 0 0 2px var(--whatsapp), var(--shadow-float); }
.wa-panel {
    position: absolute; right: 0; bottom: calc(100% + 12px); width: min(320px, calc(100vw - 32px));
    padding: 18px; border-radius: var(--radius-md); background: #fff; color: var(--ink);
    box-shadow: var(--shadow-float), 0 0 0 1px rgba(0, 0, 0, .04); animation: pop-in .35s var(--ease-out);
}
.wa-panel-title { font-size: 16px; font-weight: 500; margin: 0 0 2px; }
.wa-panel-text { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.wa-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wa-panel a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); transition: background-color .25s; }
.wa-panel a:hover { background: var(--surface); }
.wa-panel a > span:nth-child(2) { flex: 1; display: grid; font-size: 14px; }
.wa-panel strong { font-weight: 400; }
.wa-panel small { color: var(--muted); font-size: 12px; }
.wa-panel a > svg { width: 16px; height: 16px; color: var(--muted); }
/* Posizione del pannello di scelta fuori dal pulsante fisso (scheda prodotto, footer) */
.wa-dropdown--below .wa-panel { top: calc(100% + 10px); bottom: auto; }
.wa-dropdown--start .wa-panel { left: 0; right: auto; }
.product-cta .wa-panel, .footer-contacts .wa-panel { z-index: 30; }
.footer-contacts .wa-dropdown > summary { cursor: pointer; }
.footer-wa { display: inline-flex; gap: 10px; align-items: flex-start; }
.footer-contacts .wa-panel { color: var(--ink); }
.footer-contacts .wa-panel a { display: flex; gap: 12px; align-items: center; color: var(--ink); }
.footer-contacts .wa-panel svg { margin-top: 0; opacity: 1; }
.product-cta .wa-dropdown { display: flex; }
@media (max-width: 520px) { .product-cta .wa-dropdown { flex: 1 1 100%; } .product-cta .wa-dropdown .btn { flex: 1; } }
.wa-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #e7f6ec; color: #146c38; font-weight: 500; }
@media (max-width: 600px) {
    .wa-button { padding: 6px; }
    .wa-label { display: none; }
    .wa-icon { width: 50px; height: 50px; }
}
html.menu-open .wa-widget { display: none; }

/* --- Pagine di errore ---------------------------------------------------- */
.error-page { padding-block: clamp(24px, 4vw, 48px) clamp(8px, 2vw, 24px); }
.error-card {
    max-width: 760px; margin-inline: auto; text-align: center;
    padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 56px);
    border-radius: var(--radius-xl); background: var(--surface);
    animation: fade-up .8s var(--ease-out) both;
}
.error-code {
    margin: 0 0 4px; font-size: clamp(96px, 18vw, 180px); font-weight: 300; line-height: .9;
    letter-spacing: -.06em; color: #dcdcdc;
}
.error-title { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.15; letter-spacing: -.02em; margin-bottom: 14px; }
.error-message { max-width: 48ch; margin: 0 auto 28px; color: var(--ink-soft); }
.error-search { max-width: 460px; margin: 0 auto 22px; }
.error-search input { background: #fff; }
.error-search .btn svg { width: 16px; height: 16px; }
.error-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.error-categories { margin-top: 36px; }
.error-categories p { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.error-categories .chips { justify-content: center; flex-wrap: wrap; overflow: visible; padding-inline: 0; }
.error-categories .chip { background: #fff; }
.error-categories .chip:hover { background: var(--surface-strong); }
.error-contacts { margin: 28px 0 0; font-size: 14px; color: var(--muted); }
.error-contacts a { color: var(--ink); border-bottom: 1px solid currentColor; }
@media (max-width: 520px) { .error-actions .btn { flex: 1 1 100%; } }
/* Spazio sotto il footer su mobile, cosi' il pulsante WhatsApp non copre i contenuti */
@media (max-width: 600px) { body:has(.wa-widget) .site-footer { margin-bottom: 84px; } }

/* --- Fila scorrevole: frecce ai lati e sfumature (controller "scroller") ------------- */
.scroller { position: relative; }
.scroller-button {
    position: absolute; top: 50%; z-index: 2; translate: 0 -50%;
    display: grid; place-items: center; width: 42px; height: 42px; padding: 0;
    border: 0; border-radius: 50%; cursor: pointer; color: var(--ink);
    background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(20, 16, 14, .08);
    opacity: 0; pointer-events: none; transition: opacity .3s ease, background-color .25s, scale .25s var(--ease);
}
.scroller-button svg { width: 18px; height: 18px; }
.scroller-button--prev { left: 0; }
.scroller-button--prev svg { rotate: 180deg; }
.scroller-button--next { right: 0; }
.scroller-button:hover { background: #fff; scale: 1.06; }
.scroller.can-prev .scroller-button--prev, .scroller.can-next .scroller-button--next { opacity: 1; pointer-events: auto; }
/* le tab hanno spazio interno in basso: le frecce si centrano sul testo */
.scroller--tabs .scroller-button { top: calc(50% - 13px); }

/* sfumatura sui lati da cui c'e' altro contenuto */
.scroller [data-scroller-target="track"] { --fade-prev: 0px; --fade-next: 0px; }
.scroller.can-prev [data-scroller-target="track"] { --fade-prev: 56px; }
.scroller.can-next [data-scroller-target="track"] { --fade-next: 56px; }
.scroller.can-prev [data-scroller-target="track"], .scroller.can-next [data-scroller-target="track"] {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-prev), #000 calc(100% - var(--fade-next)), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-prev), #000 calc(100% - var(--fade-next)), transparent 100%);
}
/* su touch si scorre con il dito: frecce nascoste, restano le sfumature */
@media (hover: none) { .scroller-button { display: none; } }

/* Immagine verticale (sezione Eccellenza): stessi angoli arrotondati in alto e in basso */
.arch.arch--portrait {
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-xl);
}
.arch.arch--portrait img { object-position: 50% 22%; }

/* --- Immagini piu' strette del contenitore: nitide alla loro larghezza reale ---------
   La foto resta a destra alla sua risoluzione (photo-max-N) e sfuma verso sinistra su una copia
   molto sfocata della stessa immagine, che riempie lo spazio restante senza che si noti l'ingrandimento. */
.hero-slide > img.photo-backdrop, .page-hero > img.photo-backdrop {
    position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px);
    object-fit: cover; filter: blur(36px) saturate(1.1); opacity: .95; animation: none !important;
}
.hero-slide > img.photo-contained, .page-hero > img.photo-contained {
    position: absolute; top: 0; right: 0; left: auto; height: 100%;
    object-fit: cover; animation: none !important;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%);
    mask-image: linear-gradient(90deg, transparent 0, #000 22%);
}
img.photo-contained.photo-max-768 { width: min(100%, 768px); }
img.photo-contained.photo-max-1200 { width: min(100%, 1200px); }
img.photo-contained.photo-max-1254 { width: min(100%, 1254px); }
.page-hero > img.photo-contained.focus-face { object-position: 55% 28%; }
/* nelle slide il contenuto resta sopra le due immagini */
.hero-slide > .photo-backdrop, .hero-slide > .photo-contained { z-index: 0; }

/* Testata chiara (immagine con sfondo chiaro): testo scuro */
/* Testata con immagine chiara: testo bianco anche qui, con una sfumatura scura un po' piu' decisa */
.page-hero--light { color: #fff; background: #8c7d74; }
.page-hero--light::after { background: linear-gradient(90deg, rgba(20, 16, 14, .62) 0%, rgba(20, 16, 14, .34) 50%, rgba(20, 16, 14, .1) 85%), linear-gradient(0deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0) 60%); }

/* --- Dati da WooCommerce: formati, disponibilita' e testi ------------------- */
.product-formats { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.product-format { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.product-format-label { font-weight: 500; }
.product-format-price { margin-left: auto; }
.product-format small { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.product-format.is-out { color: var(--muted); }
.stock-badge { display: inline-block; margin: 4px 0 0; padding: 2px 10px; border-radius: 999px; background: #fbe9e8; color: var(--danger); font-size: 12px; }
.product-meta .is-out { color: var(--danger); }
.detail-text > * + * { margin-top: .8em; }
.detail-text h3, .detail-text h4 { font-size: 16px; font-weight: 500; margin-top: 1.2em; }
.detail-text ul, .detail-text ol { padding-left: 20px; }

/* --- Pagina 404 (uguale nel catalogo e nell'e-commerce): testo a sinistra, foto ad arco a destra --- */
.error-card--split {
    max-width: none; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 32px clamp(32px, 6vw, 80px); align-items: center; text-align: left;
    padding: clamp(28px, 5vw, 64px);
}
.error-card--split .error-code { font-size: clamp(88px, 12vw, 150px); color: #d7d2cd; }
.error-card--split .error-message, .error-card--split .error-search { margin-left: 0; }
.error-card--split .error-actions, .error-card--split .error-categories .chips { justify-content: flex-start; }
.error-figure { margin: 0; }
.error-figure .arch { max-width: 420px; margin-inline: auto; }
.error-figure img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
    .error-card--split { grid-template-columns: 1fr; text-align: center; }
    .error-figure { order: -1; }
    .error-figure .arch { max-width: 220px; }
    .error-card--split .error-message, .error-card--split .error-search { margin-inline: auto; }
    .error-card--split .error-actions, .error-card--split .error-categories .chips { justify-content: center; }
}

/* --- Frecce sulle file di prodotti (home): centrate sulle card, appena fuori dalla colonna, senza sfumatura --- */
.scroller--rail .scroller-button { top: calc(50% - 32px); }
.scroller--rail .scroller-button--prev { left: -18px; }
.scroller--rail .scroller-button--next { right: -18px; }
.scroller.scroller--rail [data-scroller-target="track"], .scroller.scroller--rail [data-scroller-track] { -webkit-mask-image: none; mask-image: none; }
@media (max-width: 1220px) {
    .scroller--rail .scroller-button--prev { left: 6px; }
    .scroller--rail .scroller-button--next { right: 6px; }
}

/* --- Angoli "concentrici": un elemento dentro un riquadro ha il raggio del riquadro meno lo spazio che li separa ---
   (curve parallele; su mobile i raggi si riducono insieme agli spazi) */

/* Barra in alto sopra la testata con immagine */
@media (max-width: 900px) { .site-header { border-radius: calc(var(--radius-xl) - var(--bar-inset)); } }
@media (max-width: 700px) { .site-header { border-radius: calc(var(--radius-lg) - var(--bar-inset)); } }

/* Galleria della scheda prodotto: foto e miniature dentro il riquadro grigio */
.gallery-main { border-radius: calc(var(--radius-xl) - 18px); }
@media (max-width: 520px) {
    .gallery-main { border-radius: calc(var(--radius-lg) - 12px); }
    .gallery-thumbs { border-radius: calc(var(--radius-lg) - 12px); }
}

/* Card prodotto su mobile: stessi raggi nella griglia e nelle file della home */
@media (max-width: 640px) {
    .product-grid .product-card-media { border-radius: calc(var(--radius-md) - 8px); }
}
@media (max-width: 600px) {
    .rail .product-card { padding: 10px 10px 14px; border-radius: 24px; }
    .rail .product-card-media { border-radius: 14px; margin-bottom: 12px; }
}

/* Riquadri grandi su mobile: raggi piu' contenuti (40px su uno schermo stretto sono troppi) */
@media (max-width: 760px) {
    .form-card, .error-card { border-radius: var(--radius-lg); }
    .form-row input[type="text"], .form-row input[type="email"], .form-row textarea { border-radius: var(--radius-sm); }
    .contact-cards li { border-radius: var(--radius-md); }
}

/* Pagina 404 su mobile: la ricerca e i pulsanti restano dentro il riquadro */
.error-card--split { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
@media (max-width: 760px) {
    .error-card--split { grid-template-columns: minmax(0, 1fr); padding: 28px 20px; }
    .error-card--split .error-search { width: 100%; max-width: 100%; }
    .error-card--split .error-search input { min-width: 0; }
    .error-card--split .error-actions .btn { flex: 1 1 100%; }
}
