/* ==============================================================
   MONDO TAPPETI — Bergamo · Design system v2
   Token e componenti in stile shadcn/ui adattati al brand.
   Pubblico over 60: testi grandi, contrasto AA+, tap target ≥48px
   ============================================================== */

:root {
  /* Palette */
  --background: #F6F1E7;
  --surface: #FDFBF6;
  --surface-2: #F0E9DB;
  --foreground: #211D18;
  --muted-fg: #675C50;
  --primary: #8E2C2C;
  --primary-hover: #71211F;
  --primary-fg: #FFFFFF;
  --accent: #B08D57;
  --accent-strong: #7D5E31;
  --accent-soft: rgba(176, 141, 87, 0.14);
  --dark: #26201A;
  --dark-2: #1B1611;
  --dark-fg: #F3EDE2;
  --dark-muted: #CFC4B0;
  --border: #E4DACA;
  --input: #CDBFA8;
  --ring: #B08D57;
  --success: #1F7A46;
  --success-hover: #175E36;
  --danger: #A02121;

  /* Geometria */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-full: 999px;

  /* Ombre calde */
  --shadow-xs: 0 1px 2px rgba(38, 32, 26, 0.06);
  --shadow-sm: 0 2px 8px rgba(38, 32, 26, 0.08), 0 1px 2px rgba(38, 32, 26, 0.05);
  --shadow-md: 0 6px 20px rgba(38, 32, 26, 0.12), 0 2px 6px rgba(38, 32, 26, 0.07);
  --shadow-lg: 0 18px 48px rgba(38, 32, 26, 0.18), 0 4px 12px rgba(38, 32, 26, 0.08);

  /* Tipografia */
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Lora", Georgia, serif;

  /* Layout: ~80% della pagina su schermi grandi */
  --container: min(1500px, 86vw);
  --container-narrow: min(880px, 86vw);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.75;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; display: block; }
a { color: var(--primary); }
button { font-family: inherit; }
::selection { background: var(--accent); color: #fff; }

.container { width: var(--container); margin-inline: auto; }
.container-narrow { width: var(--container-narrow); margin-inline: auto; }
@media (max-width: 640px) { :root { --container: calc(100vw - 40px); --container-narrow: calc(100vw - 40px); } }

/* ---------- Accessibilità ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--dark); color: #fff; padding: 14px 22px; z-index: 400;
  border-radius: 0 0 var(--radius) 0; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Icone inline ---------- */
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }
.icon-lg { width: 26px; height: 26px; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--dark-2); color: var(--dark-muted);
  font-size: 16px; text-align: center; padding: 9px 16px;
}
.topbar a { color: #fff; font-weight: 700; text-decoration: none; text-underline-offset: 3px; }
.topbar a:hover { text-decoration: underline; }

/* ---------- Header (sticky, blur) ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253, 251, 246, 0.88);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s;
  transform: translateZ(0);
  will-change: transform;
}
.header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner {
  width: var(--container); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--foreground); }
.brand img { height: 56px; width: auto; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700; font-size: 27px; letter-spacing: 0.05em;
  line-height: 1.05; text-transform: uppercase;
}
.brand-name small {
  display: block; font-family: var(--font-body); font-size: 12.5px;
  letter-spacing: 0.26em; color: var(--accent-strong); font-weight: 700; margin-top: 3px;
}

.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--foreground);
  font-size: 17.5px; font-weight: 600;
  padding: 12px 18px; border-radius: var(--radius-full);
  transition: background 0.18s, color 0.18s;
}
.nav a:hover { background: var(--surface-2); }
.nav a.active { background: var(--accent-soft); color: var(--primary); }
.nav a.nav-cta {
  background: var(--primary); color: #fff; margin-left: 10px;
  display: inline-flex; align-items: center; gap: 9px;
  box-shadow: var(--shadow-sm);
}
.nav a.nav-cta:hover { background: var(--primary-hover); }

.nav-toggle {
  display: none; background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 12px 18px; min-height: 50px;
  font-size: 17px; font-weight: 700; color: var(--foreground); cursor: pointer;
  align-items: center; gap: 10px;
}

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 14px 24px 24px;
    box-shadow: var(--shadow-lg);
  }
  .nav.open { display: flex; }
  .nav a { font-size: 20px; padding: 15px 18px; border-radius: var(--radius); }
  .nav a.nav-cta { margin-left: 0; justify-content: center; }
}

/* ---------- Bottoni v2 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  min-height: 54px; padding: 14px 30px;
  font-size: 18px; font-weight: 700; letter-spacing: 0.01em;
  text-decoration: none; border-radius: var(--radius);
  border: 1.5px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.12s, box-shadow 0.18s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-lg { min-height: 62px; padding: 16px 38px; font-size: 19px; border-radius: 14px; }
.btn-sm { min-height: 46px; padding: 10px 20px; font-size: 16.5px; }

.btn-primary { background: var(--primary); color: var(--primary-fg); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-outline { border-color: var(--foreground); color: var(--foreground); background: transparent; }
.btn-outline:hover { background: var(--foreground); color: var(--surface); }

.btn-gold { border-color: var(--accent); color: var(--dark-fg); background: rgba(176, 141, 87, 0.12); }
.btn-gold:hover { background: var(--accent); color: var(--dark-2); }

.btn-ghost { color: var(--primary); background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); }

.btn-whatsapp { background: var(--success); color: #fff; box-shadow: var(--shadow-sm); }
.btn-whatsapp:hover { background: var(--success-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #7E1717; }

.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 15px; border-radius: var(--radius-full);
  font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
}
.badge-gold { background: var(--accent-soft); color: var(--accent-strong); border: 1px solid rgba(176, 141, 87, 0.35); }
.badge-red { background: rgba(142, 44, 44, 0.1); color: var(--primary); border: 1px solid rgba(142, 44, 44, 0.25); }
.badge-solid-gold { background: var(--accent); color: var(--dark-2); }
.badge-solid-red { background: var(--primary); color: #fff; }
.badge-dark { background: rgba(243, 237, 226, 0.12); color: var(--dark-fg); border: 1px solid rgba(212, 188, 148, 0.35); }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: var(--dark-fg);
  display: flex; align-items: center;
  min-height: clamp(560px, 78vh, 860px);
  isolation: isolate; overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(78deg, rgba(22, 17, 12, 0.94) 0%, rgba(27, 22, 17, 0.82) 38%, rgba(27, 22, 17, 0.45) 68%, rgba(27, 22, 17, 0.55) 100%);
}
.hero-sub { min-height: clamp(380px, 46vh, 520px); }
.hero-inner { width: var(--container); margin-inline: auto; padding: 88px 0; }
.hero .kicker { margin-bottom: 22px; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 5.6vw, 82px);
  font-weight: 600; line-height: 1.06; max-width: 18ch;
  margin-bottom: 26px; text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p.lead { font-size: clamp(19px, 1.5vw, 23px); max-width: 56ch; color: #E7DECD; margin-bottom: 40px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

.trust-row {
  display: flex; gap: 14px 34px; flex-wrap: wrap; margin-top: 48px;
  font-size: 17px; color: var(--dark-muted);
}
.trust-row .trust { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.trust-row .icon { color: var(--accent); }

/* ---------- Kicker / section head ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 15.5px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent-strong); font-weight: 700;
}
.kicker::before { content: ""; width: 44px; height: 1.5px; background: var(--accent); }
.hero .kicker, .section-dark .kicker, .section-darker .kicker, .cta-banner .kicker { color: var(--accent); }

.section { padding: clamp(72px, 9vw, 120px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-dark { background: var(--dark); color: var(--dark-fg); }
.section-darker { background: var(--dark-2); color: var(--dark-fg); }

.section-head { max-width: 780px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .kicker::before { display: none; }
.section-head h1, .section-head h2 {
  font-family: var(--font-display); font-size: clamp(36px, 3.6vw, 56px);
  font-weight: 600; line-height: 1.12; margin: 14px 0 16px; text-wrap: balance;
}
.section-head p { font-size: 20px; color: var(--muted-fg); }
.section-dark .section-head p, .section-darker .section-head p { color: var(--dark-muted); }

/* ---------- Griglie ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
@media (max-width: 1080px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Card ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s, box-shadow 0.22s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover .card-media img { transform: scale(1.045); }
.card-body { padding: 30px 30px 32px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.card-body h3 { font-family: var(--font-display); font-size: 29px; font-weight: 600; line-height: 1.15; }
.card-body p { color: var(--muted-fg); font-size: 18px; }
.card-body .card-cta { margin-top: auto; padding-top: 10px; }
.card-link {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; color: var(--primary); text-decoration: none; font-size: 17.5px;
}
.card-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-link .icon { transition: transform 0.2s; }
.card-link:hover .icon { transform: translateX(4px); }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } }
.split h2 { font-family: var(--font-display); font-size: clamp(34px, 3.2vw, 50px); font-weight: 600; line-height: 1.14; margin: 14px 0 20px; }
.split p { margin-bottom: 18px; font-size: 19px; }
.split-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); position: relative; }
.split-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.split-media figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(22, 17, 12, 0.82));
  color: #EFE8DA; padding: 44px 26px 20px; font-size: 16px;
}

/* ---------- Stats ---------- */
.stats { display: flex; gap: clamp(28px, 4vw, 64px); margin-top: 36px; flex-wrap: wrap; }
.stat .num { font-family: var(--font-display); font-size: clamp(42px, 3.4vw, 56px); font-weight: 700; color: var(--primary); line-height: 1; }
.section-dark .stat .num, .section-darker .stat .num { color: var(--accent); }
.stat .label { font-size: 16.5px; color: var(--muted-fg); margin-top: 8px; max-width: 20ch; }
.section-dark .stat .label, .section-darker .stat .label { color: var(--dark-muted); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; counter-reset: step; position: relative; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; padding: 40px 32px 36px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-size: 58px; font-weight: 700;
  color: var(--accent); display: block; line-height: 1; margin-bottom: 16px;
}
.step h3 { font-family: var(--font-display); font-size: 27px; font-weight: 600; margin-bottom: 10px; }
.step p { color: var(--muted-fg); font-size: 18px; }

/* ---------- Gallery strip ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-grid figure {
  border-radius: var(--radius); overflow: hidden; position: relative;
  aspect-ratio: 1; box-shadow: var(--shadow-sm);
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.gallery-grid figure:hover img { transform: scale(1.05); }
.gallery-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(22, 17, 12, 0.8));
  color: #EFE8DA; padding: 38px 18px 14px; font-size: 15.5px; font-weight: 600;
}

/* ---------- Recensioni ---------- */
.rating-summary {
  display: inline-flex; align-items: center; gap: 18px;
  background: rgba(243, 237, 226, 0.07); border: 1px solid rgba(212, 188, 148, 0.3);
  padding: 18px 28px; border-radius: var(--radius-lg); margin-bottom: 44px;
}
.rating-summary .score { font-family: var(--font-display); font-size: 52px; font-weight: 700; color: var(--accent); line-height: 1; }
.rating-summary .meta { font-size: 16.5px; color: var(--dark-muted); text-align: left; }
.rating-summary .stars { color: var(--accent); letter-spacing: 3px; font-size: 20px; }

.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
@media (max-width: 980px) { .reviews-grid { grid-template-columns: 1fr; } }
.review {
  background: rgba(253, 251, 246, 0.05); border: 1px solid rgba(212, 188, 148, 0.28);
  border-radius: var(--radius-lg); padding: 36px 32px;
  display: flex; flex-direction: column; gap: 16px;
}
.review .stars { color: var(--accent); font-size: 21px; letter-spacing: 4px; }
.review blockquote { font-size: 18.5px; font-style: italic; color: #EDE5D6; flex: 1; }
.review cite { font-style: normal; font-weight: 700; color: var(--accent); font-size: 16.5px; display: flex; align-items: center; gap: 9px; }

/* ---------- Service block ---------- */
.service-block {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(36px, 5vw, 72px);
  align-items: center; padding: clamp(48px, 6vw, 80px) 0;
  border-bottom: 1px solid var(--border);
}
.service-block:last-of-type { border-bottom: none; }
.service-block.flip { grid-template-columns: 1fr 1.05fr; }
.service-block.flip .service-media { order: -1; }
@media (max-width: 980px) {
  .service-block, .service-block.flip { grid-template-columns: 1fr; }
  .service-block.flip .service-media { order: 0; }
}
.service-block h3 { font-family: var(--font-display); font-size: clamp(32px, 2.8vw, 42px); font-weight: 600; margin: 12px 0 16px; }
.service-block p { margin-bottom: 16px; font-size: 19px; }
.service-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.service-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.check-list { list-style: none; margin: 6px 0 26px; display: grid; gap: 13px; }
.check-list li { position: relative; padding-left: 36px; font-size: 18.5px; }
.check-list .icon { color: var(--success); position: absolute; left: 0; top: 5px; }

/* ---------- Filtri e ricerca catalogo ---------- */
.catalog-toolbar {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center; justify-content: space-between;
  margin-bottom: 34px;
}
.search-wrap { position: relative; flex: 1 1 320px; max-width: 480px; }
.search-wrap .icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--muted-fg); pointer-events: none;
}
.input, .select, .textarea {
  width: 100%; min-height: 54px; padding: 12px 18px;
  font-family: var(--font-body); font-size: 18px; color: var(--foreground);
  background: var(--surface); border: 1.5px solid var(--input); border-radius: var(--radius);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.25);
}
.search-wrap .input { padding-left: 52px; }
.select { appearance: none; padding-right: 46px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23675C50' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; cursor: pointer; }

.filter-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 38px; }
.filter-btn {
  font-family: var(--font-body); font-size: 17px; font-weight: 700;
  padding: 12px 26px; min-height: 52px;
  background: var(--surface); color: var(--foreground);
  border: 1.5px solid var(--border); border-radius: var(--radius-full); cursor: pointer;
  transition: all 0.18s;
  display: inline-flex; align-items: center; gap: 8px;
}
.filter-btn .count { font-size: 14.5px; color: var(--muted-fg); font-weight: 600; }
.filter-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.filter-btn.active .count { color: rgba(255, 255, 255, 0.82); }

.results-info { font-size: 17px; color: var(--muted-fg); margin-bottom: 26px; }

/* ---------- Product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
@media (max-width: 1280px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  text-align: left; font-family: var(--font-body); padding: 0; display: block; width: 100%;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.product-card .img-wrap { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-2); position: relative; }
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.product-card:hover .img-wrap img { transform: scale(1.05); }
.product-card .badge { position: absolute; top: 16px; left: 16px; box-shadow: var(--shadow-sm); }
.product-info { display: block; padding: 24px 26px 28px; }
.product-info h3 { font-family: var(--font-display); font-size: 27px; font-weight: 600; margin-bottom: 3px; line-height: 1.2; }
.product-info .origin { display: block; color: var(--muted-fg); font-size: 16.5px; margin-bottom: 12px; }
.product-info .price { display: flex; align-items: baseline; gap: 12px; font-size: 22px; font-weight: 700; color: var(--primary); }
.product-info .price .old { color: var(--muted-fg); text-decoration: line-through; font-weight: 500; font-size: 17.5px; }
.product-info .size { display: block; font-size: 16px; color: var(--muted-fg); margin-top: 7px; }

/* Skeleton */
.skeleton-card { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.skeleton-card .sk-img { aspect-ratio: 4 / 5; }
.skeleton-card .sk-line { height: 18px; border-radius: 6px; margin: 16px 24px; }
.skeleton-card .sk-line.short { width: 45%; }
.sk { background: linear-gradient(100deg, var(--surface-2) 40%, #E7DECB 50%, var(--surface-2) 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

.load-more-wrap { text-align: center; margin-top: 52px; }
.empty-state { text-align: center; padding: 70px 20px; color: var(--muted-fg); font-size: 20px; grid-column: 1 / -1; }
.empty-state .icon-lg { margin: 0 auto 16px; width: 46px; height: 46px; color: var(--accent); }

/* ---------- Dialog ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(27, 22, 17, 0.72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  z-index: 300; padding: clamp(12px, 3vw, 40px);
}
.modal-overlay.open { display: flex; animation: fadeIn 0.22s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  max-width: 1060px; width: 100%; max-height: 92vh; overflow-y: auto;
  display: grid; grid-template-columns: 1.05fr 1fr; position: relative;
  box-shadow: var(--shadow-lg); animation: popIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes popIn { from { opacity: 0; transform: scale(0.96) translateY(10px); } }
@media (max-width: 860px) { .modal { grid-template-columns: 1fr; max-height: 90vh; } .modal .modal-img img { max-height: 44vh; } }
.modal .modal-img { background: var(--surface-2); position: relative; min-height: 320px; }
.modal .modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: clamp(28px, 3.5vw, 48px); }
.modal-body h3 { font-family: var(--font-display); font-size: clamp(30px, 2.6vw, 40px); font-weight: 600; margin-bottom: 6px; line-height: 1.12; }
.modal-body .origin { color: var(--muted-fg); margin-bottom: 18px; font-size: 18px; }
.modal-body .price { display: flex; align-items: baseline; gap: 14px; font-size: 30px; font-weight: 700; color: var(--primary); margin-bottom: 26px; }
.modal-body .price .old { color: var(--muted-fg); text-decoration: line-through; font-weight: 500; font-size: 20px; }
.spec-list { border-top: 1px solid var(--border); margin-bottom: 24px; }
.spec-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 18px; }
.spec-list dt { color: var(--muted-fg); }
.spec-list dd { font-weight: 700; text-align: right; }
.modal-body .desc { color: var(--muted-fg); margin-bottom: 30px; font-size: 18px; }
.modal-ctas { display: grid; gap: 12px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 50px; height: 50px; border-radius: var(--radius-full);
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--foreground); z-index: 3; box-shadow: var(--shadow-sm);
  transition: background 0.18s, color 0.18s;
}
.modal-close:hover { background: var(--primary); color: #fff; }
.modal-nav {
  position: absolute; bottom: 16px; left: 16px; display: flex; gap: 10px; z-index: 3;
}
.modal-nav button {
  width: 50px; height: 50px; border-radius: var(--radius-full);
  background: rgba(253, 251, 246, 0.92); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--foreground); box-shadow: var(--shadow-sm);
  transition: background 0.18s, color 0.18s;
}
.modal-nav button:hover { background: var(--primary); color: #fff; }
.modal-note { font-size: 16px; color: var(--muted-fg); margin-top: 18px; }

/* ---------- Accordion (FAQ) ---------- */
.accordion { display: grid; gap: 14px; }
.accordion details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-xs);
}
.accordion summary {
  list-style: none; cursor: pointer; padding: 22px 26px;
  font-size: 20px; font-weight: 700; font-family: var(--font-body);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  transition: background 0.18s;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:hover { background: var(--surface-2); }
.accordion summary .icon { color: var(--accent-strong); transition: transform 0.25s; flex-shrink: 0; }
.accordion details[open] summary .icon { transform: rotate(45deg); }
.accordion .acc-body { padding: 0 26px 24px; color: var(--muted-fg); font-size: 18.5px; }

/* ---------- Contatti ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(36px, 5vw, 72px); align-items: start; }
@media (max-width: 980px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-item { display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.contact-item:first-child { padding-top: 0; }
.contact-item:last-child { border-bottom: none; }
.contact-item .ico {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: var(--radius);
  background: var(--accent-soft); color: var(--accent-strong);
  display: flex; align-items: center; justify-content: center;
}
.contact-item h3 { font-family: var(--font-display); font-size: 25px; font-weight: 600; margin-bottom: 4px; }
.contact-item p { font-size: 18.5px; color: var(--muted-fg); }
.contact-item a { color: var(--primary); font-weight: 700; text-underline-offset: 3px; }
.map-wrap { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.map-wrap iframe { width: 100%; height: 520px; border: 0; display: block; }

/* ---------- CTA banner ---------- */
.cta-banner { text-align: center; position: relative; overflow: hidden; }
.cta-banner .emblem-bg {
  position: absolute; right: -110px; top: 50%; transform: translateY(-50%);
  width: 460px; opacity: 0.07; pointer-events: none;
}
.cta-banner h2 { font-family: var(--font-display); font-size: clamp(34px, 3.6vw, 54px); font-weight: 600; margin-bottom: 16px; text-wrap: balance; }
.cta-banner p { font-size: 20px; color: var(--dark-muted); max-width: 62ch; margin: 0 auto 36px; }
.cta-banner .hero-ctas { justify-content: center; }
.phone-big {
  font-family: var(--font-display); font-size: clamp(38px, 4.6vw, 60px);
  font-weight: 700; color: var(--accent); text-decoration: none;
  display: inline-flex; align-items: center; gap: 16px; margin-bottom: 26px;
}
.phone-big:hover { color: #fff; }

/* ---------- Footer ---------- */
.footer { background: var(--dark-2); color: var(--dark-muted); padding: 72px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 56px; }
@media (max-width: 1080px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }
.footer img.footer-logo { height: 120px; margin-bottom: 20px; }
.footer h3.footer-h { font-family: var(--font-display); color: var(--dark-fg); font-size: 23px; margin-bottom: 18px; font-weight: 600; }
.footer p { font-size: 17px; margin-bottom: 10px; }
.footer a { color: var(--accent); text-decoration: none; font-size: 17px; text-underline-offset: 3px; }
.footer a:hover { text-decoration: underline; color: #fff; }
.footer ul { list-style: none; display: grid; gap: 12px; }
.footer-bottom {
  border-top: 1px solid rgba(212, 188, 148, 0.18); padding-top: 26px;
  font-size: 15px; color: #94897A;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ---------- Toast ---------- */
.toast-region { position: fixed; bottom: 24px; right: 24px; z-index: 500; display: grid; gap: 12px; }
.toast {
  background: var(--dark); color: var(--dark-fg);
  padding: 16px 22px; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600;
  animation: toastIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  max-width: 380px;
}
.toast .icon { color: var(--accent); }
.toast.success .icon { color: #6FCF97; }
.toast.error .icon { color: #EB5757; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(0.97); } }

/* ---------- Admin ---------- */
.admin-shell { min-height: 100vh; display: flex; flex-direction: column; }
.admin-main { flex: 1; padding: 44px 0 80px; }
.login-card {
  max-width: 460px; margin: 8vh auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 48px 44px; box-shadow: var(--shadow-md); text-align: center;
}
.login-card img { height: 96px; margin: 0 auto 20px; }
.login-card h1 { font-family: var(--font-display); font-size: 34px; font-weight: 600; margin-bottom: 8px; }
.login-card p { color: var(--muted-fg); margin-bottom: 28px; font-size: 17.5px; }
.field { text-align: left; margin-bottom: 18px; }
.field label { display: block; font-size: 16.5px; font-weight: 700; margin-bottom: 8px; }
.field .hint { font-size: 15px; color: var(--muted-fg); margin-top: 6px; }
.field-error { color: var(--danger); font-size: 16px; margin-top: 8px; font-weight: 600; display: none; }
.field-error.show { display: block; }

.admin-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-bottom: 34px;
}
.admin-topbar h1 { font-family: var(--font-display); font-size: clamp(32px, 3vw, 44px); font-weight: 600; }
.admin-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.stat-chip {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 22px; font-size: 16.5px; box-shadow: var(--shadow-xs);
}
.stat-chip strong { font-size: 22px; color: var(--primary); display: block; font-family: var(--font-display); }

.admin-toolbar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 30px; }
.admin-toolbar .search-wrap { flex: 1 1 260px; max-width: 420px; }

.admin-table { display: grid; gap: 14px; }
.admin-row {
  display: grid; grid-template-columns: 84px 1.6fr 1fr 0.8fr auto;
  gap: 20px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 20px; box-shadow: var(--shadow-xs);
}
@media (max-width: 860px) { .admin-row { grid-template-columns: 64px 1fr auto; } .admin-row .hide-sm { display: none; } }
.admin-row img { width: 84px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }
@media (max-width: 860px) { .admin-row img { width: 64px; height: 52px; } }
.admin-row .p-name { font-weight: 700; font-size: 18.5px; }
.admin-row .p-name small { display: block; font-weight: 400; color: var(--muted-fg); font-size: 15.5px; }
.admin-row .p-price { font-weight: 700; color: var(--primary); }
.row-actions { display: flex; gap: 10px; }
.icon-btn {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--foreground); transition: all 0.15s;
}
.icon-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.icon-btn.danger:hover { border-color: var(--danger); background: rgba(160, 33, 33, 0.08); color: var(--danger); }

.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
@media (max-width: 720px) { .admin-form-grid { grid-template-columns: 1fr; } }
.admin-form-grid .full { grid-column: 1 / -1; }
.img-preview {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius); border: 1.5px dashed var(--input); background: var(--surface-2);
}
.admin-modal { max-width: 880px; grid-template-columns: 1fr; }
.admin-modal .modal-body { padding: 40px; }

.banner-note {
  background: var(--accent-soft); border: 1px solid rgba(176, 141, 87, 0.4);
  border-radius: var(--radius); padding: 16px 22px; font-size: 16.5px;
  color: var(--foreground); margin-bottom: 30px; display: flex; gap: 12px; align-items: flex-start;
}
.banner-note .icon { color: var(--accent-strong); margin-top: 4px; flex-shrink: 0; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; } .mt-56 { margin-top: 56px; }
.note-placeholder { font-size: 15.5px; color: var(--muted-fg); font-style: italic; }
.footer .note-placeholder { color: #94897A; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
@media (max-width: 1080px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .post-grid { grid-template-columns: 1fr; } }
.post-card { text-decoration: none; color: var(--foreground); }
.post-card .post-meta { display: flex; gap: 14px; align-items: center; font-size: 15.5px; color: var(--muted-fg); }
.article-head { max-width: 820px; margin: 0 auto clamp(32px, 4vw, 48px); }
.article-head h1 { font-family: var(--font-display); font-size: clamp(36px, 4vw, 58px); font-weight: 600; line-height: 1.12; margin: 18px 0 14px; text-wrap: balance; }
.article-head .post-meta { display: flex; gap: 16px; font-size: 16.5px; color: var(--muted-fg); flex-wrap: wrap; }
.article-cover { max-width: 980px; margin: 0 auto clamp(36px, 4vw, 56px); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; }
.breadcrumb { font-size: 16px; color: var(--muted-fg); margin-bottom: 8px; }
.breadcrumb a { color: var(--accent-strong); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

.prose { max-width: 760px; margin: 0 auto; font-size: 19.5px; }
.prose h2 { font-family: var(--font-display); font-size: clamp(28px, 2.6vw, 38px); font-weight: 600; line-height: 1.2; margin: 48px 0 16px; }
.prose h3 { font-family: var(--font-display); font-size: clamp(23px, 2vw, 28px); font-weight: 600; margin: 36px 0 12px; }
.prose p { margin-bottom: 20px; }
.prose ul, .prose ol { margin: 0 0 22px 26px; }
.prose li { margin-bottom: 10px; }
.prose strong { font-weight: 700; }
.prose a { color: var(--primary); font-weight: 600; text-underline-offset: 3px; }
.prose blockquote { border-left: 3px solid var(--accent); padding: 6px 0 6px 24px; margin: 28px 0; font-style: italic; color: var(--muted-fg); font-size: 21px; }
.prose img { border-radius: var(--radius); margin: 28px 0; }
.prose .prose-cta {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: var(--radius); padding: 26px 28px; margin: 36px 0;
}
.prose .prose-cta p { margin-bottom: 16px; }

/* ---------- Admin tabs ---------- */
.admin-tabs { display: flex; gap: 10px; margin-bottom: 30px; border-bottom: 1.5px solid var(--border); padding-bottom: 0; }
.admin-tab {
  font-family: var(--font-body); font-size: 18px; font-weight: 700; padding: 14px 26px;
  background: none; border: none; border-bottom: 3px solid transparent; cursor: pointer;
  color: var(--muted-fg); min-height: 52px;
}
.admin-tab:hover { color: var(--foreground); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.char-counter { font-size: 15px; color: var(--muted-fg); margin-top: 6px; }
.char-counter.over { color: var(--danger); font-weight: 700; }

/* Fix: bottoni dentro .prose mantengono il testo chiaro */
.prose a.btn { text-decoration: none; }
.prose a.btn-primary { color: var(--primary-fg); }
.prose a.btn-whatsapp { color: #fff; }


/* ---------- Rifiniture mobile ---------- */
.topbar-phone::before { content: " · "; }
@media (max-width: 640px) {
  .topbar { font-size: 15.5px; padding: 10px 18px; line-height: 1.5; }
  .topbar-phone { display: block; margin-top: 2px; }
  .topbar-phone::before { content: ""; }
  .brand { gap: 11px; }
  .brand img { height: 44px; }
  .brand-name { font-size: 21px; letter-spacing: 0.04em; }
  .brand-name small { display: none; }
  .nav-toggle { padding: 10px 15px; min-height: 46px; font-size: 16px; }
  .hero-inner { padding: 60px 0 64px; }
  .hero .kicker { font-size: 13px; letter-spacing: 0.16em; }
  .kicker::before { width: 26px; }
  .hero h1 { font-size: 40px; }
  .hero p.lead { font-size: 18.5px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
  .cta-banner .hero-ctas { align-items: center; }
  .cta-banner .hero-ctas .btn { width: 100%; max-width: 380px; }
  .trust-row { margin-top: 36px; gap: 12px 22px; font-size: 15.5px; }
  .phone-big { font-size: 36px; }
}
@media (max-width: 768px) {
  .hero-scrim {
    background: linear-gradient(180deg, rgba(22, 17, 12, 0.86) 0%, rgba(27, 22, 17, 0.64) 48%, rgba(27, 22, 17, 0.82) 100%);
  }
}


/* Header mobile: fondo pieno, niente blur (sticky stabile) */
@media (max-width: 768px) {
  .header {
    background: var(--surface);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: var(--shadow-xs);
  }
}
