/* Mercati Online Live — pagina pubblica negozio */

@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations"); }

:root {
  --green: #16a36a; --green-dark: #0d7d50; --green-deep: #06291c;
  --ink: #0d1b3e; --slate: #475677; --muted: #7a86a1; --line: #e4e9f3;
  --bg: #fff; --bg-soft: #f4f7fc; --bg-green: #e8f7f0;
  --wa: #25d366; --wa-dark: #1da851; --red: #e5484d;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --radius: 16px;
  --shadow-sm: 0 2px 10px rgba(13,27,62,.06);
  --shadow: 0 14px 40px rgba(13,27,62,.10);
  --shadow-lg: 0 30px 70px rgba(13,27,62,.16);
  --t: .25s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6;
  -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.ico { width: 1.15em; height: 1.15em; flex-shrink: 0; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 6px; }

/* ── dot / pill / chip ───────────────────────────────────────────────── */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.dot.on { background: #2ee08a; box-shadow: 0 0 0 0 rgba(46,224,138,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46,224,138,.55); } 70% { box-shadow: 0 0 0 8px rgba(46,224,138,0); } 100% { box-shadow: 0 0 0 0 rgba(46,224,138,0); } }
@media (prefers-reduced-motion: reduce) { .dot.on { animation: none; } html { scroll-behavior: auto; } }

/* ── bottoni ─────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700;
  font-family: var(--head); padding: 12px 22px; border-radius: 999px; transition: transform var(--t), box-shadow var(--t), background var(--t);
  white-space: nowrap; font-size: .95rem; }
.btn:hover { transform: translateY(-2px); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 10px 24px rgba(37,211,102,.35); }
.btn-wa:hover { background: var(--wa-dark); }
.btn-light { background: #fff; color: var(--green-dark); box-shadow: var(--shadow-sm); }
.btn-ghost { border: 1px solid var(--line); background: #fff; }
.btn-block { width: 100%; }

/* ── barra alta + navigazione ────────────────────────────────────────── */
.topbar { background: var(--ink); color: rgba(255,255,255,.78); font-size: .78rem; text-align: center; padding: 7px 16px; }
.topbar b { color: #fff; }
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 66px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, var(--green), var(--green-dark)); color: #fff; font: 800 1.15rem var(--head); }
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-txt strong { font-family: var(--head); font-weight: 800; font-size: 1.05rem; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-txt small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .76rem; }
.nav-actions { display: flex; gap: 8px; flex-shrink: 0; }
.nav .btn { padding: 10px 18px; }
@media (max-width: 560px) { .hide-sm { display: none; } .nav .btn-wa span { display: none; } .nav .btn-wa { padding: 10px 12px; } }

/* ── hero ────────────────────────────────────────────────────────────── */
.hero { background: radial-gradient(1200px 500px at 85% 10%, rgba(46,224,138,.18), transparent 60%),
  linear-gradient(135deg, var(--green-deep) 0%, #0b5a3a 55%, var(--green) 130%); color: #fff; padding: 56px 0 64px; }
.hero-in { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero-in { grid-template-columns: 1.15fr .85fr; gap: 56px; } .hero { padding: 72px 0 84px; } }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); font-size: .82rem; font-weight: 600; }
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.4rem); margin: 18px 0 14px; max-width: 14ch; text-wrap: balance; }
.lead { font-size: 1.07rem; color: rgba(255,255,255,.86); max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.hours-card { background: #fff; color: var(--ink); border-radius: 22px; padding: 24px; box-shadow: var(--shadow-lg); }
.hc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .88rem; }
.chip-open { background: var(--bg-green); color: var(--green-dark); }
.chip-closed { background: #fdecec; color: #b42328; }
.chip-closed .dot { background: var(--red); }
.hc-title { font-family: var(--font); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 20px 0 8px; }
.hours { list-style: none; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; color: var(--slate); }
.hours li:last-child { border-bottom: 0; }
.hours li b { color: var(--ink); font-weight: 600; text-align: right; }
.hours li.today, .hours li.today b { color: var(--green-dark); font-weight: 700; }
.hc-contacts { display: grid; gap: 8px; margin-top: 14px; font-size: .92rem; color: var(--slate); }
.hc-contacts a, .hc-contacts span { display: flex; align-items: center; gap: 10px; }
.hc-contacts .ico { color: var(--green); }

/* ── titoli sezione ──────────────────────────────────────────────────── */
section { padding: 64px 0; }
@media (min-width: 900px) { section { padding: 88px 0; } }
.sec-title { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.eyebrow { display: inline-block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: var(--green); margin-bottom: 8px; }
.sec-title h2, .about h2, .final h2 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); }
.sec-title p { color: var(--slate); margin-top: 12px; }
.empty { text-align: center; color: var(--muted); }

/* ── camere ──────────────────────────────────────────────────────────── */
.cams-sec { background: var(--bg-soft); }
.cam-grid { display: grid; gap: 22px; }
@media (min-width: 700px) { .cam-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cam-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 700px) { .cam-grid.cols-1 { grid-template-columns: minmax(0, 820px); justify-content: center; } }
.cam-card { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform var(--t), box-shadow var(--t); }
.cam-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cam-feed { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; background: #1b2740 linear-gradient(135deg, #22314f, #111a2e); overflow: hidden; cursor: zoom-in; }
.cam-feed img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s ease, filter .3s; }
.cam-feed img.loading { opacity: .35; }
.badge { position: absolute; top: 12px; z-index: 2; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; }
.badge-live { left: 12px; background: var(--red); color: #fff; box-shadow: 0 4px 12px rgba(229,72,77,.35); }
.badge-live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.badge-time { right: 12px; background: rgba(10,16,30,.62); color: #fff; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-weight: 600; letter-spacing: .02em; }
.badge-time:empty { display: none; }
.is-closed .badge-live { background: #4b5675; box-shadow: none; }
.is-stale .badge-live { background: #4b5675; box-shadow: none; }
.zoom-hint { position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(10,16,30,.55); color: #fff; opacity: 0; transition: opacity var(--t); }
.cam-feed:hover .zoom-hint, .cam-feed:focus-visible .zoom-hint { opacity: 1; }
.offline-msg { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: rgba(255,255,255,.8); font-size: .88rem; text-align: center; padding: 20px; background: rgba(13,27,62,.55); }
.offline-msg .ico { width: 30px; height: 30px; opacity: .7; }
.is-stale .offline-msg { display: flex; }
.is-stale { cursor: default; }
.is-stale img { filter: grayscale(.8) brightness(.6); }
.cam-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cam-n { font-size: .72rem; font-weight: 800; letter-spacing: .12em; color: var(--green); }
.cam-body h3 { font-size: 1.2rem; }
.cam-body p { color: var(--slate); font-size: .93rem; }
.cam-upd { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--muted); }
.cam-upd .ico { color: var(--green); }

/* ── chi siamo ───────────────────────────────────────────────────────── */
.about-in { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .about-in { grid-template-columns: 1.3fr .7fr; gap: 64px; } }
/* Con la foto del negozio la sezione va su tre blocchi: testo, numeri, foto.
   Da 900 px in su la foto scende sotto i numeri nella colonna stretta, come
   nella demo di riferimento; sotto, tutto in colonna singola. */
@media (min-width: 900px) {
  .about-in:has(.about-img) { grid-template-columns: 1.3fr .7fr; }
  .about-in:has(.about-img) .about-img { grid-column: 2; }
}
.about-img { border-radius: 20px; aspect-ratio: 4 / 3; overflow: hidden;
             background: var(--bg-green); box-shadow: var(--shadow); }
.about-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about h2 { margin-bottom: 16px; }
.about p { color: var(--slate); margin-bottom: 12px; max-width: 62ch; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (min-width: 900px) { .stats { grid-template-columns: 1fr; } }
.stat { background: var(--bg-green); border-radius: var(--radius); padding: 18px; text-align: center; }
.stat b { display: block; font: 800 clamp(1.6rem, 4vw, 2.2rem) var(--head); color: var(--green-dark); }
.stat span { font-size: .82rem; color: var(--slate); }

/* ── contatti ────────────────────────────────────────────────────────── */
.contact { background: var(--bg-soft); }
.contact-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ccard { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--line); transition: transform var(--t), box-shadow var(--t); }
a.ccard[href]:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ccard small { color: var(--muted); font-size: .82rem; margin-top: 10px; }
.ccard b { font-family: var(--head); font-size: 1.05rem; overflow-wrap: anywhere; }
.cico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-green); color: var(--green-dark); }
.cico .ico { width: 22px; height: 22px; }
.cico-wa { background: var(--wa); color: #fff; }

/* ── call to action finale ───────────────────────────────────────────── */
.final { background: linear-gradient(135deg, var(--green-deep), #0b5a3a); color: #fff; text-align: center; }
.final-in { max-width: 680px; }
.final p { color: rgba(255,255,255,.82); margin-top: 12px; }
.final .hero-cta { justify-content: center; }

/* ── footer ──────────────────────────────────────────────────────────── */
.footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 36px 0 24px; font-size: .88rem; }
.footer .brand-txt strong { color: #fff; }
.footer .brand-txt small { color: rgba(255,255,255,.6); }
.footer-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a:hover, .linklike:hover { color: #fff; }
.linklike { color: rgba(255,255,255,.7); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 24px; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; }
.footer-bottom b { color: #fff; }

/* ── finestre (privacy, ingrandimento) ───────────────────────────────── */
dialog { border: 0; margin: auto; }
dialog::backdrop { background: rgba(6,14,30,.72); backdrop-filter: blur(3px); }
.modal { max-width: 560px; width: calc(100% - 32px); border-radius: 20px; padding: 28px; color: var(--ink); }
.modal h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 1.25rem; }
.modal h3 .ico { color: var(--green); width: 26px; height: 26px; }
.modal p { color: var(--slate); margin-bottom: 10px; font-size: .95rem; }
.modal-x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: var(--muted); }
.modal-x:hover { background: var(--bg-soft); color: var(--ink); }
.lightbox { background: transparent; max-width: min(1200px, 96vw); width: 100%; padding: 0; overflow: visible; }
.lightbox img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; border-radius: 12px; background: #000; }
.lightbox p { color: #fff; text-align: center; margin-top: 10px; font-weight: 600; }
.lightbox .modal-x { top: -44px; right: 0; color: #fff; background: rgba(255,255,255,.12); }

/* ── indice negozi / 404 ─────────────────────────────────────────────── */
.index-hero { padding: 64px 0 40px; }
.index-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 14px 0 10px; }
.index-hero p { color: var(--slate); max-width: 56ch; }
.shop-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); padding-bottom: 72px; }
.shop-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-sm); transition: transform var(--t), box-shadow var(--t); }
.shop-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.shop-item .brand-txt small { color: var(--muted); }
.shop-item p { color: var(--slate); font-size: .9rem; }
.page-404 { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.page-404 h1 { font-size: 3rem; margin-bottom: 8px; }
.page-404 p { color: var(--slate); margin-bottom: 20px; }

/* Invito a scorrere sotto i pulsanti dell'hero, ripreso dalla demo. */
.scroll-down { display: none; flex-direction: column; align-items: center; gap: 6px;
               margin-top: 32px; color: rgba(255,255,255,.85); font-size: .82rem;
               font-weight: 600; width: fit-content; transition: color var(--t); }
.scroll-down:hover { color: #fff; }
.scroll-down .chev { width: 40px; height: 40px; border-radius: 50%;
                     background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
                     display: flex; align-items: center; justify-content: center;
                     animation: bob 1.8s ease-in-out infinite; }
.scroll-down .chev svg { width: 20px; height: 20px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
/* Su telefono i banchi sono già a portata di pollice: la freccia non serve. */
@media (min-width: 760px) { .scroll-down { display: flex; } }
/* Chi preferisce meno movimento non vede l'animazione. */
@media (prefers-reduced-motion: reduce) { .scroll-down .chev { animation: none; } }
