/* =========================================================
   WoodenCasa — Design system (v2 — redesign + animazioni 3D)
   ========================================================= */

@font-face { font-family: 'Outfit'; src: url('../fonts/Outfit-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Outfit'; src: url('../fonts/Outfit-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('../fonts/InstrumentSans-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('../fonts/InstrumentSans-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('../fonts/InstrumentSans-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Crimson Pro'; src: url('../fonts/CrimsonPro-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Crimson Pro'; src: url('../fonts/CrimsonPro-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --walnut: #4A3222;
  --walnut-dark: #2E1E14;
  --walnut-deeper: #1D130C;
  --walnut-light: #6B4A32;
  --sage: #7C8B5E;
  --sage-light: #A9B58C;
  --sage-dark: #5E6B45;
  --cream: #FAF6EF;
  --cream-dark: #F0E7D8;
  --cream-darker: #E4D8C3;
  --ink: #2A1F17;
  --white: #FFFFFF;
  --whatsapp: #25D366;
  --whatsapp-dark: #1DA851;
  --gold: #C9962C;
  --gold-dark: #A67A1E;
  --gold-light: #E8CC8A;

  --font-heading: 'Outfit', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-accent: 'Crimson Pro', Georgia, serif;

  --container: 1240px;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 10px rgba(29, 19, 12, 0.06);
  --shadow: 0 6px 20px rgba(29, 19, 12, 0.07), 0 1px 3px rgba(29, 19, 12, 0.06);
  --shadow-lg: 0 20px 56px rgba(29, 19, 12, 0.16), 0 4px 14px rgba(29, 19, 12, 0.08);
  --shadow-tilt: 0 30px 70px -12px rgba(29, 19, 12, 0.32), 0 8px 20px rgba(29, 19, 12, 0.1);
  --ring: inset 0 0 0 1px rgba(74, 50, 34, 0.06);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --perspective: 1400px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
[id] { scroll-margin-top: 100px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  /* Trama sottilissima di grana per una resa piu' materica, coerente col legno */
  background-image:
    radial-gradient(1200px 600px at 12% -10%, rgba(124, 139, 94, 0.05), transparent 60%),
    radial-gradient(1000px 700px at 110% 10%, rgba(201, 150, 44, 0.05), transparent 55%);
  background-attachment: fixed;
}
html.lenis, html.lenis body { height: auto; }
/* FIX: la regola richiedeva anche la classe "lenis-smooth", mai impostata dal
   JS (che aggiunge solo "lenis") — di conseguenza lo scroll-behavior:smooth
   nativo del browser restava attivo INSIEME allo smooth-scroll via JS di
   Lenis, cioe' due sistemi di scroll "smooth" che si accavallavano e
   competevano sulla stessa interazione: la causa concreta dello scroll
   lento/scattoso segnalato. Ora la regola scatta con la sola classe "lenis". */
html.lenis { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes page-fade-in { from { opacity: 0; } to { opacity: 1; } }
  body { animation: page-fade-in 0.45s var(--ease-soft); }
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--walnut);
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.85rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; line-height: 1.55; color: #6b5c4c; max-width: 640px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; position: relative; }
.section { padding: 104px 0; position: relative; }
.section--tight { padding: 68px 0; }
.section--sage { background: linear-gradient(160deg, var(--sage) 0%, var(--sage-dark) 100%); color: var(--white); }
.section--sage h2, .section--sage h3 { color: var(--white); }
.section--walnut { background: linear-gradient(165deg, var(--walnut) 0%, var(--walnut-dark) 75%, var(--walnut-deeper) 130%); color: var(--cream); }
.section--walnut h2, .section--walnut h3 { color: var(--white); }
.section--cream-dark { background: var(--cream-dark); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 14px;
  position: relative;
  padding-left: 22px;
}
.eyebrow::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 14px; height: 2px; background: var(--gold);
}
.section--sage .eyebrow, .section--walnut .eyebrow { color: var(--cream-darker); }
.section--sage .eyebrow::before, .section--walnut .eyebrow::before { background: var(--gold-light); }

.text-center { text-align: center; margin-left: auto; margin-right: auto; }
.text-center .eyebrow::before { display: none; }
.text-center .eyebrow { padding-left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 15px 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s var(--ease-soft), color 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft);
  white-space: nowrap;
}
.btn::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,0.35) 40%, transparent 60%);
  transform: translateX(-120%); transition: transform 0.7s var(--ease);
}
@media (prefers-reduced-motion: no-preference) {
  .btn:hover::before { transform: translateX(120%); }
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(0.97); transition-duration: 0.12s; }
.btn:focus-visible { outline: 2px solid var(--sage-dark); outline-offset: 3px; }
.btn-primary { background: linear-gradient(135deg, var(--walnut) 0%, var(--walnut-light) 130%); color: var(--white); box-shadow: 0 6px 20px rgba(29,19,12,0.22), 0 2px 6px rgba(29,19,12,0.14); }
.btn-primary:hover { background: linear-gradient(135deg, var(--walnut-dark) 0%, var(--walnut) 130%); box-shadow: var(--shadow-lg); }
.btn-outline { background: transparent; color: var(--walnut); border-color: var(--walnut); }
.btn-outline:hover { background: var(--walnut); color: var(--white); box-shadow: 0 10px 26px rgba(29,19,12,0.18); }
.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn-outline-light:hover { background: var(--white); color: var(--walnut); }
.btn-whatsapp { background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-dark) 130%); color: var(--white); box-shadow: 0 6px 20px rgba(37,211,102,0.28); }
.btn-whatsapp:hover { box-shadow: 0 12px 30px rgba(37,211,102,0.4); }
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }
.btn-block { width: 100%; justify-content: center; }

.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--sage-dark); outline-offset: 2px; border-radius: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 246, 239, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(74,50,34,0.08);
  transition: box-shadow 0.3s var(--ease-soft), background 0.3s var(--ease-soft);
}
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(29,19,12,0.08); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.brand { display: flex; align-items: center; }
.brand img { height: 34px; transition: transform 0.4s var(--ease); }
.brand:hover img { transform: scale(1.03); }
.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a {
  font-family: var(--font-heading); font-weight: 600; font-size: 0.96rem;
  color: var(--walnut); position: relative; padding: 6px 0;
  transition: color 0.25s var(--ease-soft);
}
.main-nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--sage);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.main-nav a.active::after, .main-nav a:hover::after { transform: scaleX(1); }

/* ---------- Nav dropdown (Le nostre case → categorie) ---------- */
.nav-dropdown {
  position: relative; display: flex; align-items: center;
  padding-bottom: 16px; margin-bottom: -16px; /* enlarges the hoverable hitbox so it reaches the dropdown with no dead zone */
}
.nav-dropdown-toggle { background: none; border: none; padding: 4px; margin-left: 2px; cursor: pointer; display: flex; color: var(--walnut); }
.nav-caret { width: 13px; height: 13px; transition: transform 0.18s ease; }
.nav-dropdown-menu {
  /* top:100% lands right at the bottom of the padding above, so the menu is flush against
     the enlarged hitbox — no gap for the cursor to fall through while moving down to it */
  position: absolute; top: 100%; left: 50%; transform: translate(-50%, -4px);
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 10px; min-width: 210px; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0);
}
.nav-dropdown:hover .nav-caret,
.nav-dropdown.open .nav-caret { transform: rotate(180deg); }
.nav-dropdown-link {
  display: block; padding: 10px 14px; border-radius: 8px; font-size: 0.92rem;
  font-weight: 500; color: var(--walnut) !important; white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}
.nav-dropdown-link:hover { background: var(--cream-dark); transform: translateX(3px); }
.nav-dropdown-link--all { font-weight: 700; border-bottom: 1px solid var(--cream-dark); border-radius: 8px 8px 0 0; margin-bottom: 4px; padding-bottom: 12px; }
.header-actions { display: flex; align-items: center; gap: 16px; }

/* ---------- Language switcher ---------- */
.lang-switcher { position: relative; }
.lang-switcher-toggle {
  display: flex; align-items: center; gap: 6px; background: transparent; border: 1px solid rgba(74,50,34,0.16);
  border-radius: 999px; padding: 8px 12px; cursor: pointer; color: var(--walnut); font-family: var(--font-heading);
  font-weight: 600; font-size: 0.85rem; transition: background 0.15s ease, border-color 0.15s ease;
}
.lang-switcher-toggle:hover { background: var(--cream-dark); border-color: rgba(74,50,34,0.28); }
.lang-globe { width: 16px; height: 16px; flex-shrink: 0; }
.lang-caret { width: 11px; height: 11px; flex-shrink: 0; transition: transform 0.18s ease; }
.lang-switcher.open .lang-caret { transform: rotate(180deg); }
.lang-switcher-menu {
  position: absolute; top: 100%; right: 0; margin-top: 10px;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 8px; min-width: 180px; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-4px); pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 60;
}
.lang-switcher.open .lang-switcher-menu {
  opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}
.lang-option {
  display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none;
  border-radius: 8px; padding: 9px 10px; cursor: pointer; font-family: var(--font-body); font-size: 0.92rem;
  color: var(--walnut); text-align: left;
}
.lang-option:not(:disabled):hover { background: var(--cream-dark); }
.lang-flag { font-size: 1.1rem; line-height: 1; }
.lang-name { flex: 1; }
.lang-check { width: 16px; height: 16px; flex-shrink: 0; stroke: var(--sage-dark); }
.lang-option--soon { cursor: default; opacity: 0.55; }
.lang-soon {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: #9a8a76; background: var(--cream-dark); border-radius: 999px; padding: 3px 8px; flex-shrink: 0;
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--walnut); margin: 5px 0; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .main-nav { position: fixed; top: 84px; left: 0; right: 0; bottom: 0; background: var(--cream); flex-direction: column; justify-content: flex-start; padding: 40px 28px; gap: 28px; transform: translateX(100%); transition: transform 0.25s ease; overflow-y:auto; align-items: stretch; }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { font-size: 1.3rem; }
  .nav-toggle { display: block; }
  .header-actions .btn-label { display: none; }

  /* On touch, the dropdown becomes an inline expandable block instead of a hover flyout */
  .nav-dropdown { display: flex; flex-wrap: wrap; }
  .nav-dropdown-menu {
    position: static; transform: none; visibility: visible; pointer-events: auto;
    box-shadow: none; background: transparent; padding: 0 0 0 18px; min-width: 0; width: 100%;
    max-height: 0; overflow: hidden; opacity: 1; transition: max-height 0.22s ease;
  }
  .nav-dropdown.open .nav-dropdown-menu { max-height: 400px; margin-top: 14px; left: auto; transform: none; }
  .nav-dropdown-link { font-size: 1.05rem; padding: 10px 0; }
  .nav-dropdown-link--all { border-bottom: none; padding-bottom: 10px; margin-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 44px; overflow: hidden; position: relative; }
.hero::before {
  content: ''; position: absolute; top: -20%; right: -10%; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,139,94,0.16) 0%, rgba(124,139,94,0) 70%);
  pointer-events: none; z-index: 0;
}
.hero::after {
  content: ''; position: absolute; bottom: -30%; left: -12%; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,150,44,0.14) 0%, rgba(201,150,44,0) 70%);
  pointer-events: none; z-index: 0;
}
.hero .container { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; z-index: 1; }
.hero-copy h1 { margin-bottom: 22px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 32px; }
.hero-art { position: relative; perspective: var(--perspective); }
.hero-art img { width: 100%; height: auto; will-change: transform; }
.hero-badge {
  position: absolute; bottom: 18px; left: 18px; background: var(--white);
  border-radius: var(--radius-sm); padding: 14px 18px; box-shadow: var(--shadow-lg);
  font-family: var(--font-heading); font-weight: 700; font-size: 0.85rem; color: var(--walnut);
  display:flex; align-items:center; gap:10px;
}
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
}

/* ---------- Foto di squadra (chi-siamo) ---------- */
.team-photo-figure { margin: 0 auto 40px; max-width: 620px; }
.team-photo-frame {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
  transform-style: preserve-3d;
}
.team-photo-frame img { width: 100%; height: auto; display: block; }
.team-photo-figure figcaption {
  margin-top: 14px; font-size: 0.86rem; color: #8a7a6a; text-align: center;
}

/* ---------- Trust bar ---------- */
.trust-bar { border-top: 1px solid rgba(74,50,34,0.1); border-bottom: 1px solid rgba(74,50,34,0.1); }
.trust-bar .container { display: grid; grid-template-columns: repeat(6,1fr); gap: 24px; padding: 34px 28px; }
.trust-item { display: flex; align-items: center; gap: 14px; transition: transform 0.35s var(--ease); }
.trust-item:hover { transform: translateY(-2px); }
.trust-item .icon-wrap { width: 42px; height: 42px; border-radius: 50%; background: var(--cream-dark); display:flex; align-items:center; justify-content:center; flex-shrink:0; transition: transform 0.35s var(--ease-spring), background 0.35s var(--ease); }
.trust-item:hover .icon-wrap { transform: scale(1.14) rotate(-6deg); background: var(--sage-light); }
.trust-item .icon-wrap svg { width: 22px; height: 22px; stroke: var(--sage-dark); }
.trust-item strong { display:block; font-family: var(--font-heading); font-size: 0.92rem; color: var(--walnut); }
.trust-item span { font-size: 0.82rem; color: #6b5c4c; }
@media (max-width: 1300px) { .trust-bar .container { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 700px) { .trust-bar .container { grid-template-columns: repeat(2,1fr); } }

/* ---------- Grid / Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; perspective: var(--perspective); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; perspective: var(--perspective); }
@media (max-width: 980px) { .grid-3 { grid-template-columns: repeat(2,1fr); } .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.section-head { display:flex; align-items:flex-end; justify-content:space-between; gap: 24px; margin-bottom: 44px; flex-wrap: wrap; }
.section-head .lede { margin-bottom: 0; }

.model-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow), var(--ring); transition: box-shadow 0.4s var(--ease);
  display: flex; flex-direction: column;
  transform-style: preserve-3d;
}
.model-card:hover { box-shadow: var(--shadow-tilt), var(--ring); }
.model-visual {
  aspect-ratio: 4/3; display:flex; align-items:center; justify-content:center; position: relative; overflow: hidden;
  background-image:
    repeating-linear-gradient(100deg, rgba(0,0,0,0.05) 0px, rgba(0,0,0,0.05) 1px, transparent 1px, transparent 26px),
    linear-gradient(160deg, var(--tone-a), var(--tone-b));
}
.model-visual svg { width: 78%; opacity: 0.95; transition: transform 0.6s var(--ease); }
.model-card:hover .model-visual svg { transform: scale(1.06); }
.model-visual .model-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.model-visual::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(29,19,12,0.28) 100%);
  opacity: 0; transition: opacity 0.4s var(--ease); pointer-events: none;
}
.model-card:hover .model-visual::after { opacity: 1; }
.model-visual .cat-badge {
  position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,0.88);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-family: var(--font-heading); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.04em;
  word-spacing: 0.2em;
  text-transform: uppercase; padding: 6px 12px; border-radius: 999px; color: var(--walnut);
  z-index: 1;
}
.model-visual .cat-badge--gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--walnut-dark); }
.model-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.model-body h3 { margin-bottom: 0; }
.model-specs { display:flex; gap: 14px; flex-wrap: wrap; font-size: 0.84rem; color: #6b5c4c; }
.model-specs span { display:flex; align-items:center; gap:6px; }
.model-price { margin-top: auto; display:flex; align-items:baseline; justify-content:space-between; padding-top: 14px; border-top: 1px solid var(--cream-dark); }
.model-price .amount { font-family: var(--font-heading); font-weight: 700; font-size: 1.3rem; color: var(--walnut); }
.model-price .from { font-size: 0.78rem; color: #8a7a6a; text-transform: uppercase; letter-spacing: 0.04em; }

/* Category filter pills */
.catalog-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-pills { display:flex; gap: 10px; flex-wrap: wrap; margin-bottom: 0; }
.filter-pill {
  font-family: var(--font-heading); font-weight: 600; font-size: 0.86rem;
  padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--cream-darker);
  background: var(--white); cursor: pointer; color: var(--walnut); transition: 0.2s var(--ease-soft);
}
.filter-pill.active, .filter-pill:hover { background: var(--walnut); border-color: var(--walnut); color: var(--white); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(29,19,12,0.18); }

/* ---------- Sort dropdown (catalogo) ---------- */
.sort-dropdown { position: relative; flex-shrink: 0; }
.sort-dropdown-toggle {
  display: flex; align-items: center; gap: 8px; background: var(--white); border: 1.5px solid var(--cream-darker);
  border-radius: 999px; padding: 10px 18px; cursor: pointer; color: var(--walnut); font-family: var(--font-body);
  font-size: 0.86rem; transition: background 0.15s ease, border-color 0.15s ease;
}
.sort-dropdown-toggle:hover { background: var(--cream-dark); border-color: rgba(74,50,34,0.28); }
.sort-label { white-space: nowrap; }
.sort-current { font-family: var(--font-heading); font-weight: 700; }
.sort-caret { width: 12px; height: 12px; flex-shrink: 0; transition: transform 0.18s ease; }
.sort-dropdown.open .sort-caret { transform: rotate(180deg); }
.sort-dropdown-menu {
  position: absolute; top: 100%; right: 0; margin-top: 10px;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 8px; min-width: 250px; display: flex; flex-direction: column; gap: 1px;
  opacity: 0; visibility: hidden; transform: translateY(-4px); pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 40;
}
.sort-dropdown.open .sort-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}
.sort-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  background: none; border: none; border-radius: 8px; padding: 10px 12px; cursor: pointer;
  font-family: var(--font-body); font-size: 0.9rem; color: var(--walnut); text-align: left;
}
.sort-option:hover { background: var(--cream-dark); }
.sort-option.active { font-weight: 700; }
.sort-check { width: 16px; height: 16px; flex-shrink: 0; stroke: var(--sage-dark); opacity: 0; }
.sort-option.active .sort-check { opacity: 1; }
@media (max-width: 640px) {
  .sort-dropdown-menu { right: auto; left: 0; min-width: 0; width: 100%; }
  .sort-dropdown-toggle { width: 100%; justify-content: space-between; }
}

/* ---------- Steps / process ---------- */
.steps { counter-reset: step; display:grid; grid-template-columns: repeat(4,1fr); gap: 28px; }
@media (max-width: 900px){ .steps { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 8px; transition: transform 0.4s var(--ease); }
.step:hover { transform: translateY(-4px); }
.step .num {
  counter-increment: step; font-family: var(--font-heading); font-weight: 700; font-size: 2.6rem;
  color: var(--sage-light); margin-bottom: 6px; line-height:1;
}
.step .num::before { content: counter(step, decimal-leading-zero); }

/* ---------- Stat grid (numeri in cifre) ---------- */
.stat-grid { display:grid; grid-template-columns: repeat(4,1fr); gap: 28px; text-align:center; }
.stat-grid--3 { grid-template-columns: repeat(3,1fr); }
.stat-item .stat-num { font-family: var(--font-heading); font-weight:700; font-size: 2.8rem; color: var(--walnut); line-height:1; margin-bottom:8px; position: relative; display:inline-block; padding-bottom: 10px; }
.stat-item .stat-num::after { content:''; position:absolute; left:50%; bottom:0; transform:translateX(-50%); width:36px; height:3px; border-radius:2px; background: var(--gold); }
.stat-item .stat-label { font-size: 0.9rem; color:#6b5c4c; }
@media (max-width: 900px){ .stat-grid { grid-template-columns: repeat(2,1fr); } .stat-grid--3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .stat-grid, .stat-grid--3 { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.testimonials-grid { align-items: stretch; }
.testimonial-card {
  background: var(--white); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow);
  display:flex; flex-direction:column; gap: 14px; transition: box-shadow 0.4s var(--ease);
  position: relative; transform-style: preserve-3d;
}
.testimonial-card:hover { box-shadow: var(--shadow-tilt); }
.stars { display:flex; gap: 3px; }
.stars svg { width: 16px; height: 16px; color: var(--gold); }
.testimonial-card { border-top: 3px solid var(--gold); }
.testimonial-quote { font-family: var(--font-accent); font-style: italic; font-size: 1.05rem; color: var(--ink); line-height: 1.55; flex: 1; margin: 0; }
.testimonial-author { display:flex; align-items:center; gap: 12px; padding-top: 6px; border-top: 1px solid var(--cream-dark); }
.avatar-badge {
  width: 40px; height: 40px; border-radius: 50%; background: var(--sage); color: var(--white);
  display:flex; align-items:center; justify-content:center; font-family: var(--font-heading); font-weight: 700;
  font-size: 0.86rem; flex-shrink: 0;
}
.testimonial-author strong { display:block; font-size: 0.92rem; color: var(--walnut); }
.testimonial-author span { display:block; font-size: 0.8rem; color: #8a7a6a; }

/* ---------- Purchase reassurance badges (product page) ---------- */
.trust-mini { display:flex; flex-wrap:wrap; gap: 10px 24px; margin-top: 24px; }
.trust-mini span { display:flex; align-items:center; gap: 8px; font-size: 0.86rem; font-weight: 600; color: #6b5c4c; }
.trust-mini svg { width: 18px; height: 18px; stroke: var(--sage-dark); flex-shrink: 0; }

/* ---------- Feature list w/ check ---------- */
.check-list li { display:flex; align-items:flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--cream-dark); font-size: 0.98rem; }
.check-list li:last-child { border-bottom: none; }
.check-list svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; stroke: var(--sage-dark); }

/* ---------- Spec table ---------- */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-bottom: 1px solid var(--cream-dark); }
.spec-table td { padding: 16px 0; vertical-align: top; }
.spec-table td:first-child { font-family: var(--font-heading); font-weight: 700; color: var(--walnut); width: 220px; padding-right: 24px; }
.spec-table td:last-child { color: #4a3f34; }
.spec-table--compact td { padding: 11px 0; font-size: 0.95rem; }
.spec-table--compact td:first-child { width: 200px; font-size: 0.92rem; }

/* ---------- Scheda tecnica (compact) ---------- */
.scheda-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 8px; }
.scheda-head h2 { margin: 2px 0 0; }
.scheda-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #9a8a76; margin: 30px 0 12px; }
.scheda-title:first-of-type { margin-top: 22px; }
.scheda-tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1px; background: var(--cream-dark); border: 1px solid var(--cream-dark); border-radius: 12px; overflow: hidden;
}
.scheda-item { background: #fff; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; transition: background 0.25s ease; }
.scheda-item:hover { background: var(--cream); }
.scheda-item .k { font-size: 0.72rem; color: #9a8a76; }
.scheda-item .v { font-size: 0.87rem; color: #33291f; font-weight: 600; line-height: 1.3; }
.scheda-details { margin-top: 30px; }
.scheda-details summary {
  cursor: pointer; list-style: none; font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: #9a8a76; padding: 12px 0; border-top: 1px solid var(--cream-dark);
  display: flex; align-items: center; gap: 8px;
}
.scheda-details summary span { text-transform: none; font-weight: 400; letter-spacing: normal; font-size: 0.78rem; color: #b0a18d; }
.scheda-details summary::before { content: '+'; font-size: 1rem; width: 14px; }
.scheda-details[open] summary::before { content: '−'; }
.scheda-details .scheda-tiles { margin-top: 12px; }
@media (max-width: 640px) { .scheda-tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .scheda-tiles { grid-template-columns: 1fr; } }

/* ---------- Product hero ---------- */
.product-hero { padding: 40px 0 0; }
.breadcrumb { font-size: 0.86rem; color: #8a7a6a; margin-bottom: 26px; }
.breadcrumb a:hover { color: var(--walnut); text-decoration: underline; }
.product-hero-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-bottom: 60px; }
@media (max-width: 900px){ .product-hero-grid { grid-template-columns: 1fr; } }
.product-gallery { display: flex; flex-direction: column; gap: 16px; perspective: var(--perspective); }
.product-photo-frame {
  aspect-ratio: 4/3; border-radius: var(--radius); position: relative; overflow: hidden;
  background-image:
    repeating-linear-gradient(100deg, rgba(0,0,0,0.06) 0px, rgba(0,0,0,0.06) 1px, transparent 1px, transparent 30px),
    linear-gradient(160deg, var(--tone-a), var(--tone-b));
  display:flex; align-items:center; justify-content:center;
  box-shadow: var(--shadow); transition: box-shadow 0.4s var(--ease);
  transform-style: preserve-3d;
}
.product-photo-frame:hover { box-shadow: var(--shadow-tilt); }
.product-photo-frame svg { width: 80%; }
.product-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-specs-row { display:flex; gap: 28px; flex-wrap: wrap; margin: 22px 0 30px; }
.spec-pill { text-align:left; }
.spec-pill svg { width: 24px; height: 24px; stroke: var(--sage-dark); margin-bottom: 8px; }
.spec-pill strong { display:block; font-family: var(--font-heading); font-size: 1.3rem; color: var(--walnut); }
.spec-pill span { font-size: 0.8rem; color: #8a7a6a; text-transform: uppercase; letter-spacing: 0.04em; }
.price-block { display:flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.price-block .amount { font-family: var(--font-heading); font-weight: 700; font-size: 2.4rem; color: var(--walnut); }
.price-note { font-size: 0.84rem; color: #8a7a6a; margin-bottom: 28px; }
.product-cta { display:flex; gap: 14px; flex-wrap: wrap; }

/* related */
.related-nav { display:flex; justify-content:space-between; gap: 20px; padding: 40px 0; border-top: 1px solid var(--cream-darker); flex-wrap: wrap;}
.related-nav a { font-family: var(--font-heading); font-weight:600; display:flex; align-items:center; gap:10px; color: var(--walnut); transition: transform 0.3s var(--ease), color 0.3s var(--ease); }
.related-nav a:hover { color: var(--sage-dark); transform: translateY(-2px); }

/* ---------- CTA banner ---------- */
.cta-banner { text-align:center; padding: 96px 0; position: relative; overflow: hidden; }
.cta-banner h2 { max-width: 720px; margin-left:auto; margin-right:auto; }
.cta-banner .lede { margin-left:auto; margin-right:auto; text-align:center; color: rgba(255,255,255,0.85); }
.cta-banner .btn-actions { display:flex; gap:16px; justify-content:center; margin-top: 30px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: linear-gradient(180deg, var(--walnut-dark) 0%, var(--walnut-deeper) 100%); color: var(--cream-darker); padding: 56px 0 22px; }
.footer-grid { display:grid; grid-template-columns: repeat(5, 1fr); gap: 28px 20px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.1); }
@media (max-width: 700px){ .footer-grid { grid-template-columns: repeat(2,1fr); } .footer-col--brand { grid-column: span 2; } }
@media (max-width: 480px){ .footer-grid { grid-template-columns: 1fr; } }
.footer-grid img { height: 26px; margin-bottom: 12px; }
.footer-grid p { color: rgba(250,246,239,0.65); font-size: 0.88rem; margin-bottom: 14px; max-width: 280px; }
.footer-quicklinks { display:flex; flex-direction:column; gap: 8px; }
.footer-quicklinks li { margin-bottom: 0; }
.footer-quicklinks a { display:inline-flex; align-items:center; gap: 8px; transition: transform 0.25s var(--ease); }
.footer-quicklinks a:hover { transform: translateX(3px); }
.footer-quicklinks .icon { width: 1em; height: 1em; opacity: 0.9; }
.footer-col h4 { color: var(--white); font-family: var(--font-heading); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 13px; }
.footer-col ul { display:flex; flex-direction:column; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: rgba(250,246,239,0.75); font-size: 0.9rem; transition: color 0.25s var(--ease-soft); }
.footer-col a:hover { color: var(--white); }
.footer-link-btn {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer; text-align: left;
  font-family: inherit; color: rgba(250,246,239,0.75); font-size: 0.9rem; transition: color 0.25s var(--ease-soft);
}
.footer-link-btn:hover { color: var(--white); }
.footer-bottom { display:flex; justify-content:space-between; align-items:center; padding-top: 18px; font-size: 0.8rem; color: rgba(250,246,239,0.5); flex-wrap: wrap; gap: 10px; }

/* ---------- Footer — badge di certificazione ---------- */
.footer-certs {
  display: flex; flex-wrap: wrap; gap: 22px 32px; align-items: center;
  padding: 26px 0; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-cert-item { display: flex; align-items: center; gap: 12px; transition: transform 0.35s var(--ease); }
.footer-cert-item:hover { transform: translateY(-2px); }
.footer-cert-item svg { width: 26px; height: 26px; stroke: var(--gold-light); flex-shrink: 0; transition: transform 0.35s var(--ease-spring); }
.footer-cert-item:hover svg { transform: scale(1.15) rotate(-6deg); }
.footer-cert-item strong { display: block; font-family: var(--font-heading); font-size: 0.85rem; color: var(--white); }
.footer-cert-item span { font-size: 0.78rem; color: rgba(250,246,239,0.6); }

/* WhatsApp floating button */
.wa-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%; background: var(--whatsapp);
  display:flex; align-items:center; justify-content:center; box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease);
}
.wa-float:hover { transform: scale(1.12) rotate(8deg); animation: none; box-shadow: 0 10px 30px rgba(37,211,102,0.5); }
.wa-float:active { transform: scale(0.96); }
.wa-float svg { width: 32px; height: 32px; color: var(--white); transition: transform 0.3s var(--ease); }
.icon-wa-green { color: var(--whatsapp); }
@media (prefers-reduced-motion: no-preference) {
  @keyframes wa-pulse {
    0% { box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0.45); }
    70% { box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 0 0 16px rgba(37,211,102,0); }
    100% { box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0); }
  }
  .wa-float { animation: wa-pulse 3.2s ease-out infinite; }
}

/* ---------- Rating summary (pagina Testimonianze) ---------- */
.rating-summary { display:flex; align-items:center; gap: 18px; margin-top: 28px; flex-wrap: wrap; }
.rating-number { font-family: var(--font-heading); font-weight:700; font-size: 3rem; color: var(--walnut); line-height:1; }
.rating-number span { font-size: 1.4rem; font-weight: 600; color: #9a8a76; }
.rating-summary .stars svg { width: 20px; height: 20px; }
.rating-count { font-size: 0.9rem; color: #6b5c4c; }

/* ---------- Scroll-reveal (fallback CSS — la logica di innesco è in animations.js via GSAP ScrollTrigger) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(28px) scale(0.98); }
  .reveal.reveal-visible { opacity: 1; transform: translateY(0) scale(1); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .reveal-fade { opacity: 0; transform: translateY(16px); }
  .reveal-fade.reveal-visible { opacity: 1; transform: translateY(0); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
}

/* ---------- 3D tilt (vanilla-tilt.js) — l'inline transform è gestito da JS,
   qui prepariamo profondita' (preserve-3d) e un riflesso "glare" coerente col
   design system quando l'opzione glare e' attiva ---------- */
.js-tilt-glare { border-radius: inherit; }
.js-tilt-glare-inner { background-image: linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 100%); }

/* ---------- Misc pages ---------- */
.value-card { background: var(--white); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); transition: box-shadow 0.4s var(--ease); transform-style: preserve-3d; }
.value-card:hover { box-shadow: var(--shadow-tilt); }
.value-card .icon-wrap { width: 52px; height: 52px; border-radius: 50%; background: var(--cream-dark); display:flex; align-items:center; justify-content:center; margin-bottom: 18px; transition: transform 0.4s var(--ease-spring); }
.value-card:hover .icon-wrap { transform: scale(1.1) rotate(-6deg); }
.value-card svg { width: 26px; height: 26px; stroke: var(--sage-dark); }

.contact-card { background: var(--white); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); display:flex; flex-direction:column; gap: 8px; transition: box-shadow 0.4s var(--ease); transform-style: preserve-3d; }
.contact-card:hover { box-shadow: var(--shadow-tilt); }
.contact-card h3 { margin-bottom: 4px; }
.contact-card .val { font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; color: var(--walnut); }

.notice {
  background: #FFF7E6; border: 1px solid #F0D896; color: #7A5A12;
  border-radius: var(--radius-sm); padding: 16px 20px; font-size: 0.9rem; margin: 20px 0;
}

.two-col { display:grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items:center; }
@media (max-width: 900px){ .two-col { grid-template-columns: 1fr; } }

/* ---------- Legal / informational long-form pages ---------- */
.legal-prose { max-width: 780px; }
.legal-prose h2 { font-size: 1.5rem; margin-top: 46px; margin-bottom: 14px; }
.legal-prose h2:first-child { margin-top: 0; }
.legal-prose h3 { font-size: 1.1rem; margin-top: 26px; margin-bottom: 10px; }
.legal-prose p { color: #4a3f34; line-height: 1.7; }
.legal-prose ul { margin: 0 0 1em; padding-left: 22px; color: #4a3f34; line-height: 1.7; }
.legal-prose li { margin-bottom: 6px; }
.legal-prose .legal-updated { font-size: 0.85rem; color: #9a8a76; margin-bottom: 8px; }

/* ---------- FAQ accordion groups ---------- */
.faq-group { margin-bottom: 40px; }
.faq-group:last-child { margin-bottom: 0; }
.faq-group h3 { display:flex; align-items:center; gap: 12px; margin-bottom: 6px; }
.faq-group h3 svg { width: 22px; height: 22px; stroke: var(--sage-dark); flex-shrink: 0; }
.faq-item { border-bottom: 1px solid var(--cream-dark); padding: 4px 0; }
.faq-item summary {
  cursor: pointer; list-style: none; display:flex; align-items:center; justify-content:space-between; gap: 16px;
  padding: 16px 0; font-family: var(--font-heading); font-weight: 700; font-size: 1rem; color: var(--walnut);
}
.faq-item summary::-webkit-details-marker { display:none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: #b0a18d; flex-shrink: 0; transition: transform 0.25s var(--ease); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding-bottom: 18px; color: #6b5c4c; }

/* ---------- News / blog ---------- */
.news-card { background: var(--white); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); display:flex; flex-direction:column; gap: 10px; height: 100%; transition: box-shadow 0.4s var(--ease); transform-style: preserve-3d; }
.news-card:hover { box-shadow: var(--shadow-tilt); }
.article-meta .read-time { display:flex; align-items:center; gap: 6px; }
.article-meta .read-time svg { width: 15px; height: 15px; stroke: #9a8a76; }
.news-card .cat-tag { display:inline-block; align-self:flex-start; background: var(--cream-dark); color: var(--walnut); font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 5px 12px; border-radius: 999px; }
.news-card time { font-size: 0.82rem; color: #9a8a76; }
.news-card h3 { margin: 0; }
.news-card p { color: #6b5c4c; font-size: 0.94rem; margin: 0; }
.news-card .read-more { margin-top: auto; display:flex; align-items:center; gap: 8px; font-weight: 700; color: var(--walnut); font-size: 0.92rem; transition: gap 0.3s var(--ease); }
.news-card:hover .read-more { gap: 13px; }
.news-card .read-more svg { width: 16px; height: 16px; }
.article-meta { display:flex; align-items:center; gap: 14px; color: #9a8a76; font-size: 0.9rem; margin-bottom: 8px; }
.article-body { max-width: 720px; }
.article-body p { color: #4a3f34; line-height: 1.75; font-size: 1.02rem; }
.article-body h2 { font-size: 1.4rem; margin-top: 36px; margin-bottom: 12px; }

.mb-0{margin-bottom:0}

/* ---------- Forms (modulo di recesso e simili) ---------- */
.site-form { max-width: 640px; margin-top: 8px; }
.site-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.site-form .form-group { margin-bottom: 20px; }
.site-form label { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 0.88rem; color: var(--walnut); margin-bottom: 6px; }
.site-form input, .site-form textarea {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--cream-darker);
  background: var(--white); font-family: var(--font-body); font-size: 0.96rem; color: var(--ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-form input:focus, .site-form textarea:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 4px rgba(124,139,94,0.14); }
.site-form textarea { resize: vertical; min-height: 100px; }
.form-honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-success { background: var(--white); border: 1.5px solid var(--sage-light); border-radius: var(--radius); padding: 28px 30px; }
.form-success h3 { margin-bottom: 8px; }
@media (max-width: 640px) { .site-form .form-row { grid-template-columns: 1fr; } }

/* ---------- Riduzione animazioni: disattiva tilt/parallax/smooth-scroll ---------- */
@media (prefers-reduced-motion: reduce) {
  html.lenis-reduced-motion, html.lenis-reduced-motion body { scroll-behavior: auto !important; }
}

/* ---------- Viewer 3D (Three.js): anteprima volumetrica in scala ----------
   Progressive enhancement: parte sempre come skeleton con l'illustrazione
   statica di fallback visibile; house3d.js aggiunge is-ready solo a
   inizializzazione riuscita, senza mai nascondere contenuto per default. */
.house-3d {
  position: relative; overflow: hidden; touch-action: pan-y; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--cream-dark), var(--cream-darker));
}
.hero-art .house-3d { aspect-ratio: 640 / 520; }
.house-3d.is-loading {
  background-image: linear-gradient(100deg, transparent 42%, rgba(255,255,255,0.5) 50%, transparent 58%),
    linear-gradient(160deg, var(--cream-dark), var(--cream-darker));
  background-size: 220% 100%, 100% 100%;
  animation: house3d-shimmer 1.6s ease-in-out infinite;
}
@keyframes house3d-shimmer {
  0% { background-position: 160% 0, 0 0; }
  100% { background-position: -60% 0, 0 0; }
}
.house-3d-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12%;
  transition: opacity 0.45s var(--ease);
}
.house-3d.is-ready .house-3d-fallback { opacity: 0; pointer-events: none; }
.house-3d-canvas { position: absolute; inset: 0; display: block; width: 100% !important; height: 100% !important; cursor: grab; }
.house-3d.is-dragging .house-3d-canvas { cursor: grabbing; }
.house-3d-hint {
  position: absolute; bottom: 14px; right: 14px; z-index: 2;
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(4px);
  border-radius: 999px; padding: 7px 13px 7px 10px;
  font-family: var(--font-heading); font-weight: 600; font-size: 0.72rem; color: var(--walnut);
  opacity: 0; transform: translateY(4px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
}
.house-3d-hint svg { width: 15px; height: 15px; stroke: var(--sage-dark); }
.house-3d.is-ready .house-3d-hint { opacity: 1; transform: translateY(0); }
.house-3d.is-error .house-3d-hint { display: none; }
.house-3d-caption { font-size: 0.78rem; color: #8a7a6a; margin-top: 12px; text-align: center; }
@media (max-width: 900px) { .house-3d-caption { text-align: left; } }

/* ---------- Cookie consent banner (GDPR) ----------
   Nascosto di default in modo accessibile (non con display:none, cosi' resta
   nel DOM ma fuori schermo — appare via classe is-visible aggiunta da JS solo
   dopo aver verificato l'assenza di un consenso gia' salvato). */
.cookie-consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  transform: translateY(110%); transition: transform 0.5s var(--ease-spring);
  font-family: var(--font-body);
}
.cookie-consent.is-visible { transform: translateY(0); }
.cookie-consent-bar {
  background: var(--white); border-top: 1.5px solid var(--cream-darker);
  box-shadow: 0 -12px 40px rgba(29,19,12,0.14);
  padding: 20px max(20px, calc((100% - var(--container)) / 2 + 20px));
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cookie-consent-text { flex: 1 1 380px; font-size: 0.9rem; color: var(--ink); line-height: 1.55; }
.cookie-consent-text a { color: var(--walnut); font-weight: 600; text-decoration: underline; }
.cookie-consent-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cookie-consent-actions .btn { white-space: nowrap; }
.cookie-consent-panel {
  background: var(--cream); border-top: 1px solid var(--cream-darker);
  max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease);
}
.cookie-consent.is-prefs-open .cookie-consent-panel { max-height: 480px; }
.cookie-consent-panel[hidden] { display: block; } /* la transizione gestisce la visibilita', non l'attributo hidden */
.cookie-consent-panel-inner {
  padding: 22px max(20px, calc((100% - var(--container)) / 2 + 20px)) 26px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.cookie-cat { background: var(--white); border-radius: var(--radius-sm); padding: 16px 18px; border: 1px solid var(--cream-darker); }
.cookie-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.cookie-cat-head span { font-family: var(--font-heading); font-weight: 700; color: var(--walnut); font-size: 0.95rem; }
.cookie-cat p { margin: 0; font-size: 0.82rem; color: #6b5c4c; line-height: 1.5; }
.cookie-consent-actions--panel { grid-column: 1 / -1; justify-content: flex-end; margin-top: 4px; }
.cookie-toggle { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.cookie-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cookie-toggle span {
  position: absolute; inset: 0; background: var(--cream-darker); border-radius: 999px; transition: background 0.25s var(--ease);
}
.cookie-toggle span::before {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.25s var(--ease-spring);
}
.cookie-toggle input:checked + span { background: var(--sage); }
.cookie-toggle input:checked + span::before { transform: translateX(18px); }
.cookie-toggle--locked { opacity: 0.6; }
.cookie-toggle--locked input:checked + span { background: var(--walnut-light); }
@media (max-width: 900px) {
  .cookie-consent-panel-inner { grid-template-columns: 1fr; padding-left: 20px; padding-right: 20px; }
  .cookie-consent-bar { padding: 18px 20px; }
  .cookie-consent-actions { width: 100%; }
  .cookie-consent-actions .btn { flex: 1 1 auto; }
}
/* Il pulsante WhatsApp flottante si sposta verso l'alto mentre il banner e'
   visibile, per non restarne coperto ne' sovrapporsi in modo confuso. */
body.has-cookie-banner .wa-float { bottom: 104px; transition: bottom 0.4s var(--ease); }
@media (max-width: 900px) { body.has-cookie-banner .wa-float { bottom: 190px; } }
@media (prefers-reduced-motion: reduce) {
  .cookie-consent, .cookie-consent-panel, body.has-cookie-banner .wa-float { transition: none !important; }
}
