/* Campania Senza Glutine — design tokens */
@font-face {
  font-family: "Lazydog";
  src: url("../fonts/Lazydog.otf") format("opentype"),
       url("../fonts/Lazydog.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --color-sea: #420000;
  --color-sea-dark: #420000;
  --color-terracotta: #d04a2a;
  --color-terracotta-soft: #e89a7a;
  --color-lemon: #ffde59;
  --color-red: #c0341d;
  --color-cream: #fdf4cf;
  --color-sand: #f7e3a0;
  --color-ink: #141414;
  --color-muted: #3a3a3a;
  --color-white: #ffffff;
  --font-display: "Lazydog", "Cormorant Garamond", Georgia, serif;
  --font-card: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(66, 0, 0, 0.12);
  --header-h: 72px;
  --max-width: 1100px;
  --transition: 0.2s ease;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --page-pad-x: max(1rem, var(--safe-left), var(--safe-right));
}

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

html {
  scroll-behavior: smooth;
  width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-ink);
  background: #ffde59;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  cursor: default;
}

/* Niente cursore lampeggiante / I-beam sul testo decorativo (guida, province, intro collegata) */
body:not(.page-sub) *:not(input):not(textarea):not(select):not([contenteditable="true"]) {
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
}

body:not(.page-sub) input,
body:not(.page-sub) textarea,
body:not(.page-sub) select {
  user-select: text;
  -webkit-user-select: text;
  caret-color: auto;
  cursor: text;
}

a[href],
button,
.btn,
.chip,
.filter-btn,
.fav-toggle,
.card-fav,
.nav-toggle,
.scroll-top-btn,
.hub-card,
.star-label,
label[for],
[role="button"] {
  cursor: pointer;
}

button,
input,
select,
textarea,
.btn,
.chip,
.filter-btn,
.fav-toggle,
.card-fav {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(66, 0, 0, 0.12);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-sea);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-terracotta);
}

.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--color-sea);
  color: var(--color-white);
  border-radius: var(--radius);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2 * var(--page-pad-x), var(--max-width));
  margin-inline: auto;
}

.container.narrow {
  max-width: 640px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: var(--safe-top);
  background: rgba(255, 222, 89, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e9c64a;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2 * var(--page-pad-x), var(--max-width));
  margin-inline: auto;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-sea-dark);
}

.logo-mark {
  width: 3.75rem;
  height: 3.75rem;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(66, 0, 0, 0.25));
  transition: transform var(--transition);
}

.logo:hover .logo-mark {
  transform: scale(1.05);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-sea-dark);
}

.logo-text em {
  font-style: italic;
  color: var(--color-sea-dark);
}

.nav ul {
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  font-weight: 500;
  text-decoration: none;
  color: var(--color-ink);
}

.nav a:hover {
  color: var(--color-terracotta);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle-bar {
  position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bar::before {
  top: -7px;
}

.nav-toggle-bar::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: clamp(420px, 70vh, 560px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 222, 89, 0.94) 0%, rgba(255, 222, 89, 0.82) 45%, rgba(255, 222, 89, 0.62) 100%),
    url("https://images.unsplash.com/photo-1720360572655-35bf522fcf17?fm=jpg&q=72&w=2400&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23420000' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  width: min(100% - 2 * var(--page-pad-x), var(--max-width));
  margin-inline: auto;
  padding: 4rem 0 4.25rem;
  color: var(--color-sea-dark);
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.45rem 1.1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-lemon);
  background: var(--color-sea-dark);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(66, 0, 0, 0.25);
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 6.5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
}

.hero h1:focus {
  outline: none;
}

.hero-accent {
  display: block;
  color: var(--color-sea-dark);
}

.hero-lead {
  max-width: 32rem;
  margin: 0 0 2rem;
  font-size: 1.125rem;
  color: var(--color-ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  margin-top: 0.25rem;
}

.hero-actions .btn.is-active,
.hero-actions #hero-near-btn.is-active {
  background: var(--color-sea-dark);
  border-color: var(--color-sea-dark);
  color: var(--color-lemon);
}

.hero-actions #hero-near-btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--color-sea-dark);
  color: var(--color-lemon);
  border-color: var(--color-sea-dark);
  box-shadow: 0 10px 26px rgba(66, 0, 0, 0.28);
}

.btn-primary:hover {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-sea-dark);
  border-color: var(--color-sea-dark);
}

.btn-ghost:hover {
  background: var(--color-sea-dark);
  color: var(--color-lemon);
  transform: translateY(-2px);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-head {
  margin-bottom: 2.5rem;
  max-width: 36rem;
}

.section-head h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--color-sea-dark);
  user-select: none;
  caret-color: transparent;
}

#locali {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

#locali:focus,
#locali:focus-visible {
  outline: none;
}

.places.section:target {
  outline: none;
}

.section-head p {
  margin: 0;
  color: var(--color-muted);
}

.intro {
  background: transparent;
}

.intro h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-sea-dark);
}

.intro p {
  margin: 0 0 1rem;
  color: var(--color-muted);
}

.intro p:last-child {
  margin-bottom: 0;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-sea-dark);
  background: var(--color-white);
  border: 1.5px solid var(--color-sea-dark);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: var(--transition);
}

.filter-btn:hover {
  background: rgba(66, 0, 0, 0.08);
}

.filter-btn.is-active {
  background: var(--color-sea-dark);
  border-color: var(--color-sea-dark);
  color: var(--color-lemon);
}

/* Search bar */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1.25rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  display: flex;
  color: var(--color-muted);
  pointer-events: none;
}

#search-input {
  width: 100%;
  padding: 0.95rem 3rem 0.95rem 3rem;
  font-family: var(--font-body);
  font-size: max(1rem, 16px);
  color: var(--color-ink);
  background: var(--color-white);
  border: 1px solid var(--color-sand);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
}

#search-input:focus {
  outline: none;
  border-color: var(--color-sea);
  box-shadow: 0 0 0 4px rgba(184, 67, 31, 0.15);
}

.search-clear {
  position: absolute;
  right: 0.85rem;
  width: 28px;
  height: 28px;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--color-muted);
  background: var(--color-sand);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.search-clear:hover {
  color: var(--color-ink);
}

/* Controls row */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.controls .filters {
  margin-bottom: 0;
}

.comune-select select {
  padding: 0.5rem 2rem 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-sea-dark);
  background: var(--color-white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23b8431f' d='M6 8 0 0h12z'/%3E%3C/svg%3E")
    no-repeat right 0.9rem center;
  border: 1px solid var(--color-sand);
  border-radius: 999px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.comune-select select:focus {
  outline: none;
  border-color: var(--color-sea);
}

/* Map */
.map-wrap {
  margin: 0 0 2rem;
}

.map {
  height: 460px;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(66, 0, 0, 0.18);
  overflow: hidden;
  z-index: 1;
}

.map-caption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  text-align: center;
}

/* Segnaposto personalizzato */
.csg-pin-dot {
  display: block;
  width: 18px;
  height: 18px;
  background: var(--color-terracotta);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}

.csg-user-dot {
  display: block;
  width: 14px;
  height: 14px;
  background: #2563eb;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25);
}

.popup-addr {
  font-size: 0.82rem;
  color: var(--color-muted);
}

@media (max-width: 600px) {
  .map { height: min(340px, 45dvh); }
}

.map .leaflet-popup-content {
  font-family: var(--font-body);
  line-height: 1.5;
}

.popup-badge {
  display: inline-block;
  margin: 0.2rem 0;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-sea-dark);
  background: var(--color-sand);
  border-radius: 4px;
}

.results-count {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-muted);
}

.no-results {
  padding: 2rem;
  text-align: center;
  color: var(--color-muted);
  background: var(--color-white);
  border-radius: var(--radius-lg);
}

/* Cards */
.crawl-locali-list {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(66, 0, 0, 0.08);
}

.crawl-locali-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.crawl-locali-list a {
  color: var(--color-ink);
  text-decoration: none;
  font-size: 0.95rem;
}

.crawl-locali-list a:hover {
  text-decoration: underline;
}

.js-ready .crawl-locali-list {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card.is-hidden {
  display: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(66, 0, 0, 0.2);
}

.card-photo {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-terracotta), var(--color-sea-dark));
  background-size: cover;
  background-position: center;
}

.photo-google-stack {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
  pointer-events: none;
}

.photo-google-stack--compact {
  left: 0.4rem;
  bottom: 0.4rem;
  gap: 0.14rem;
}

.detail-media .photo-google-stack {
  left: 1rem;
  bottom: 1rem;
  gap: 0.22rem;
}

.photo-credit-google {
  display: inline-block;
  margin: 0;
  padding: 0.22rem 0.5rem;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: #fff;
  background: rgba(0, 0, 0, 0.82);
  border-radius: 3px;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.photo-google-stack--compact .photo-credit-google {
  padding: 0.16rem 0.42rem;
  font-size: 9px;
}

.detail-media .photo-credit-google {
  font-size: 11px;
  padding: 0.26rem 0.55rem;
}

.card-photo.is-google-photo .photo-rating-badge,
.detail-media.is-google-photo .photo-rating-badge {
  left: auto;
  right: 0.45rem;
  bottom: 0.45rem;
}

.detail-media.is-google-photo .photo-rating-badge {
  right: 1rem;
  bottom: 1rem;
}

.card-body {
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.5rem 1.5rem;
}

.card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: inline-block;
  padding: 0.3rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.photo-tags {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  max-width: calc(100% - 4rem);
  pointer-events: none;
}

.detail-media .photo-tags {
  max-width: calc(100% - 5rem);
}

.photo-tags .photo-tag,
.photo-tags .tag-chip {
  pointer-events: auto;
}

.photo-tag,
.photo-tags .tag-chip {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.32rem 0.7rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: default;
}

.photo-tags .tag-chip {
  cursor: pointer;
  transition: filter 0.15s ease;
}

.photo-tags .tag-chip:hover {
  filter: brightness(1.08);
}

.photo-tag--level {
  text-transform: uppercase;
}

.photo-tag--tipo {
  background: var(--color-sea-dark);
  color: var(--color-lemon);
}

.card-tags {
  display: none;
}

.tag-chip {
  padding: 0.2rem 0.6rem;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--color-sea-dark);
  background: var(--color-lemon);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.tag-chip:hover {
  background: var(--color-sea-dark);
  color: var(--color-lemon);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: auto;
}

.badge-dedicated {
  background: #d4edda;
  color: #1e5631;
}

.badge-certified {
  background: #cce5ff;
  color: #0d47a1;
}

.badge-friendly {
  background: #fff3cd;
  color: #856404;
}

.hero-stats {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-sea-dark);
  opacity: 0.9;
}

.badge-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 12px;
  border: 1px solid rgba(66, 0, 0, 0.1);
}

.badge-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--color-muted);
}

.badge-legend .card-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
}

.btn-sm-wa {
  background: #25d366;
  color: #fff;
  border-color: #25d366;
}

.btn-sm-wa:hover {
  background: #1ebe57;
  color: #fff;
}

.btn-sm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding-inline: 0.65rem;
}

.btn-sm-icon .wa-icon,
.btn-sm-icon .ig-icon {
  display: block;
  width: 22px;
  height: 22px;
}

.btn-sm-review {
  background: rgba(255, 248, 220, 0.95);
  border-color: rgba(66, 0, 0, 0.2);
  color: var(--color-sea-dark);
  font-weight: 600;
}

.btn-sm-review:hover {
  background: var(--color-lemon);
  color: var(--color-sea-dark);
}

.wa-icon {
  display: block;
  flex-shrink: 0;
}

.city-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  margin: 0 0 1.5rem;
}

.city-nav a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-sea-dark);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(66, 0, 0, 0.15);
  border-radius: 999px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.city-nav a:hover {
  background: var(--color-lemon);
  border-color: rgba(66, 0, 0, 0.25);
}

.city-nav a.is-active {
  background: #420000;
  color: #fff;
  border-color: #420000;
}

body.is-city-page .hero-eyebrow {
  letter-spacing: 0.04em;
}

.city-nav-all {
  margin-left: auto;
}

@media (max-width: 640px) {
  .city-nav-all {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
}

.card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-card);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-sea-dark);
}

.card-meta {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  color: var(--color-terracotta);
  font-weight: 500;
}

.card-address {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.card-address::before {
  content: "📍 ";
}

.card p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.card-link {
  font-weight: 600;
  text-decoration: none;
}

.disclaimer {
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  font-style: italic;
}

/* Shops */
.shops {
  background: transparent;
}

.shops-soon {
  margin: 0;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-lg, 18px);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(66, 0, 0, 0.12);
  line-height: 1.55;
  color: var(--color-ink);
}

.shops-soon a {
  font-weight: 600;
}

.shops .shop-list li {
  border-bottom-color: rgba(66, 0, 0, 0.18);
}

.shop-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(28, 36, 41, 0.08);
}

.shop-list li:first-child {
  padding-top: 0;
}

.shop-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.shop-list h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-card);
  font-size: 1.35rem;
  color: var(--color-sea-dark);
}

.shop-hours {
  flex-shrink: 0;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-lemon);
  background: var(--color-sea-dark);
  border-radius: var(--radius);
}

/* Tips */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.tip {
  padding: 1.75rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border-top: 5px solid var(--color-sea-dark);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.tip:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(66, 0, 0, 0.2);
}

.tip-icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 0.9rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-lemon);
  background: var(--color-sea-dark);
  border-radius: 50%;
  line-height: 1;
}

.tip h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-card);
  font-size: 1.3rem;
  color: var(--color-sea-dark);
}

.tip p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-muted);
}

/* CTA */
.cta {
  text-align: center;
  background: transparent;
  border-top: 2px solid rgba(66, 0, 0, 0.18);
}

.cta h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--color-sea-dark);
}

.cta p {
  margin: 0 0 1.5rem;
  color: var(--color-ink);
}

.cta-note {
  color: var(--color-ink);
}

.cta-note a {
  color: var(--color-sea-dark);
  font-weight: 600;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.segnala-form {
  text-align: left;
  margin: 0 auto 1rem;
  max-width: 32rem;
  position: relative;
}

.segnala-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.segnala-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.segnala-field-full {
  grid-column: 1 / -1;
}

.segnala-field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-sea-dark);
}

.segnala-field input,
.segnala-field select,
.segnala-field textarea {
  width: 100%;
  padding: 0.85rem 1.1rem;
  font: inherit;
  border: 2px solid rgba(66, 0, 0, 0.12);
  border-radius: 18px;
  background: var(--color-white);
  box-shadow: 0 4px 14px rgba(66, 0, 0, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.segnala-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23420000' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.segnala-field input:focus,
.segnala-field select:focus,
.segnala-field textarea:focus {
  outline: none;
  border-color: var(--color-sea-dark);
  box-shadow: 0 0 0 3px rgba(66, 0, 0, 0.08);
}

.segnala-honeypot {
  display: none !important;
}

.segnala-foto {
  padding: 1rem 1.1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.45);
  border: 2px solid rgba(66, 0, 0, 0.08);
}

.segnala-foto-title {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-sea-dark);
}

.segnala-optional {
  font-weight: 500;
  color: var(--color-muted);
}

.segnala-foto-hint {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--color-ink);
}

.segnala-file-label {
  display: inline-block;
  margin-bottom: 0.5rem;
}

.segnala-field input[type="file"] {
  padding: 0.65rem;
  border-radius: 18px;
  background: var(--color-white);
  cursor: pointer;
}

.segnala-file-names {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--color-sea-dark);
  font-weight: 600;
}

.segnala-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

.segnala-actions .btn {
  min-width: min(100%, 18rem);
  border-radius: 999px;
  padding: 1rem 2rem;
}

.segnala-msg {
  min-height: 1.4rem;
  margin: 0 0 1rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.segnala-msg.is-ok { color: #1e5631; }
.segnala-msg.is-error { color: var(--color-red); }
.segnala-msg.is-pending { color: var(--color-muted); }

.card-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.15rem 0 0.45rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e5631;
  background: rgba(30, 86, 49, 0.1);
  border-radius: 999px;
}

.card-verified-dot {
  font-size: 0.72rem;
}

.detail-row-verified span:last-child {
  color: #1e5631;
}

.btn-ig {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-white);
  background: linear-gradient(45deg, #f09433, #e6683c 30%, #dc2743 55%, #cc2366 75%, #bc1888);
  border-color: transparent;
}

.btn-ig:hover {
  color: var(--color-white);
  filter: brightness(1.07);
}

.cta-note {
  margin-top: 2rem !important;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-ig {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-sea-dark);
  font-weight: 600;
  text-decoration: none;
}

.footer-ig:hover {
  color: var(--color-red);
}

/* Footer */
.site-footer {
  padding: 2.5rem 0 calc(2.5rem + var(--safe-bottom));
  background: transparent;
  border-top: 2px solid rgba(66, 0, 0, 0.18);
  color: var(--color-ink);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-sea-dark);
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-ink);
}

.footer-top {
  color: var(--color-sea-dark);
  font-weight: 600;
  text-decoration: none;
}

.footer-top:hover {
  color: var(--color-red);
}

/* Pulsante fisso torna su */
.scroll-top-btn {
  position: fixed;
  right: max(1rem, var(--safe-right));
  bottom: max(1.15rem, calc(var(--safe-bottom) + 0.75rem));
  z-index: 240;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-sea-dark);
  color: var(--color-lemon);
  box-shadow: 0 8px 28px rgba(26, 4, 0, 0.3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.92);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    visibility 0.28s,
    background 0.2s ease;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-top-btn[hidden] {
  display: none !important;
}

.scroll-top-btn:hover {
  background: var(--color-red);
  color: #fff;
}

.scroll-top-btn:focus-visible {
  outline: 3px solid var(--color-lemon);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .scroll-top-btn {
    width: 52px;
    height: 52px;
    bottom: max(1rem, calc(var(--safe-bottom) + 0.5rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-top-btn {
    transition: none;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    position: relative;
    z-index: 310;
  }

  .nav {
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top));
    left: 0;
    right: 0;
    padding: 1.5rem max(1.5rem, var(--safe-right)) calc(1.5rem + var(--safe-bottom)) max(1.5rem, var(--safe-left));
    background: var(--color-lemon);
    border-bottom: 1px solid #e9c64a;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    z-index: 250;
    box-shadow: 0 12px 32px rgba(26, 4, 0, 0.15);
  }

  .nav ul {
    flex-direction: column;
    gap: 0.25rem;
  }

  .nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.35rem 0;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .logo-mark {
    width: 2.9rem;
    height: 2.9rem;
  }

  .section {
    padding: 3rem 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 3rem 0;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 9vw, 3rem);
  }

  .hero-lead {
    font-size: 1.05rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero-actions .btn,
  .cta-actions .btn {
    width: 100%;
  }

  .section-head {
    margin-bottom: 1.75rem;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .comune-select select {
    width: 100%;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .shop-list li {
    flex-direction: column;
    gap: 0.5rem;
  }

  .map { height: min(300px, 40dvh); }

  #search-input,
  .comune-select select,
  .sort-select select {
    font-size: max(1rem, 16px);
  }

  .search-clear {
    width: 44px;
    height: 44px;
    right: 0.35rem;
  }

  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.4rem;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter-btn { flex: 0 0 auto; }

  .disclaimer { font-size: 0.82rem; }
}

@media (max-width: 380px) {
  .header-inner { padding-inline: 0.25rem; }
  .logo-mark { width: 2.5rem; height: 2.5rem; }
  .hero h1 { font-size: 1.95rem; }
  .hero-lead { font-size: 0.98rem; }
  .hero-eyebrow { font-size: 0.72rem; padding: 0.4rem 0.8rem; }
  .map { height: min(270px, 38dvh); }
  .section-head h2,
  h2 { font-size: clamp(1.5rem, 7vw, 2rem); }
  .filter-btn { font-size: 0.85rem; padding: 0.45rem 0.9rem; }
}

/* Velo di transizione in ingresso dalla intro */
.page-veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(circle at 50% 40%, #420000 0%, #1a0400 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

body.is-entering .page-veil {
  opacity: 1;
  pointer-events: all;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card:hover {
    transform: none;
  }

  .page-veil {
    display: none;
  }
}

/* ============================================================
   UPGRADE — barra strumenti, schede ricche, preferiti, modale
   ============================================================ */

/* Chip dei tipi di locale */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.95rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-sea-dark);
  background: var(--color-white);
  border: 1.5px solid rgba(66, 0, 0, 0.18);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.chip:hover { border-color: var(--color-sea-dark); }

.chip.is-active {
  background: var(--color-sea-dark);
  border-color: var(--color-sea-dark);
  color: var(--color-lemon);
}

/* Riga finale dei controlli */
.controls-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.fav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-sea-dark);
  background: var(--color-white);
  border: 1.5px solid rgba(66, 0, 0, 0.18);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.fav-toggle:hover { border-color: var(--color-red); }

.fav-toggle.is-active {
  background: var(--color-red);
  border-color: var(--color-red);
  color: #fff;
}

.fav-toggle .fav-count {
  min-width: 1.4em;
  padding: 0 0.35em;
  font-size: 0.78rem;
  line-height: 1.4em;
  text-align: center;
  background: rgba(66, 0, 0, 0.12);
  border-radius: 999px;
}

.fav-toggle.is-active .fav-count { background: rgba(255, 255, 255, 0.25); }

.near-toggle.is-active {
  background: var(--color-sea-dark);
  border-color: var(--color-sea-dark);
  color: var(--color-lemon);
}

.near-toggle.is-loading { opacity: 0.7; pointer-events: none; }

.card-distance {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-sea-dark);
  white-space: nowrap;
}

.sort-select select {
  padding: 0.5rem 2rem 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-sea-dark);
  background: var(--color-white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23b8431f' d='M6 8 0 0h12z'/%3E%3C/svg%3E")
    no-repeat right 0.9rem center;
  border: 1px solid var(--color-sand);
  border-radius: 999px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.sort-select select:focus { outline: none; border-color: var(--color-sea); }

/* Foto come <img> per il lazy-loading */
.card-photo {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-terracotta), var(--color-sea-dark));
}

.card-photo .card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
  transition: transform 0.4s ease;
}

.card:hover .card-img { transform: scale(1.05); }

.card-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

/* Cuore preferiti sulla foto */
.card-fav {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  line-height: 0;
  color: var(--color-sea-dark);
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition), background var(--transition), color var(--transition);
}

.card-fav .heart-icon {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-fav:hover { transform: scale(1.08); }
.card-fav.is-fav { background: var(--color-red); color: #fff; }
.card-fav.is-fav .heart-icon {
  fill: currentColor;
  stroke: none;
}

/* Riga superiore della scheda: tipo + prezzo */
.card-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.card-type {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-terracotta);
  text-transform: uppercase;
}

.card-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-sea-dark);
  letter-spacing: 0.05em;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pulsanti compatti nelle schede e nella modale */
.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-sea-dark);
  background: transparent;
  border: 1.5px solid var(--color-sea-dark);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-sm:hover { background: var(--color-sea-dark); color: var(--color-lemon); }

.btn-sm-primary {
  background: var(--color-sea-dark);
  color: var(--color-lemon);
}

.btn-sm-primary:hover { background: var(--color-red); border-color: var(--color-red); color: #fff; }

.card-actions { align-items: center; gap: 0.6rem; }

/* ---------- Blocco scroll sfondo (modale + filtri) ---------- */
html.scroll-locked {
  overflow: hidden;
}

@media (min-width: 769px) {
  html.scroll-locked body {
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
    overflow: hidden;
    overscroll-behavior: none;
  }
}

@media (max-width: 768px) {
  html.scroll-locked,
  html.scroll-locked body {
    overflow: hidden;
    height: 100%;
  }

  html.scroll-locked body {
    touch-action: none;
  }

  html.scroll-locked .detail,
  html.scroll-locked .detail-panel,
  html.scroll-locked .filters-panel,
  html.scroll-locked .filters-sheet,
  html.scroll-locked .filters-sheet-body {
    touch-action: pan-y;
  }
}

/* ---------- Modale dettaglio ---------- */
.detail {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
  overscroll-behavior: none;
}

/* Quando è chiusa NON deve coprire la pagina (altrimenti blocca i tap) */
.detail[hidden] {
  display: none !important;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 4, 0, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.detail.is-open .detail-overlay { opacity: 1; }

.detail-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  max-width: 100%;
  max-height: min(90vh, 90dvh);
  min-height: 0;
  margin-inline: auto;
  overflow: hidden;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(26, 4, 0, 0.45);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.detail.is-open .detail-panel { transform: none; opacity: 1; }

.detail-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  width: 40px;
  height: 40px;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--color-sea-dark);
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.detail-media {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-terracotta-soft), var(--color-sea-dark));
}

.detail-media-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}

.detail-media img {
  width: 100%;
  height: auto;
  max-height: min(48vh, 420px);
  object-fit: contain;
  object-position: center center;
  display: block;
}

.detail-thumbs {
  display: flex;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(0, 0, 0, 0.04);
  scrollbar-width: thin;
}

.detail-thumbs::-webkit-scrollbar {
  height: 6px;
}

.detail-thumb {
  flex: 0 0 auto;
  width: 68px;
  height: 50px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 7px;
  background-color: rgba(0, 0, 0, 0.08);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.detail-thumb:hover {
  opacity: 1;
}

.detail-thumb.is-active {
  border-color: var(--color-sea-dark);
  opacity: 1;
  transform: translateY(-1px);
}

.detail-media .card-img--placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  font-size: clamp(2.5rem, 12vw, 4rem);
}

.detail-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.photo-rating-badge {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-sea-dark);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
  pointer-events: none;
}

.detail-media .photo-rating-badge {
  top: auto;
  right: auto;
  left: 1rem;
  bottom: 1rem;
  font-size: 0.88rem;
  padding: 0.45rem 0.85rem;
}

.photo-rating-badge .stars-display {
  color: #c9a227;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  line-height: 1;
}

.photo-rating-text strong {
  font-weight: 700;
}

.detail-media .detail-fav {
  top: auto;
  right: 1rem;
  bottom: 1rem;
}

.detail-review-cta {
  margin: 0 0 1.25rem;
  padding: 1.15rem 0;
  text-align: center;
  border-top: 1px solid rgba(66, 0, 0, 0.1);
  border-bottom: 1px solid rgba(66, 0, 0, 0.1);
}

.detail-review-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  max-width: 22rem;
  min-height: 48px;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-sea-dark);
  background: var(--color-lemon);
  border: none;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(66, 0, 0, 0.15);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.detail-review-btn:hover {
  background: #fff1ad;
}

.detail-review-btn:active {
  transform: scale(0.98);
}

.detail-review-btn:focus-visible {
  outline: 3px solid var(--color-sea-dark);
  outline-offset: 2px;
}

.detail-review-hint {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: var(--color-muted);
  line-height: 1.45;
}

.detail-body {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1.5rem var(--page-pad-x) 1.8rem;
  box-sizing: border-box;
}

.detail-head {
  margin-bottom: 0.4rem;
  text-align: center;
}

.detail-head .card-meta {
  margin-inline: auto;
}

.detail-body h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-card);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--color-sea-dark);
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-align: center;
}

.detail-desc { margin: 0 0 1.1rem; color: var(--color-muted); }

.detail-rows {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.detail-row {
  display: flex;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--color-ink);
  overflow-wrap: anywhere;
}

.detail-row a { color: var(--color-sea-dark); font-weight: 600; }
.detail-ico { flex-shrink: 0; }

.detail-tags {
  display: none;
}

.tag-static { cursor: default; }
.tag-static:hover { background: var(--color-lemon); color: var(--color-sea-dark); }

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  max-width: 100%;
}

.detail-note {
  margin: 0;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--color-muted);
}

/* Recensioni */
.detail-reviews {
  margin: 1.25rem 0 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(66, 0, 0, 0.12);
}

.reviews-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.reviews-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--color-sea-dark);
}

.reviews-summary {
  font-size: 0.92rem;
  color: var(--color-muted);
}

.reviews-summary .stars-display {
  color: #c9a227;
  letter-spacing: 0.05em;
  font-size: 1.05rem;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.reviews-empty {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md, 12px);
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed rgba(66, 0, 0, 0.18);
  color: var(--color-muted);
  font-size: 0.92rem;
}

.review-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md, 12px);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(66, 0, 0, 0.1);
}

.review-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.45rem;
}

.review-card-name {
  font-weight: 700;
  color: var(--color-sea-dark);
}

.review-card-date {
  font-size: 0.82rem;
  color: var(--color-muted);
}

.review-card-text {
  margin: 0 0 0.65rem;
  line-height: 1.55;
  color: var(--color-ink);
}

.review-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.review-photos img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(66, 0, 0, 0.12);
  cursor: pointer;
}

.review-form {
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius-lg, 18px);
  background: rgba(255, 248, 220, 0.55);
  border: 1px solid rgba(66, 0, 0, 0.12);
  max-width: 100%;
  box-sizing: border-box;
}

.review-form-lead {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--color-muted);
}

.review-field {
  margin-bottom: 0.85rem;
}

.review-field label,
.review-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-sea-dark);
}

.review-field input,
.review-field textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(66, 0, 0, 0.18);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}

.star-picker {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.1rem;
}

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

.star-label {
  padding: 0.15rem 0.2rem;
  font-size: 1.75rem;
  line-height: 1;
  color: rgba(66, 0, 0, 0.22);
  cursor: pointer;
  transition: color 0.12s ease, transform 0.12s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.star-label:hover,
.star-label:hover ~ .star-label,
.star-radio:focus-visible + .star-label,
.star-radio:checked ~ .star-label {
  color: #c9a227;
}

.star-label:active {
  transform: scale(1.08);
}

.review-field-error {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #9b1c1c;
}

.review-consent.is-error {
  outline: 2px solid #9b1c1c;
  outline-offset: 3px;
  border-radius: 8px;
}

.review-msg.is-ok {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: rgba(26, 107, 58, 0.12);
  border: 1px solid rgba(26, 107, 58, 0.35);
  font-weight: 600;
}

.star-btn {
  padding: 0.15rem 0.25rem;
  font-size: 1.65rem;
  line-height: 1;
  color: rgba(66, 0, 0, 0.22);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.12s ease, transform 0.12s ease;
}

.star-btn:hover,
.star-btn.is-on {
  color: #c9a227;
}

.star-btn:focus-visible {
  outline: 2px solid var(--color-sea);
  border-radius: 4px;
}

.review-consent {
  margin: 0.75rem 0;
  font-size: 0.85rem;
}

.review-msg {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.9rem;
}

.review-msg.is-ok { color: #1a6b3a; }
.review-msg.is-error { color: #9b1c1c; }
.review-msg.is-pending { color: var(--color-muted); }

.review-submit {
  width: 100%;
}

.card-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--color-muted);
}

.card-rating-stars {
  color: #c9a227;
  letter-spacing: 0.03em;
}

/* Responsive componenti nuovi */
@media (max-width: 768px) {
  .controls-end { width: 100%; justify-content: space-between; }
  .sort-select select, .comune-select select { width: auto; }
  .card-fav { width: 44px; height: 44px; }
  .detail { padding: 0; align-items: flex-end; justify-content: center; }
  .detail-panel {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    align-self: flex-end;
    height: auto;
    max-height: min(92vh, 92dvh);
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .detail-media {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .detail-media img {
    max-height: min(44vh, 380px);
  }

  .detail-review-cta {
    padding-inline: 0;
  }

  .detail-review-btn {
    max-width: none;
    width: 100%;
  }
  .detail-body {
    overflow: visible;
    flex: none;
    min-height: auto;
    width: 100%;
    padding-left: max(1.25rem, var(--safe-left));
    padding-right: max(1.25rem, var(--safe-right));
    padding-bottom: max(1.25rem, calc(var(--safe-bottom) + 0.75rem));
  }
  .detail-body h2 { font-size: 1.6rem; }
  .detail-close { top: max(0.75rem, var(--safe-top)); right: max(0.75rem, var(--safe-right)); }
}

@media (max-width: 480px) {
  .chip-row:not(.chip-row--wrap) {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.3rem;
  }
  .chip-row:not(.chip-row--wrap)::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; min-height: 44px; }
  .detail-actions .btn-sm { flex: 1 1 auto; justify-content: center; min-height: 44px; }
}

/* Touch: target minimi e niente hover “fantasma” su schermo */
@media (pointer: coarse) {
  .chip, .filter-btn, .fav-toggle, .btn-sm, .btn {
    min-height: 44px;
  }
}

@media (hover: none) {
  .card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }
  .card:hover .card-img { transform: none; }
  .card:active { transform: scale(0.99); }
}

/* PWA standalone (icona su home screen) */
@media (display-mode: standalone) {
  .site-header { padding-top: var(--safe-top); }
  .skip-link:focus { top: calc(1rem + var(--safe-top)); }
}

/* ---------- Social nelle schede ---------- */
.ig-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Icona Instagram sulla foto (in basso a sinistra) */
.card-ig {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #8134af 100%);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card-ig:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  color: #fff;
}

.card-ig .ig-icon {
  width: 22px;
  height: 22px;
}

.card-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.35rem 0 0.65rem;
}

.card-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-sea-dark);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(66, 0, 0, 0.15);
  border-radius: 999px;
  text-decoration: none;
  transition: var(--transition);
}

.card-social-link:hover {
  background: var(--color-sea-dark);
  color: var(--color-lemon);
  border-color: var(--color-sea-dark);
}

.card-social-ig {
  color: #fff;
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #8134af 100%);
  border: none;
}

.card-social-ig:hover {
  color: #fff;
  background: linear-gradient(135deg, #dd2a7b 0%, #8134af 100%);
  border: none;
  filter: brightness(1.05);
}

.btn-sm-ig {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #8134af 100%);
  border-color: transparent;
}

.btn-sm-ig.btn-sm-icon {
  padding-inline: 0.65rem;
}

.btn-sm-ig:hover {
  color: #fff;
  background: linear-gradient(135deg, #dd2a7b 0%, #8134af 100%);
  border-color: transparent;
}

.detail-ico-ig {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #8134af 100%);
  border-radius: 8px;
}

.detail-ico-ig .ig-icon {
  width: 16px;
  height: 16px;
}

.detail-ig-link {
  font-weight: 700;
  color: var(--color-sea-dark);
}

/* ---------- Newsletter e notifiche ---------- */
.newsletter .container {
  text-align: center;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin: 1.25rem 0 0.75rem;
}

.newsletter-form input[type="email"] {
  flex: 1 1 220px;
  width: auto;
  min-width: 0;
  max-width: 360px;
  height: auto;
  min-height: 48px;
  padding: 0.85rem 1.1rem;
  font-family: var(--font-body);
  font-size: max(1rem, 16px);
  line-height: 1.3;
  color: var(--color-ink);
  background: var(--color-white);
  border: 1px solid var(--color-sand);
  border-radius: 999px;
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--color-sea);
  box-shadow: 0 0 0 4px rgba(184, 67, 31, 0.15);
}

.newsletter-form .newsletter-consent {
  flex: 1 1 100%;
  width: 100%;
  max-width: 420px;
  text-align: left;
  margin: 0.15rem 0 0;
}

.newsletter-msg {
  min-height: 1.4em;
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.newsletter-msg.is-ok { color: #1e5631; }
.newsletter-msg.is-error { color: var(--color-red); }
.newsletter-msg.is-pending { color: var(--color-muted); }

.newsletter-result {
  margin-top: 1.5rem;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 2px solid #e9c64a;
  background: rgba(255, 255, 255, 0.55);
}

.newsletter-result-ok {
  border-color: #6ab04c;
  background: rgba(106, 176, 76, 0.12);
}

.newsletter-result-error {
  border-color: var(--color-red, #c0392b);
  background: rgba(192, 57, 43, 0.08);
}

.newsletter-result-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.newsletter-result h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  margin: 0 0 0.75rem;
  color: var(--color-sea-dark);
}

.newsletter-result p {
  margin: 0 0 1rem;
  color: var(--color-ink);
}

.newsletter-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem !important;
}

.newsletter-notify {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: 1rem 0 0.5rem;
}

.notify-btn.is-active {
  background: var(--color-sea-dark);
  border-color: var(--color-sea-dark);
  color: var(--color-lemon);
}

.newsletter-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-muted);
  max-width: 420px;
}

.newsletter-privacy {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--color-muted);
}

@media (max-width: 768px) {
  .newsletter.section {
    padding: 2.75rem 0;
  }

  .newsletter .container {
    text-align: left;
  }

  .newsletter h2 {
    font-size: clamp(1.55rem, 6vw, 1.9rem);
    margin-bottom: 0.65rem;
  }

  .newsletter .container > p:not(.newsletter-privacy):not(.newsletter-hint):not(.newsletter-msg) {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
  }

  .newsletter-form {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    margin: 1rem 0 0.5rem;
  }

  .newsletter-form input[type="email"] {
    flex: none;
    width: 100%;
    max-width: none;
    border-radius: var(--radius);
  }

  .newsletter-form .btn {
    width: 100%;
    min-height: 48px;
  }

  .newsletter-notify {
    align-items: stretch;
    margin-top: 0.85rem;
  }

  .newsletter-notify .notify-btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
  }

  .newsletter-hint {
    max-width: none;
    text-align: center;
  }

  .newsletter-privacy {
    font-size: 0.78rem;
    line-height: 1.45;
  }
}

/* ============================================================
   MOBILE — toolbar compatta, filtri a sheet
   ============================================================ */

.places-toolbar {
  margin-bottom: 0.75rem;
}

.places-toolbar .search-bar {
  margin-bottom: 0.65rem;
}

.mobile-quickbar {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 44px;
  padding: 0.5rem 0.55rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-sea-dark);
  background: var(--color-white);
  border: 1.5px solid rgba(66, 0, 0, 0.18);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.quick-btn.is-active,
.quick-btn.filters-toggle[aria-expanded="true"] {
  background: var(--color-sea-dark);
  border-color: var(--color-sea-dark);
  color: var(--color-lemon);
}

.filters-badge {
  min-width: 1.25em;
  padding: 0 0.35em;
  font-size: 0.72rem;
  line-height: 1.35em;
  text-align: center;
  background: var(--color-red);
  color: #fff;
  border-radius: 999px;
}

.filters-summary {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-sea-dark);
  text-align: center;
}

.filter-group {
  margin-bottom: 1.15rem;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.filters-panel .chip-row--wrap,
.filters-panel .filters--wrap {
  flex-wrap: wrap;
  overflow: visible;
}

.comune-select--full select {
  width: 100%;
}

.filters-sheet-head {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.15rem 0.75rem;
  border-bottom: 1px solid var(--color-sand);
}

.filters-sheet-head h3 {
  margin: 0;
  flex: 1;
  font-family: var(--font-card);
  font-size: 1.35rem;
  color: var(--color-sea-dark);
}

.filters-reset {
  padding: 0.35rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-sea-dark);
  background: transparent;
  border: 1px solid rgba(66, 0, 0, 0.2);
  border-radius: 999px;
  cursor: pointer;
}

.filters-close {
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-sea-dark);
  background: var(--color-sand);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.filters-sheet-foot {
  display: none;
  padding: 0.85rem 1.15rem calc(0.85rem + var(--safe-bottom));
  border-top: 1px solid var(--color-sand);
}

.filters-apply {
  width: 100%;
}

.filters-sheet-overlay {
  display: none;
}

body.nav-open {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 768px) {
  html.scroll-locked body.nav-open {
    touch-action: none;
  }
}

@media (max-width: 1024px) {
  .places .section-head {
    margin-bottom: 1rem;
  }

  .places .section-head p {
    display: none;
  }

  .places .section-head h2 {
    font-size: clamp(1.55rem, 6vw, 1.9rem);
  }

  .mobile-quickbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters-panel {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 950;
    align-items: flex-end;
  }

  .filters-panel.is-open {
    display: flex;
  }

  .filters-panel[hidden] {
    display: none !important;
  }

  .filters-sheet-overlay {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(26, 4, 0, 0.5);
    backdrop-filter: blur(2px);
  }

  .filters-sheet {
    position: relative;
    width: 100%;
    max-height: min(88vh, 88dvh);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
    background: var(--color-white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -12px 40px rgba(26, 4, 0, 0.25);
  }

  .filters-sheet-head,
  .filters-sheet-foot {
    display: flex;
    flex-shrink: 0;
  }

  .filters-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1.15rem 0.5rem;
  }

  .filters-panel .filters {
    margin-bottom: 0;
  }

}

@media (min-width: 1025px) {
  .filters-sheet-head,
  .filters-sheet-foot,
  .filters-sheet-overlay {
    display: none !important;
  }

  .filters-panel {
    display: block;
    position: static;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.35rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(66, 0, 0, 0.12);
    border-radius: var(--radius-lg);
  }

  .filters-sheet {
    display: block;
    max-height: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .filters-sheet-body {
    padding: 0;
    overflow: visible;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.75rem;
    align-items: start;
  }

  .filter-group {
    margin-bottom: 0;
  }

  .filter-group:nth-child(3),
  .filter-group:nth-child(4) {
    grid-column: 1 / -1;
  }

  .filter-group-label {
    display: none;
  }

  .filters-panel .chip-row,
  .filters-panel .filters {
    margin-bottom: 0;
  }

  .filters-toggle {
    display: none;
  }

  .mobile-quickbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
  }

  .near-toggle {
    white-space: nowrap;
  }

  .filters-summary {
    display: none !important;
  }

  .places-toolbar {
    margin-bottom: 0.5rem;
  }

  .results-count {
    margin: 0.5rem 0 1rem;
  }
}

@media (max-width: 1024px) {
  .filters-panel .chip-row--wrap,
  .filters-panel .filters--wrap {
    margin: 0;
  }

  .places-toolbar {
    margin-bottom: 0.5rem;
  }

  .results-count {
    margin: 0.35rem 0 0.85rem;
    text-align: center;
    font-weight: 600;
  }
}

/* ---------- Hub navigazione (home snella) ---------- */
.hub-nav {
  padding-top: 2.25rem;
  padding-bottom: 2rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.hub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1.15rem 1.25rem;
  min-height: 6.5rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(66, 0, 0, 0.12);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-ink);
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.hub-card:hover {
  background: var(--color-white);
  border-color: var(--color-sea-dark);
  transform: translateY(-2px);
}

.hub-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.hub-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-sea-dark);
}

.hub-desc {
  font-size: 0.82rem;
  color: var(--color-muted);
}

.page-sub .sub-main {
  padding: 1.5rem 0 3rem;
}

.page-sub .sub-main h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--color-sea-dark);
  margin: 0 0 0.5rem;
}

@media (max-width: 720px) {
  .hub-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

/* ============================================================
   MOBILE — perfezionamenti touch, layout, modali
   ============================================================ */
@media (max-width: 768px) {
  .site-header {
    z-index: 300;
  }

  .hero.section {
    padding-bottom: 0;
  }

  .hero-content {
    padding: 2rem 0 2.25rem;
  }

  .hub-nav.section {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .hub-card {
    padding: 0.95rem 1rem;
    min-height: 5.5rem;
  }

  .hub-title {
    font-size: 1rem;
    line-height: 1.2;
  }

  .hub-desc {
    font-size: 0.74rem;
    line-height: 1.35;
  }

  .places.section {
    padding-top: 1.5rem;
  }

  .map-wrap {
    margin-bottom: 0.75rem;
  }

  .map {
    touch-action: pan-x pan-y;
  }

  .page-sub .sub-main {
    padding: 1rem 0 2.5rem;
  }

  .page-sub .tips-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .page-sub .tip {
    padding: 1.25rem;
  }

  .page-sub .tip h2 {
    font-size: 1.15rem;
  }

  .legal-back {
    margin-bottom: 0.75rem;
  }

  .form-consent {
    align-items: flex-start;
    gap: 0.65rem;
  }

  .form-consent input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
  }

  .star-label {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
  }
}

@media (max-width: 1024px) {
  .mobile-quickbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .quick-btn {
    font-size: 0.78rem;
    padding: 0.55rem 0.45rem;
    min-height: 48px;
    line-height: 1.2;
  }

  .filters-panel .filters--wrap {
    flex-wrap: wrap;
    overflow: visible;
    gap: 0.45rem;
  }

  .filters-panel .filter-btn {
    flex: 0 0 auto;
  }
}

@media (max-width: 480px) {
  :root {
    --page-pad-x: 1rem;
    --header-h: 64px;
  }

  .card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .card-actions .btn-sm-primary,
  .card-actions button.btn-sm-primary {
    grid-column: 1 / -1;
  }

  .card-actions .btn-sm {
    justify-content: center;
    text-align: center;
    min-height: 44px;
  }

  .detail-panel {
    max-height: min(94vh, 94dvh);
    min-height: 0;
    height: auto;
  }

  .detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .detail-actions .btn-sm-primary {
    grid-column: 1 / -1;
  }

  .review-submit {
    width: 100%;
    min-height: 48px;
  }

  .segnala-actions .btn,
  .newsletter-form .btn {
    width: 100%;
    min-height: 48px;
  }

  .segnala-field input,
  .segnala-field select,
  .segnala-field textarea,
  .review-field input,
  .review-field textarea,
  .newsletter-form input[type="email"] {
    font-size: max(1rem, 16px);
  }
}

/* ============================================================
   HOME — carosello novità (3 card, stile griglia)
   ============================================================ */
.featured-section {
  padding-top: 0.25rem;
  padding-bottom: 0.75rem;
}

.featured-box {
  position: relative;
  padding: 1.35rem 3.25rem 1.15rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, var(--color-white) 100%);
  border: 1px solid rgba(66, 0, 0, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.featured-stage {
  overflow: hidden;
  width: 100%;
}

.featured-slides {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 1.5rem;
  margin: 0;
  padding: 0.15rem 0 0.35rem;
  list-style: none;
  will-change: transform;
}

.featured-slides .card {
  flex-shrink: 0;
  margin: 0;
}

.featured-slides .card--featured .card-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.featured-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  margin-top: -1.35rem;
  border: 1px solid rgba(66, 0, 0, 0.12);
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-sea-dark);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(66, 0, 0, 0.12);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.featured-nav:hover {
  background: var(--color-lemon);
  transform: scale(1.07);
  box-shadow: 0 6px 18px rgba(66, 0, 0, 0.16);
}

.featured-nav--prev {
  left: 0.75rem;
}

.featured-nav--next {
  right: 0.75rem;
}

.featured-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
  padding-top: 0.15rem;
}

.featured-dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(66, 0, 0, 0.16);
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), width var(--transition);
}

.featured-dot.is-active {
  width: 1.35rem;
  border-radius: 999px;
  background: var(--color-sea-dark);
}

@media (max-width: 960px) {
  .featured-box {
    padding-left: 2.75rem;
    padding-right: 2.75rem;
  }
}

.home-explore-cta {
  margin: 1.25rem 0 0;
  padding: 1rem 1.15rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--color-muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(66, 0, 0, 0.1);
  border-radius: var(--radius-lg);
}

.home-explore-cta a {
  font-weight: 600;
  color: var(--color-sea-dark);
}

.home-list-note {
  margin: 0 0 1rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  color: var(--color-sea-dark);
  background: rgba(255, 222, 89, 0.28);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(66, 0, 0, 0.08);
}

.province-list-note {
  margin: 0 0 1rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  color: var(--color-sea-dark);
  background: rgba(255, 222, 89, 0.28);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(66, 0, 0, 0.08);
}

.province-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 0.85rem;
  margin: 1.35rem 0 0.5rem;
  padding: 0.85rem 0.75rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(66, 0, 0, 0.1);
  border-radius: var(--radius-lg);
}

.province-page-nums {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.province-page-num,
.province-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-sea-dark);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(66, 0, 0, 0.12);
  border-radius: 999px;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.province-page-num:hover,
.province-page-btn:hover {
  background: rgba(255, 222, 89, 0.45);
  border-color: rgba(66, 0, 0, 0.2);
}

.province-page-num.is-current {
  color: #fff;
  background: var(--color-sea-dark);
  border-color: var(--color-sea-dark);
}

.province-page-ellipsis {
  padding: 0 0.15rem;
  color: var(--color-muted);
}

.province-page-prev,
.province-page-next {
  min-width: auto;
  padding-inline: 0.85rem;
  font-size: 0.88rem;
}

@media (max-width: 640px) {
  .province-pagination {
    gap: 0.5rem;
  }

  .province-page-prev,
  .province-page-next {
    flex: 1 1 100%;
    order: 3;
  }

  .province-page-nums {
    flex: 1 1 100%;
    order: 1;
  }
}

@media (max-width: 640px) {
  .featured-box {
    padding: 1rem 0.5rem 0.85rem;
  }

  .featured-nav {
    width: 2.15rem;
    height: 2.15rem;
    margin-top: -1rem;
  }

  .featured-nav--prev {
    left: 0.25rem;
  }

  .featured-nav--next {
    right: 0.25rem;
  }

  .featured-slides {
    gap: 1rem;
  }
}
