/* =========================================================
   DEMA Impianti — Stylesheet principale
   Palette: bianco + blu (chiaro/scuro), accenti acqua
   ========================================================= */
:root {
  --white:      #ffffff;
  --bg:         #dcecfa;   /* sfondo pagina azzurro chiaro */
  --bg-2:       #e9f3fc;   /* azzurro più tenue */
  --light:      #eaf4fd;   /* azzurrino chiarissimo */
  --light-2:    #dceaf8;
  --ink:        #0e2238;   /* testo blu scuro */
  --ink-soft:   #51647a;
  --line:       #cfe0f1;

  --navy:       #0a2540;   /* blu scuro background */
  --navy-2:     #0d2f52;
  --navy-3:     #103a66;

  --blue:       #1574c4;   /* blu primario */
  --blue-deep:  #0a4d8c;
  --aqua:       #19b6e0;   /* accento acqua */
  --aqua-soft:  #56cbe8;

  --sand:       #c9b79c;   /* accento caldo neutro (sabbia/pietra) */
  --sand-soft:  #e8dccb;
  --sand-deep:  #a8916d;

  --gradient:   linear-gradient(135deg, #19b6e0 0%, #1574c4 50%, #0a4d8c 100%);
  --gradient-soft: linear-gradient(135deg, #e8f1fa 0%, #d4e8f7 100%);

  --shadow-sm:  0 2px 10px rgba(10, 37, 64, 0.07);
  --shadow-md:  0 12px 32px rgba(10, 37, 64, 0.12);
  --shadow-lg:  0 24px 60px rgba(10, 37, 64, 0.18);

  --radius:     8px;
  --max:        1240px;
  --header-h:   78px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #eaf5fd 0%, #d4e8f8 60%, #cfe4f6 100%);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, .brand-text strong { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.text-grad {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ===== Bottoni ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 6px;
  font-weight: 600; font-size: 0.96rem; cursor: pointer;
  border: none; transition: transform .25s, box-shadow .25s, background .25s, color .25s;
  font-family: inherit;
}
.btn .arr { transition: transform .25s; }
.btn:hover .arr { transform: translateX(5px); }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 8px 22px rgba(21,116,196,.32); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(21,116,196,.42); }
.btn-outline { background: transparent; color: var(--blue-deep); border: 1.5px solid var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; transform: translateY(-3px); }
.btn-light { background: #fff; color: var(--blue-deep); box-shadow: var(--shadow-sm); }
.btn-light:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--blue); }
.btn-ghost { background: rgba(255,255,255,.12); color:#fff; border:1px solid rgba(255,255,255,.3); }
.btn-ghost:hover { background: rgba(255,255,255,.22); transform: translateY(-3px); }

.label {
  display: inline-block; font-size: .78rem; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--sand-deep);
  margin-bottom: 16px;
}
/* Eyebrow centrati (home + sottopagine): filetti "sabbia" ai lati */
.section-head .label, .page-hero .label {
  display: inline-flex; align-items: center; gap: 11px;
}
.section-head .label::before, .section-head .label::after,
.page-hero .label::before, .page-hero .label::after {
  content: ""; width: 24px; height: 2px; background: var(--sand); border-radius: 2px;
}

/* =========================================================
   Intro animata (logo che ruota e svanisce)
   ========================================================= */
.intro {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, #e6f2fc 0%, #c2ddf4 100%);
  animation: introFade .3s ease forwards;
  animation-delay: 0.7s;
}
.intro-logo {
  width: 150px; height: auto;
  transform-origin: center;
  animation: introZoom 1s cubic-bezier(.5,0,.75,.25) forwards;
}
/* 1s totale: il logo compare, breve visione, poi zoom via veloce (apertura pagina) */
@keyframes introZoom {
  0%   { transform: scale(.5); opacity: 0; }
  22%  { transform: scale(1);  opacity: 1; }   /* compare (~0,2s) */
  38%  { transform: scale(1);  opacity: 1; }   /* visione brevissima */
  100% { transform: scale(8);  opacity: 0; }   /* zoom via veloce */
}
@keyframes introFade {
  to { opacity: 0; visibility: hidden; }
}
body.has-intro { /* evita scroll durante l'intro */ }
body.intro-done .intro { display: none; }

/* =========================================================
   Header / Navigazione
   ========================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: rgba(10,37,64,.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  z-index: 1000; transition: background .3s, box-shadow .3s, border-color .3s, height .3s;
}
.site-header.scrolled { background: rgba(8,26,46,.96); box-shadow: 0 6px 24px rgba(6,18,32,.28); height: 66px; }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; transition: transform .4s; }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.06); }
.brand-text { line-height: 1.05; font-size: 1.18rem; color: #fff; font-weight: 600; }
.brand-text strong { color: #fff; font-weight: 800; }
.brand-text small {
  display: block; font-size: .62rem; letter-spacing: 2.5px; text-transform: uppercase;
  color: #9fb6cd; font-weight: 500; margin-top: 2px; font-family: 'Inter', sans-serif;
}

.main-nav ul { display: flex; align-items: center; gap: 8px; }
.main-nav a {
  position: relative; padding: 9px 16px; border-radius: 6px;
  font-weight: 500; font-size: .95rem; color: #d3e3f2; transition: color .2s, background .2s;
}
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.1); }
.main-nav a.active { color: #fff; }
.main-nav a.active::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 3px; height: 2px;
  background: var(--gradient); border-radius: 2px;
}
.main-nav .nav-cta {
  background: var(--gradient); color: #fff; margin-left: 8px;
  box-shadow: 0 6px 16px rgba(21,116,196,.3);
}
.main-nav .nav-cta:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(21,116,196,.4); }
.main-nav .nav-cta::after { display: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2.5px; background: #fff; border-radius: 2px; transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* =========================================================
   Sezioni generiche
   ========================================================= */
.section { padding: 110px 0; }
.section-sm { padding: 70px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 60px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -1px; line-height: 1.12; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; margin-top: 16px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   HERO homepage
   ========================================================= */
.hero {
  position: relative; min-height: 82.8vh; display: flex; align-items: center;
  color: #fff; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(115deg, rgba(8,26,46,.82) 0%, rgba(10,55,100,.55) 55%, rgba(8,26,46,.45) 100%),
    var(--hero-img, url('../img/Hero.png'));
  background-size: cover; background-position: center; z-index: 0;
  animation: heroZoom 18s ease-in-out infinite alternate;
}
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 180px;
  background: linear-gradient(to bottom, transparent, #d8ebfa); z-index: 1;
}
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 880px; margin: 0 auto; padding: 120px 24px 90px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 24px;
  background: rgba(25,182,224,.16); border: 1px solid rgba(86,203,232,.5);
  color: #bfeefb; font-size: .8rem; font-weight: 600; letter-spacing: 1.5px;
  padding: 8px 18px; border-radius: 6px;
}
.hero-pill::before { content:""; width: 8px; height: 8px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 12px var(--aqua); }
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; line-height: 1.05; letter-spacing: -1.5px;
  -webkit-text-stroke: .6px #fff; paint-order: stroke fill;
}
.hero h1 .text-grad {
  background: linear-gradient(120deg,#7fe0f5,#19b6e0); -webkit-background-clip:text; background-clip:text; color: transparent;
  -webkit-text-stroke: .6px #2bbbe0;
}
.hero .hero-tagline { font-size: 1.5rem; font-weight: 600; color: #eaf4fb; margin: 16px auto 4px; letter-spacing: .3px; font-family: 'Plus Jakarta Sans', sans-serif; }
.hero p { font-size: 1.2rem; color: #d6e4f0; margin: 22px auto 38px; max-width: 620px; }
.hero p.hero-tagline { margin: 14px auto 2px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Onda decorativa sotto hero non necessaria: gradient già presente */

/* =========================================================
   Sezione slogan / manifesto
   ========================================================= */
.manifesto { background: transparent; text-align: center; }
.manifesto .inner { max-width: 960px; margin: 0 auto; }
.manifesto .tag { font-size: .8rem; letter-spacing: 3px; text-transform: uppercase; color: var(--blue); font-weight: 700; margin-bottom: 26px; }
.manifesto p { font-size: clamp(1.5rem, 3.2vw, 2.5rem); font-weight: 600; line-height: 1.35; letter-spacing: -.5px; }
.manifesto p span { font-style: italic; }
.manifesto .sign { margin-top: 30px; color: var(--ink-soft); letter-spacing: 1px; }

/* =========================================================
   Il tuo progetto in 5 passaggi (foto sx + elenco dx)
   ========================================================= */
.steps-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: stretch; }
.steps-media { position: relative; min-height: 460px; }
.steps-media img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 8px; box-shadow: var(--shadow-md);
}
.steps-content { align-self: center; }
.steps-content h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -1px; line-height: 1.12; margin-bottom: 30px; }
.steps-list { display: grid; gap: 2px; counter-reset: none; }
.step {
  display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start;
  padding: 20px 14px; border-top: 1px solid var(--line); border-radius: 8px;
  transition: background .3s, transform .3s;
}
.step:first-child { border-top: none; }
.step:hover { background: var(--gradient-soft); transform: translateX(5px); }
.step-num {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient); color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.15rem; font-weight: 800; line-height: 1;
  box-shadow: 0 6px 16px rgba(21,116,196,.28);
}
.step-text h3 { font-size: 1.18rem; font-weight: 700; margin-bottom: 4px; letter-spacing: -.2px; }
.step-text p { color: var(--ink-soft); font-size: .94rem; line-height: 1.55; }

/* =========================================================
   Servizi
   ========================================================= */
/* Servizi a lista "a cascata": ogni riga leggermente più a destra */
.services-list { max-width: 1080px; margin: 0 auto; }
.service-row {
  display: grid; grid-template-columns: 58px 1fr auto; gap: 22px; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow-sm); padding: 22px 28px; margin-bottom: 14px;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.service-row:last-child { margin-bottom: 0; }
.service-row:hover { transform: translateX(10px); box-shadow: var(--shadow-md); border-color: var(--aqua-soft); }
.service-ico {
  width: 46px; height: 46px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-soft); color: var(--blue-deep);
  transition: transform .3s, background .3s;
}
.service-ico svg { width: 24px; height: 24px; fill: currentColor; }
.service-row:hover .service-ico { transform: scale(1.08); }
.service-row h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.3px; margin-bottom: 3px; }
.service-row p { color: var(--ink-soft); font-size: .94rem; line-height: 1.5; }
.service-row .arrow { font-size: 1.4rem; color: var(--blue); transition: transform .3s; }
.service-row:hover .arrow { transform: translateX(6px); }

/* Mini-galleria sotto il titolo della sezione servizi (striscia di 4 foto piccole) */
.home-gallery {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
  max-width: 1080px; margin: 0 auto 48px;
}
.hg-cell {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  aspect-ratio: 1 / 1; background: var(--light); cursor: pointer;
}
.hg-cell img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hg-cell:hover img { transform: scale(1.08); }
.hg-cell::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,26,46,.28), transparent 55%);
  opacity: 0; transition: opacity .4s;
}
.hg-cell:hover::after { opacity: 1; }

.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 28px; position: relative; overflow: hidden;
  transition: transform .35s, box-shadow .35s, border-color .35s;
}
.service-card::before {
  content:""; position:absolute; top:0; left:0; right:0; height:4px;
  background: var(--gradient); transform: scaleX(0); transform-origin: left; transition: transform .4s;
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 58px; height: 58px; border-radius: 8px; margin-bottom: 22px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-soft); color: var(--blue-deep);
  transition: transform .35s;
}
.service-card:hover .service-icon { transform: scale(1.1) rotate(-6deg); }
.service-icon svg { width: 30px; height: 30px; }
.service-card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.service-card p { color: var(--ink-soft); font-size: .96rem; }

/* =========================================================
   Stats
   ========================================================= */
.stats {
  position: relative; overflow: hidden;
  background: var(--navy);
  color: #fff;
  padding: 50px 0;
}
.stats::before {
  content:""; position:absolute; top:-45%; right:-6%; width: 540px; height: 540px;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%);
}
.stats::after {
  content:""; position:absolute; bottom:-50%; left:-8%; width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(255,255,255,.10), transparent 65%);
}
.stats-grid {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,1fr); gap: 30px; text-align: center;
}
.stat-ico {
  width: 62px; height: 62px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--aqua-soft);
  transition: transform .35s, background .35s;
}
.stat:hover .stat-ico { transform: translateY(-4px) scale(1.06); background: rgba(86,203,232,.16); }
.stat-ico svg { width: 32px; height: 32px; fill: currentColor; }
.stat .num { font-size: clamp(1.6rem,3vw,2.2rem); font-weight: 800; line-height: 1; color: #fff; }
.stat .num.num-text { font-size: clamp(1.5rem,2.6vw,2rem); }
.stat .lbl { color: rgba(234,243,252,.88); margin-top: 6px; font-size: .9rem; letter-spacing: .3px; }
.stat .divider { display:none; }

/* =========================================================
   CTA finale
   ========================================================= */
.cta-band { background: transparent; }
.cta-flex {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, #0a2540 0%, #0a4d8c 42%, #1574c4 78%, #19b6e0 118%);
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px; padding: 56px 56px;
  box-shadow: 0 28px 62px rgba(8,40,72,.40);
  display: flex; align-items: center; justify-content: space-between; gap: 36px; flex-wrap: wrap;
}
.cta-flex::before { content:""; position:absolute; top:-65%; left:-6%; width: 560px; height: 560px; background: radial-gradient(circle, rgba(255,255,255,.20), transparent 60%); }
.cta-flex::after { content:""; position:absolute; bottom:-60%; right:-8%; width: 480px; height: 480px; background: radial-gradient(circle, rgba(25,182,224,.40), transparent 62%); }
.cta-flex > * { position: relative; z-index: 1; }
.cta-flex h2 { font-size: clamp(1.8rem,3.4vw,2.7rem); font-weight: 800; letter-spacing: -.5px; line-height: 1.18; max-width: 720px; }

/* Banner a tutta larghezza (es. "Dai un'occhiata ai nostri lavori") */
.cta-banner {
  position: relative; overflow: hidden;
  background: var(--navy);
  color: #fff;
  padding: 50px 0;
}
.cta-banner::before {
  content:""; position:absolute; top:-50%; right:-5%; width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 62%);
}
.cta-banner::after {
  content:""; position:absolute; bottom:-55%; left:-8%; width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(255,255,255,.10), transparent 65%);
}
.cta-banner-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta-banner-inner h2 { font-size: clamp(1.6rem,3vw,2.2rem); font-weight: 800; letter-spacing: -.5px; max-width: 720px; }
.cta-banner-actions { display: flex; gap: 14px; flex-wrap: wrap; flex-shrink: 0; }

/* =========================================================
   Page hero (sottopagine)
   ========================================================= */
.page-hero {
  padding: calc(var(--header-h) + 76px) 0 64px; text-align: center;
  position: relative;
  background:
    linear-gradient(to bottom, rgba(10,37,64,.16) 0%, transparent 130px),
    radial-gradient(ellipse 90% 70% at 50% 8%, rgba(25,182,224,.22), transparent 64%);
}
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 800; letter-spacing: -1.2px; line-height: 1.06; }
.page-hero p { color: var(--ink-soft); max-width: 640px; margin: 18px auto 0; font-size: 1.08rem; }

/* =========================================================
   Galleria Lavori (masonry)
   ========================================================= */
.gallery {
  display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 130px; gap: 18px;
}
.gal-cell {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); cursor: pointer; background: var(--light);
}
.gal-cell img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.gal-cell:hover img { transform: scale(1.09); }
.gal-cell .ov {
  position: absolute; inset: 0; padding: 22px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(to top, rgba(8,26,46,.92) 0%, rgba(8,26,46,.25) 45%, transparent 70%);
  color: #fff; opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .4s;
}
.gal-cell:hover .ov { opacity: 1; transform: none; }
.gal-cell .ov span { font-size: .76rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--aqua-soft); margin-bottom: 4px; }
.gal-cell .ov h4 { font-size: 1.2rem; font-weight: 700; }
/* pattern dimensioni */
.gal-cell:nth-child(8n+1){ grid-column: span 7; grid-row: span 4; }
.gal-cell:nth-child(8n+2){ grid-column: span 5; grid-row: span 3; }
.gal-cell:nth-child(8n+3){ grid-column: span 5; grid-row: span 4; }
.gal-cell:nth-child(8n+4){ grid-column: span 4; grid-row: span 3; }
.gal-cell:nth-child(8n+5){ grid-column: span 4; grid-row: span 3; }
.gal-cell:nth-child(8n+6){ grid-column: span 4; grid-row: span 4; }
.gal-cell:nth-child(8n+7){ grid-column: span 8; grid-row: span 3; }
.gal-cell:nth-child(8n+0){ grid-column: span 4; grid-row: span 3; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1500; background: rgba(6,18,32,.92); display: none; align-items: center; justify-content: center; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 78vh; border-radius: 6px; box-shadow: var(--shadow-lg); }
.lightbox .lb-cap { position: absolute; bottom: 6%; left: 0; right: 0; text-align: center; color: #fff; }
.lightbox .lb-cap h4 { font-size: 1.3rem; }
.lightbox .lb-cap span { color: var(--aqua-soft); font-size: .85rem; letter-spacing: 1.5px; text-transform: uppercase; }
.lightbox .lb-close { position: absolute; top: 24px; right: 30px; color: #fff; font-size: 2.4rem; cursor: pointer; line-height: 1; }

/* =========================================================
   Pagina Prodotti (2 colonne 70/30)
   ========================================================= */
/* spazio ridotto sotto il sottotitolo + barra di ricerca prodotti */
.shop-section { padding-top: 30px; }
.shop-search { position: relative; max-width: 520px; margin: 0 auto 30px; }
.shop-search input {
  width: 100%; padding: 13px 16px 13px 46px; border: 1.5px solid var(--line); border-radius: 8px;
  background: #fff; font-family: inherit; font-size: .96rem; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.shop-search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,116,196,.12); }
.shop-search::before {
  content: ""; position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 19px; height: 19px; opacity: .55; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235b6b7d'%3E%3Cpath d='M15.5 14h-.79l-.28-.27a6.5 6.5 0 1 0-.7.7l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0A4.5 4.5 0 1 1 14 9.5 4.5 4.5 0 0 1 9.5 14z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.shop-noresults { color: var(--ink-soft); padding: 16px 0; font-size: 1rem; }

.shop { display: grid; grid-template-columns: 1fr 360px; gap: 36px; align-items: start; }
/* Categorie a fisarmonica (comprimibili) */
.shop-cat-title { margin: 34px 0 18px; }
.shop-cat:first-child .shop-cat-title { margin-top: 0; }
.cat-toggle {
  width: 100%; display: flex; align-items: center; gap: 14px;
  background: none; border: none; padding: 6px 0; cursor: pointer;
  color: var(--ink); font-family: inherit; text-align: left;
}
.cat-toggle::before { content:""; width: 30px; height: 4px; border-radius: 3px; background: var(--gradient); flex-shrink: 0; }
.cat-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -.5px; }
.cat-chevron { width: 24px; height: 24px; fill: var(--blue-deep); margin-left: auto; flex-shrink: 0; transition: transform .3s; }
.cat-toggle[aria-expanded="false"] .cat-chevron { transform: rotate(-90deg); }
.cat-toggle:hover .cat-name { color: var(--blue-deep); }
.product-list.collapsed { display: none; }

.product-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.product-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.product-img { height: 170px; overflow: hidden; background: var(--light); }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product-card:hover .product-img img { transform: scale(1.06); }
.product-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.product-body h4 { font-size: 1.08rem; margin-bottom: 6px; }
.product-body .desc { color: var(--ink-soft); font-size: .9rem; flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.product-price { font-size: 1.25rem; font-weight: 800; color: var(--blue-deep); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.qty button { width: 30px; height: 34px; border: none; background: var(--light); color: var(--blue-deep); font-size: 1.1rem; cursor: pointer; transition: background .2s; }
.qty button:hover { background: var(--light-2); }
.qty input { width: 36px; height: 34px; border: none; text-align: center; font-size: .95rem; font-family: inherit; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.add-cart { width: 100%; margin-top: 14px; justify-content: center; padding: 12px; font-size: .92rem; }

/* Carrello (colonna destra, sticky) */
.cart {
  position: sticky; top: calc(var(--header-h) + 16px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.cart-head { background: var(--navy); color: #fff; padding: 20px 22px; display: flex; align-items: center; gap: 12px; }
.cart-head svg { width: 22px; height: 22px; }
.cart-head h3 { font-size: 1.15rem; }
.cart-head .count { margin-left: auto; background: var(--aqua); color: #06243b; font-weight: 700; font-size: .8rem; padding: 3px 10px; border-radius: 8px; }
.cart-items { max-height: 320px; overflow-y: auto; padding: 8px 18px; }
.cart-empty { text-align: center; color: var(--ink-soft); padding: 36px 10px; font-size: .94rem; }
.cart-empty svg { width: 46px; height: 46px; opacity: .3; margin: 0 auto 12px; }
.cart-row { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: none; }
.cart-row .ci-info { flex: 1; min-width: 0; }
.cart-row .ci-info h5 { font-size: .9rem; font-weight: 600; line-height: 1.3; }
.cart-row .ci-info .ci-meta { font-size: .8rem; color: var(--ink-soft); margin-top: 3px; }
.cart-row .ci-price { font-weight: 700; color: var(--blue-deep); font-size: .92rem; white-space: nowrap; }
.cart-row .ci-rm { background: none; border: none; color: #c0392b; cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 0 0 6px; opacity: .6; transition: opacity .2s; }
.cart-row .ci-rm:hover { opacity: 1; }
.cart-total { padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; border-top: 2px solid var(--line); }
.cart-total .lbl { color: var(--ink-soft); }
.cart-total .val { font-size: 1.5rem; font-weight: 800; color: var(--blue-deep); }
.cart-checkout { padding: 0 22px 22px; }
.cart-checkout .btn { width: 100%; justify-content: center; }

/* Carrello flottante mobile: elementi nascosti su desktop (barra laterale sticky) */
.cart-fab, .cart-close, .cart-backdrop { display: none; }

/* Modale ordine */
.modal { position: fixed; inset: 0; z-index: 1600; background: rgba(6,18,32,.7); display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: 8px; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: pop .35s ease; }
@keyframes pop { from { transform: scale(.92) translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { padding: 24px 28px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { font-size: 1.35rem; }
.modal-head .close { background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--ink-soft); line-height: 1; }
.modal-body { padding: 24px 28px; }
.modal-summary { background: var(--light); border-radius: 6px; padding: 14px 16px; margin-bottom: 22px; font-size: .9rem; }
.modal-summary .ms-row { display: flex; justify-content: space-between; padding: 4px 0; }
.modal-summary .ms-tot { font-weight: 800; color: var(--blue-deep); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-size: 1.05rem; }

/* =========================================================
   Form (contatti + ordine + admin)
   ========================================================= */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .82rem; font-weight: 600; letter-spacing: .5px; color: var(--ink-soft); margin-bottom: 7px; text-transform: uppercase; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 6px;
  background: var(--white); color: var(--ink); font-family: inherit; font-size: .96rem; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,116,196,.12); }
.field textarea { min-height: 120px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; color: var(--ink-soft); margin-bottom: 20px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex-shrink: 0; }
.check a { color: var(--blue); text-decoration: underline; }
.check-group { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 4px; }
.check-inline { display: inline-flex; align-items: center; gap: 8px; font-size: .94rem; color: var(--ink); cursor: pointer; }
.check-inline input { width: 17px; height: 17px; accent-color: var(--blue); cursor: pointer; }

/* Validazione campi */
.field-err { display: block; color: #b0392c; font-size: .8rem; font-weight: 500; margin-top: 6px; }
.field.invalid input, .field.invalid select, .field.invalid textarea {
  border-color: #e0796d; box-shadow: 0 0 0 3px rgba(176,57,44,.12);
}
.check { flex-wrap: wrap; }
.check.invalid > span { color: #b0392c; }
.check .field-err { width: 100%; margin-left: 28px; margin-top: 2px; }

.form-alert { padding: 14px 18px; border-radius: 6px; margin-bottom: 20px; font-size: .95rem; display: none; }
.form-alert.show { display: block; }
.form-alert.ok { background: #e7f7ef; color: #1c7a4d; border: 1px solid #b6e6cd; }
.form-alert.err { background: #fdecea; color: #b0392c; border: 1px solid #f3c4bd; }

/* Honeypot anti-spam (nascosto agli utenti, visibile ai bot) */
.hp-field { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Banner cookie */
.cookie-bar {
  position: fixed; left: 16px; bottom: 16px; right: auto; z-index: 950; max-width: 380px;
  background: var(--navy); color: #e6f0fa; border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; padding: 16px 18px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 12px; font-size: .9rem; line-height: 1.55;
}
.cookie-bar[hidden] { display: none; }
.cookie-bar a { color: var(--aqua-soft); text-decoration: underline; }
.cookie-bar .btn { align-self: flex-start; }
@media (max-width: 560px) { .cookie-bar { right: 84px; max-width: none; } }

/* Pagine legali (privacy) */
.legal { max-width: 820px; margin: 0 auto; }
.legal h2 { font-size: 1.35rem; margin: 32px 0 12px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--ink-soft); line-height: 1.7; }
.legal ul { padding-left: 22px; margin: 10px 0; list-style: disc; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--blue); text-decoration: underline; }

/* =========================================================
   Pagina Contatti
   ========================================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 50px; align-items: start; }
.contact-cards { display: grid; gap: 16px; }
.contact-card {
  display: flex; align-items: center; gap: 18px; padding: 22px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.contact-card:hover { transform: translateX(5px); box-shadow: var(--shadow-sm); border-color: var(--aqua-soft); }
.contact-card .cc-ico { width: 52px; height: 52px; border-radius: 6px; background: var(--gradient-soft); color: var(--blue-deep); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-card .cc-ico svg { width: 26px; height: 26px; }
.contact-card h4 { font-size: .76rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.contact-card p, .contact-card a { font-size: 1.04rem; color: var(--ink); font-weight: 500; }
.contact-card a:hover { color: var(--blue); }
.contact-form-wrap { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 36px; box-shadow: var(--shadow-sm); }
.contact-form-wrap h3 { font-size: 1.5rem; margin-bottom: 24px; letter-spacing: -.5px; }

/* =========================================================
   Pulsanti social flottanti
   ========================================================= */
.float-social { position: fixed; right: 22px; bottom: 22px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.fs-btn {
  width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: var(--shadow-md); position: relative; transition: transform .25s, box-shadow .25s;
}
.fs-btn svg { width: 28px; height: 28px; fill: #fff; }
.fs-btn:hover { transform: scale(1.12) translateY(-2px); box-shadow: var(--shadow-lg); }
.fs-wa { background: #25d366; }
.fs-fb { background: #1877f2; width: 46px; height: 46px; margin-right: 4px; }
.fs-fb svg { width: 24px; height: 24px; }
.fs-ig { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); width: 46px; height: 46px; margin-right: 4px; }
.fs-ig svg { width: 24px; height: 24px; }
.fs-tip {
  position: absolute; right: 64px; top: 50%; transform: translateY(-50%) translateX(6px);
  background: var(--ink); color: #fff; font-size: .8rem; padding: 7px 12px; border-radius: 8px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.fs-tip::before { content:""; position: absolute; right: -5px; top: 50%; transform: translateY(-50%); border: 5px solid transparent; border-left-color: var(--ink); }
.fs-wa:hover .fs-tip { opacity: 1; transform: translateY(-50%) translateX(0); }
.fs-wa { animation: waPulse 2.6s infinite; }
@keyframes waPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(37,211,102,.45); } 50% { box-shadow: 0 0 0 14px rgba(37,211,102,0); } }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--navy); color: #c4d4e3; padding: 70px 0 26px; margin-top: 0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 50px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand { margin-bottom: 16px; }
.footer-brand .brand-text { color: #fff; }
.footer-brand .brand-text strong { color: #fff; }
.footer-desc { font-size: .96rem; max-width: 360px; line-height: 1.7; }
.footer-contacts { margin-top: 22px; display: grid; gap: 12px; }
.footer-contacts li { display: flex; align-items: center; gap: 12px; font-size: .94rem; }
.footer-contacts a:hover { color: #fff; }
.fc-ico { width: 18px; height: 18px; fill: var(--aqua); flex-shrink: 0; }
.site-footer h4 { color: #fff; font-size: .85rem; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 20px; }
.footer-nav ul { display: grid; gap: 11px; }
.footer-nav a { font-size: .95rem; transition: color .2s, padding .2s; }
.footer-nav a:hover { color: #fff; padding-left: 5px; }
.footer-social p { font-size: .94rem; margin-bottom: 18px; }
.social-row { display: flex; gap: 12px; }
.social-row .soc { width: 44px; height: 44px; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); transition: transform .25s, background .25s; }
.social-row .soc svg { width: 22px; height: 22px; fill: #fff; }
.social-row .soc:hover { transform: translateY(-4px); }
.social-row .soc-fb:hover { background: #1877f2; }
.social-row .soc-ig:hover { background: linear-gradient(45deg,#f09433,#dc2743,#bc1888); }
.social-row .soc-wa:hover { background: #25d366; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 24px; font-size: .85rem; color: #8ba3ba; flex-wrap: wrap; gap: 8px; }

/* =========================================================
   Admin
   ========================================================= */
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(ellipse at top, #0d2f52, #061a2e); }
.admin-login { background: #fff; border-radius: 8px; padding: 44px 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); text-align: center; }
.admin-login img { width: 70px; margin: 0 auto 18px; }
.admin-login h1 { font-size: 1.5rem; margin-bottom: 6px; }
.admin-login p { color: var(--ink-soft); margin-bottom: 26px; font-size: .95rem; }

.admin-shell { min-height: 100vh; background: var(--bg); }
.admin-bar { background: var(--navy); color: #fff; padding: 14px 0; position: sticky; top: 0; z-index: 100; }
.admin-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-bar .ab-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.admin-bar .ab-brand img { width: 34px; }
.admin-bar a.logout { color: #cdddec; font-size: .9rem; }
.admin-bar a.logout:hover { color: #fff; }
.admin-tabs { display: flex; justify-content: center; gap: 6px; background: #fff; border-bottom: 1px solid var(--line); padding: 0 24px; overflow-x: auto; }
.admin-tabs a { padding: 16px 20px; font-weight: 600; font-size: .95rem; color: var(--ink-soft); border-bottom: 3px solid transparent; white-space: nowrap; }
.admin-tabs a.active { color: var(--blue-deep); border-bottom-color: var(--blue); }
.admin-tabs a:hover { color: var(--blue); }
.admin-content { padding: 36px 0 80px; }
.admin-content h2 { font-size: 1.6rem; margin-bottom: 6px; }
.admin-content .sub { color: var(--ink-soft); margin-bottom: 26px; }

.cards-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-bottom: 32px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.kpi .k-num { font-size: 2rem; font-weight: 800; color: var(--blue-deep); }
.kpi .k-lbl { color: var(--ink-soft); font-size: .9rem; }

/* Filtri cliccabili (Richieste / Messaggi) */
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 15px; font-size: .9rem; font-weight: 500; color: var(--ink);
  transition: background .2s, color .2s, border-color .2s;
}
.filter-chip:hover { border-color: var(--blue); color: var(--blue-deep); }
.filter-chip .fc-count {
  background: var(--light); color: var(--blue-deep); font-weight: 700; font-size: .78rem;
  padding: 1px 9px; border-radius: 20px;
}
.filter-chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.filter-chip.active .fc-count { background: rgba(255,255,255,.2); color: #fff; }

.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 720px; }
table.data th, table.data td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: top; }
table.data th { background: var(--light); font-weight: 700; color: var(--ink); font-size: .8rem; letter-spacing: .5px; text-transform: uppercase; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: #fafcff; }

.badge { display: inline-block; padding: 4px 12px; border-radius: 8px; font-size: .78rem; font-weight: 700; text-transform: capitalize; }
.badge.nuovo { background: #e3f0ff; color: #1565c0; }
.badge.in.lavorazione, .badge.lavorazione { background: #fff3da; color: #b6791b; }
.badge.evaso { background: #e7f7ef; color: #1c7a4d; }
.badge.completato { background: #e7f7ef; color: #1c7a4d; }
.badge.annullato { background: #fdecea; color: #b0392c; }
.badge.letto { background: #e7f7ef; color: #1c7a4d; }
.badge.non-letto { background: #e3f0ff; color: #1565c0; }

/* Azioni messaggi (segna letto / elimina) */
.msg-actions { display: grid; gap: 8px; min-width: 130px; }
.msg-actions form { margin: 0; }
.msg-actions .btn { width: 100%; justify-content: center; }

/* Gestione admin: form di inserimento sopra (riga propria), lista sotto a tutta larghezza */
.admin-form-grid { display: grid; grid-template-columns: 1fr; gap: 26px; align-items: start; }
.add-form { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 0 22px; align-items: start; }
.add-form .field-row,
.add-form .check,
.add-form .field-full { grid-column: 1 / -1; }
.add-form > button[type="submit"] { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 640px) { .add-form { grid-template-columns: 1fr; } }

/* Form di aggiunta comprimibile (parte chiuso) */
.add-details { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.add-details > summary {
  cursor: pointer; padding: 16px 22px; font-weight: 700; color: var(--blue-deep);
  font-size: 1.05rem; list-style: none; display: flex; align-items: center;
}
.add-details > summary::-webkit-details-marker { display: none; }
.add-details > summary::after { content: "+"; margin-left: auto; font-size: 1.5rem; line-height: 1; }
.add-details[open] > summary::after { content: "–"; }
.add-details[open] > summary { border-bottom: 1px solid var(--line); }
.add-details .panel { border: none; border-radius: 0; padding: 22px; }

/* Liste di gestione a schede con label */
.manage-list { display: grid; gap: 16px; }
.edit-card {
  display: grid; grid-template-columns: 96px 1fr 170px; gap: 18px; align-items: start;
  background: var(--light); border: 1px solid var(--line); border-radius: 8px; padding: 16px;
}
.edit-thumb img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; }
.edit-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; align-items: start; }
.edit-form .field { margin: 0; }
.edit-form .field-full, .edit-form .check { grid-column: 1 / -1; }
.edit-form .check { margin: 2px 0 0; }
.edit-actions { display: grid; gap: 10px; align-content: start; }
.edit-actions > .btn { width: 100%; justify-content: center; }
.edit-actions form { margin: 0; }
.edit-actions form .btn { width: 100%; justify-content: center; }
@media (max-width: 700px) {
  .edit-card { grid-template-columns: 1fr; }
  .edit-thumb img { width: 100%; height: 180px; }
  .edit-form { grid-template-columns: 1fr; }
  .edit-actions { grid-template-columns: 1fr 1fr; align-items: start; }
}
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.panel h3 { font-size: 1.2rem; margin-bottom: 18px; }

/* Liste di gestione (Lavori/Prodotti) più ariose e leggibili */
.panel table.data th { padding: 12px 14px; }
.panel table.data td { padding: 22px 14px; vertical-align: top; }
.panel table.data tbody tr + tr td { border-top: 2px solid var(--line); }
.panel table.data input[type="text"],
.panel table.data input[type="url"],
.panel table.data input[type="file"],
.panel table.data textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px;
  font-family: inherit; font-size: .9rem; background: #fff;
}
.panel table.data textarea { min-height: 70px; }
.panel table.data .mini-thumb { width: 78px; height: 58px; }
.btn-sm { padding: 9px 16px; font-size: .85rem; border-radius: 6px; }
.btn-danger { background: #fdecea; color: #b0392c; border: 1px solid #f3c4bd; }
.btn-danger:hover { background: #b0392c; color: #fff; }
.inline-form { display: inline; }
.mini-thumb { width: 54px; height: 40px; object-fit: cover; border-radius: 6px; }

.order-detail { background: var(--light); border-radius: 6px; padding: 12px 14px; font-size: .86rem; }
.order-detail .od-item { display: flex; justify-content: space-between; padding: 3px 0; }
.status-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.status-form select, .status-form input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: .85rem; }

.flash { padding: 14px 18px; border-radius: 6px; margin-bottom: 22px; font-weight: 500; }
.flash.ok { background: #e7f7ef; color: #1c7a4d; border: 1px solid #b6e6cd; }
.flash.err { background: #fdecea; color: #b0392c; border: 1px solid #f3c4bd; }

/* =========================================================
   RESTYLING HOMEPAGE
   Accento caldo "sabbia/pietra", texture finissima a grana,
   hero rifinito (eyebrow · trust · scroll). Scope: body.home
   ========================================================= */

/* Hero: alleggerisco il contorno del titolo + luce "caustica" morbida */
body.home .hero h1 { -webkit-text-stroke: .3px rgba(255,255,255,.55); }
body.home .hero h1 .text-grad { -webkit-text-stroke: .3px rgba(43,187,224,.7); }
body.home .hero-content::before {
  content: ""; position: absolute; left: 50%; top: 40%; transform: translate(-50%,-50%);
  width: 680px; height: 680px; max-width: 120vw; z-index: -1; pointer-events: none;
  background: radial-gradient(circle, rgba(86,203,232,.22), transparent 62%);
  filter: blur(8px);
}

/* Trust signals sotto i bottoni dell'hero */
.hero-trust {
  list-style: none; display: flex; gap: 14px 30px; justify-content: center; flex-wrap: wrap;
  margin: 34px 0 0; padding: 0;
}
.hero-trust li { display: inline-flex; align-items: center; gap: 9px; font-size: .94rem; font-weight: 500; color: #dcebf6; letter-spacing: .2px; }
.hero-trust svg { width: 18px; height: 18px; color: var(--aqua-soft); flex-shrink: 0; }

/* Indicatore di scroll animato in fondo all'hero */
.hero-scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3;
  width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.5); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 8px;
  transition: border-color .3s, transform .3s;
}
.hero-scroll:hover { border-color: #fff; transform: translateX(-50%) translateY(3px); }
.hs-dot { width: 5px; height: 8px; border-radius: 3px; background: #fff; animation: hsMove 1.7s ease-in-out infinite; }
@keyframes hsMove { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(13px); opacity: 0; } 100% { opacity: 0; } }

/* Mini-galleria: cornice/velo caldo coerente con l'accento sabbia */
body.home .hg-cell:hover { border-color: var(--sand); }
body.home .hg-cell::after { background: linear-gradient(to top, rgba(60,46,26,.30), transparent 55%); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .shop { grid-template-columns: 1fr; }
  .cards-row { grid-template-columns: repeat(2,1fr); }
  .admin-form-grid { grid-template-columns: 1fr; }

  /* Icona carrello flottante in basso a sinistra (simmetrica alle social a destra) */
  .cart-fab {
    position: fixed; left: 22px; bottom: 22px; z-index: 1450;
    width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--gradient); color: #fff; box-shadow: var(--shadow-md);
    display: flex; align-items: center; justify-content: center;
    transition: transform .25s, box-shadow .25s;
  }
  .cart-fab:hover { transform: scale(1.1) translateY(-2px); box-shadow: var(--shadow-lg); }
  .cart-fab svg { width: 28px; height: 28px; }
  .cart-fab-badge {
    position: absolute; top: -5px; right: -5px; min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 11px; background: var(--aqua); color: #06243b;
    font-weight: 700; font-size: .76rem; line-height: 1;
    display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
  }
  .cart-fab-badge.empty { display: none; }

  /* Carrello come pannello a comparsa dal basso (bottom sheet) */
  .cart {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1500;
    border-radius: 16px 16px 0 0; max-height: 85vh;
    display: flex; flex-direction: column;
    transform: translateY(105%); transition: transform .35s ease;
    box-shadow: 0 -12px 40px rgba(6,18,32,.3);
  }
  .cart.open { transform: translateY(0); }
  .cart-items { max-height: none; flex: 1 1 auto; }
  .cart-close {
    display: block; margin-left: 6px; background: none; border: none;
    color: #fff; font-size: 1.9rem; line-height: 1; cursor: pointer; padding: 0;
  }

  /* Sfondo scuro dietro al pannello */
  .cart-backdrop {
    display: block; position: fixed; inset: 0; z-index: 1490;
    background: rgba(6,18,32,.6);
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .cart-backdrop.open { opacity: 1; visibility: visible; }
  body.cart-open { overflow: hidden; }
}
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-header { background: rgba(8,26,46,.94); }
  .site-header.scrolled { background: rgba(8,26,46,.98); }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: rgba(8,26,46,.98); backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 18px 36px rgba(6,18,32,.4);
    transform: translateY(-130%); opacity: 0; transition: transform .35s ease, opacity .35s ease;
    padding: 14px 0 20px;
  }
  .site-header.scrolled .main-nav { top: 66px; }
  .main-nav.open { transform: translateY(0); opacity: 1; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; padding: 8px 18px; }
  .main-nav li { width: 100%; }
  .main-nav a {
    display: block; padding: 15px 18px; border-radius: 6px; font-size: 1.05rem;
    color: #e6f0fa; border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .main-nav li:last-child a { border-bottom: none; }
  .main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
  .main-nav a.active::after { display: none; }
  .main-nav .nav-cta {
    margin: 12px 0 0; text-align: center; justify-content: center;
    border-bottom: none; font-size: 1rem;
  }

  .services-grid { grid-template-columns: repeat(2,1fr); }
  /* Mini-galleria: sempre su una sola riga, le foto si rimpiccioliscono */
  .home-gallery { grid-template-columns: repeat(5,1fr); gap: 8px; max-width: 100%; margin-bottom: 38px; }
  .steps-grid { grid-template-columns: 1fr; gap: 34px; }
  .steps-media { min-height: 300px; max-height: 380px; }
  .stats-grid { grid-template-columns: repeat(3,1fr); gap: 18px; }
  .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 34px; }
  .footer-social { grid-column: span 2; }

  .gallery { grid-template-columns: repeat(6,1fr); grid-auto-rows: 110px; }
  .gal-cell:nth-child(8n+1){ grid-column: span 6; grid-row: span 3; }
  .gal-cell { grid-column: span 3 !important; grid-row: span 2 !important; }
  .gal-cell .ov { opacity: 1; transform: none; background: linear-gradient(to top, rgba(8,26,46,.9), transparent 60%); }
}
@media (max-width: 600px) {
  .section { padding: 70px 0; }
  .product-list { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .service-row { margin-left: 0; padding: 18px 18px; gap: 14px; grid-template-columns: 44px 1fr auto; }
  .service-ico { width: 44px; height: 44px; }
  .service-ico svg { width: 22px; height: 22px; }
  .stats-grid { grid-template-columns: repeat(3,1fr); gap: 10px; }
  .stat .num { font-size: 1.5rem; }
  .stat .lbl { font-size: .78rem; }
  .field-row { grid-template-columns: 1fr; }
  .cta-flex { flex-direction: column; align-items: flex-start; text-align: left; }
  .cta-banner-inner { flex-direction: column; align-items: flex-start; text-align: left; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-social { grid-column: span 1; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .gal-cell { grid-column: span 1 !important; grid-row: span 1 !important; }
  .brand-text small { display: none; }
  .cards-row { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: calc(var(--header-h) + 40px) 0 50px; }
  .hero-trust { gap: 10px 20px; margin-top: 26px; }
  .hero-trust li { font-size: .86rem; }
  .hero-scroll { display: none; }
  .home-gallery { gap: 6px; }

  /* Barra tab admin: con il centraggio i tab in eccesso vengono tagliati sul lato
     iniziale e restano irraggiungibili. Su mobile allineo a sinistra così lo scroll
     orizzontale mostra tutte le voci, e compatto padding/font per farne stare di più. */
  .admin-tabs { justify-content: flex-start; padding: 0 12px; -webkit-overflow-scrolling: touch; }
  .admin-tabs a { padding: 14px 14px; font-size: .9rem; }
}
