:root {
  /* Background colors - dark theme optimized */
  --bg-body: #0a0a0a;
  --bg-card: #1a1a1a;
  --bg-input: #2a2a2a;
  --bg-hover: #252525;

  /* Text colors - improved contrast */
  --text-main: #ffffff;
  --text-muted: #a0a0a0;
  --text-subtle: #808080;

  /* Primary colors - official yellow brand theme */
  --primary: #edfe00;
  --primary-hover: #f5fe4d;
  --primary-dark: #d4e600;

  /* Secondary colors - electric blue */
  --secondary: #00D4FF;
  --secondary-hover: #33E0FF;

  /* Status colors */
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;

  /* Border and effects */
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 8px 25px -5px rgba(0, 0, 0, 0.5);

  /* Layout */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
}

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

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  margin: 0;
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

body.nav-open {
  overflow: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* HEADER */
header {
  padding: 0 var(--space-lg);
  height: 70px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-inner {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.header-brand {
  display: flex;
  align-items: center;
}

.header-brand img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-left: auto;
}

.nav-overlay {
  display: none;
}

.nav-profile-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-right: 14px;
}

.nav-badge {
  background: var(--primary);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
  position: absolute;
  top: -6px;
  right: -4px;
}

.contact-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: 6px;
}

.contact-link:hover {
  color: var(--primary-hover);
  background: rgba(237, 254, 0, 0.1);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.menu-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.menu-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  margin: 3px 0;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.menu-toggle.is-active .menu-toggle-bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.menu-toggle.is-active .menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active .menu-toggle-bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.header-nav-mobile-head,
.menu-close {
  display: none;
}

.header-nav a {
  margin-left: var(--space-lg);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.header-nav a:hover {
  color: var(--primary);
  text-decoration: none;
}

.header-nav a.nav-admin {
  color: var(--primary);
  font-weight: 700;
}

.header-nav a.nav-admin:hover {
  color: var(--primary-hover);
}

.lang-switch {
  position: relative;
  margin-left: 10px;
}

.lang-dropdown {
  position: relative;
}

.lang-dropdown-trigger {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.lang-dropdown-trigger::-webkit-details-marker {
  display: none;
}

.lang-dropdown[open] .lang-dropdown-trigger {
  border-color: var(--primary);
}

.lang-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 170px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 20;
}

.header-nav .lang-dropdown-menu .lang-option {
  margin-left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.header-nav .lang-dropdown-menu .lang-option:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

.header-nav .lang-dropdown-menu .lang-option.is-active {
  color: #111;
  background: var(--primary);
  font-weight: 700;
}

.lang-switch-mobile {
  display: none;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

/* Comparatore annunci */
.compare-bar {
  position: sticky;
  top: 70px;
  z-index: 99;
  background: rgba(12, 12, 12, 0.98);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}
.compare-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px var(--space-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.compare-bar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.compare-bar-items {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 220px;
  flex-wrap: wrap;
}
.compare-bar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.compare-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
}
.compare-chip img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
}
.compare-chip-title {
  font-size: 0.85rem;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.compare-chip-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
}
.compare-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.75rem;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  z-index: 20;
  cursor: pointer;
}
.compare-toggle.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
}
.listing-quality-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 2px;
  max-width: calc(100% - 20px);
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}
/* Badge "Auto verificata": posizionamento per contesto.
   Di default va in alto a destra, ma nelle card dove il pulsante "Compara"
   (.compare-toggle, absolute, top/right) occupa già quell'angolo, va spostato
   a sinistra (sotto al badge di sponsorizzazione se presente) per non sovrapporsi. */
.verified-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 9;
}
.listing-img-container .verified-badge {
  top: 10px;
  right: auto;
  left: 10px;
}
.listing-img-container .sponsored-badge + .verified-badge {
  top: 46px;
}
.listing-cover-wrapper .verified-badge {
  top: 12px;
  right: auto;
  left: 12px;
}
.listing-cover-wrapper .sponsored-badge + .verified-badge {
  top: 44px;
}
.listing-quality-stars {
  color: #edfe00;
  font-size: 0.72rem;
  letter-spacing: 1px;
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.listing-quality-tier {
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  max-width: 7.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.listing-quality-most-wanted {
  color: #edfe00;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.compare-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.compare-modal[hidden] {
  display: none;
}
.compare-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}
.compare-modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: min(1100px, 92vw);
  max-height: 85vh;
  overflow: auto;
  z-index: 1;
  padding: 16px;
}
.compare-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.compare-modal-close {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.6rem;
  cursor: pointer;
}

#home-sponsor-modal .compare-modal-content {
  width: fit-content;
  max-width: min(720px, 92vw);
}

.home-sponsor-intro {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.home-sponsor-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.home-sponsor-plan {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  min-height: 180px;
  box-sizing: border-box;
}

.home-sponsor-plan__head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.home-sponsor-plan__duration {
  font-size: 0.8rem;
  color: var(--primary);
  background: rgba(237, 254, 0, 0.15);
  padding: 2px 8px;
  border-radius: 999px;
}

.home-sponsor-plan__price {
  font-size: 1rem;
  color: var(--text-main);
  margin-top: 2px;
}

.home-sponsor-plan__features {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: grid;
  gap: 4px;
  margin-top: 2px;
}

.home-sponsor-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  #home-sponsor-modal .compare-modal-content {
    width: min(92vw, 100%);
  }

  .home-sponsor-plans {
    grid-template-columns: 1fr;
  }
}

.home-sponsor-verification {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.home-sponsor-verification__title {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-sponsor-verification__title i {
  color: #0ea5e9;
}

/* fa-badge-check: icona Pro non inclusa nel subset FA Free del sito */
.fa-badge-check {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: url('assets/icons/badge-check.svg') center / contain no-repeat;
  mask: url('assets/icons/badge-check.svg') center / contain no-repeat;
}

.fa-badge-check::before {
  content: none !important;
}

.home-verification-intro {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.home-verification-plan {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(14, 165, 233, 0.35);
  background: rgba(14, 165, 233, 0.06);
}

.home-verification-plan__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.home-verification-plan__label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.home-verification-plan__price {
  font-size: 1.35rem;
  font-weight: 600;
  color: #38bdf8;
}

.home-verification-plan__note {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.home-verification-plan__features {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: grid;
  gap: 4px;
}

.btn-verify-cta {
  background: rgba(14, 165, 233, 0.18);
  color: #38bdf8;
  border: 1px solid #0ea5e9;
}

.btn-verify-cta:hover {
  background: rgba(14, 165, 233, 0.28);
  color: #7dd3fc;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.compare-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
}
.compare-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
}
.compare-card-title {
  font-size: 0.95rem;
  font-weight: 600;
}
.compare-card-price {
  font-weight: 700;
  color: var(--primary);
}
.compare-info-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.compare-info-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.compare-info-label {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.82rem;
}
.compare-info-value {
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.featured-card,
.map-card {
  position: relative;
}

@media (max-width: 900px) {
  .compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

/* MAP PAGE */
.map-filters .row > div {
  min-width: 200px;
}

.map-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.map-panel {
  position: relative;
  z-index: 0;
}

.map-canvas {
  width: 100%;
  height: 70vh;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  z-index: 0;
}

.map-status {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  pointer-events: none;
}

.map-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.map-loader.active {
  opacity: 1;
  pointer-events: auto;
}

.map-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.35);
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.map-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-height: 70vh;
  overflow-y: auto;
}

.map-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-main);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.map-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.map-card-thumb {
  position: relative;
  width: 110px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.map-card-media {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.map-card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.map-card-link:hover {
  text-decoration: none;
}

.map-card .compare-toggle {
  position: static;
  font-size: 0.7rem;
  padding: 4px 8px;
}

.map-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-card-thumb--placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-card-title {
  font-weight: 700;
  color: var(--text-main);
}

.map-card-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.map-card-price {
  color: var(--primary);
  font-weight: 800;
  font-size: 1rem;
}

@media (max-width: 1024px) {
  .map-layout {
    grid-template-columns: 1fr;
  }
  .map-list {
    max-height: none;
  }
  .map-canvas {
    height: 60vh;
  }
}

@media (max-width: 640px) {
  .map-card {
    grid-template-columns: 1fr;
  }
  .map-card-thumb {
    width: 100%;
    height: 180px;
  }
  .map-canvas {
    height: 55vh;
  }
}

/* CARDS */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

/* Collapsible filters panel */
.filter-panel summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.filter-panel summary::-webkit-details-marker {
  display: none;
}

.filter-panel summary h1 {
  margin: 0;
  font-size: 1.5rem;
}

.filter-panel .filter-panel-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.filter-panel .filter-panel-toggle {
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.filter-panel .filter-panel-toggle::before {
  content: "Mostra filtri";
}

.filter-panel[open] .filter-panel-toggle {
  color: var(--text-main);
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.filter-panel[open] .filter-panel-toggle::before {
  content: "Nascondi filtri";
}

.filter-panel .filter-panel-body {
  margin-top: var(--space-md);
}

/* Card interattive nelle grid */
.grid .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* Public profile info blocks */
.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.profile-info-item {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.profile-info-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-info-value {
  min-width: 0;
  margin-top: 4px;
  color: var(--text-main);
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.profile-info-value a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Admin dashboard */
.admin-dashboard {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.admin-section-intro .admin-intro-text {
  margin-top: 4px;
  color: var(--text-muted);
}

/* Barra indice: resta sotto l'header del sito (70px) mentre scorri la dashboard */
.admin-toc-bar {
  position: sticky;
  top: 70px;
  z-index: 95;
  margin-bottom: var(--space-lg);
  padding: 10px var(--space-lg);
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.admin-toc a {
  font-size: 0.9rem;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 2px;
}

.admin-toc a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Header sito (70px) + barra indice (~una riga, margine sicurezza) */
.admin-section {
  scroll-margin-top: 132px;
}

.admin-section-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.admin-section-lead {
  margin: 0 0 var(--space-md);
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.admin-quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.admin-nested-card {
  margin: 0;
}

.admin-nested-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-nested-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.admin-nested-card-desc {
  margin: 8px 0 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-listings-toolbar,
.admin-users-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-toolbar-stat strong {
  color: var(--text-main);
  font-weight: 600;
}

.admin-toolbar-note {
  font-size: 0.85rem;
}

.admin-toolbar-note--end {
  margin-left: auto;
}

@media (max-width: 720px) {
  .admin-toolbar-note--end {
    margin-left: 0;
  }
}

.admin-page-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.admin-page-jump-label {
  white-space: nowrap;
}

.admin-users-toolbar .admin-page-jump {
  margin-left: 0;
}

.admin-pagination-wrap {
  margin-bottom: 12px;
}

.admin-pagination-wrap--bottom {
  margin-top: 16px;
  margin-bottom: 0;
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.admin-pagination-current {
  cursor: default !important;
}

.admin-pagination-ellipsis {
  padding: 6px 4px;
  color: var(--text-muted);
  user-select: none;
}

.listing-pagination {
  margin-top: 20px;
}

.listing-pagination--inline {
  margin-top: 18px;
}

.listing-pagination__desktop {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.listing-pagination__mobile {
  display: none;
}

.listing-pagination__page {
  min-width: 2.25rem;
}

.listing-pagination__page--current {
  cursor: default;
}

.listing-pagination__ellipsis {
  padding: 6px 4px;
  color: var(--text-muted);
  user-select: none;
}

.listing-pagination__nav.is-disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.listing-pagination__nav--icon {
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 6px;
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.listing-pagination__jump {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.listing-pagination__jump-label,
.listing-pagination__jump-total {
  color: var(--text-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.listing-pagination__select {
  min-width: 4rem;
  max-width: 5.5rem;
  text-align: center;
  font-weight: 700;
}

@media (max-width: 767px) {
  .listing-pagination__desktop {
    display: none;
  }

  .listing-pagination__mobile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
  }

  .listing-pagination__mobile .listing-pagination__jump {
    justify-self: center;
    max-width: 100%;
  }

  .listing-pagination.card {
    padding: var(--space-md);
  }
}

@media (max-width: 400px) {
  .listing-pagination__jump-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .listing-pagination__jump-total {
    font-size: 0.85rem;
  }
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.admin-listing {
  display: grid;
  grid-template-columns: minmax(0, 140px) minmax(0, 1fr);
  gap: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow);
  align-items: center;
  width: 100%;
  min-width: 0;
}

.admin-listing.admin-compact {
  grid-template-columns: minmax(0, 1fr);
  padding: var(--space-lg);
}

.admin-listing.admin-compact .admin-actions {
  margin-left: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  row-gap: 6px;
}

.admin-listing.admin-compact .admin-actions form {
  margin: 0;
}

.admin-listing.admin-compact .admin-actions button,
.admin-listing.admin-compact .admin-actions .btn {
  min-width: 160px;
}

.admin-listing.admin-compact .admin-listing-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-lg);
}

.admin-listing.admin-compact .admin-listing-top > div:first-child {
  min-width: 0;
}

.admin-listing.admin-compact .admin-listing-meta {
  line-height: 1.35;
}

.admin-listing-thumb {
  width: 100%;
  height: 100%;
  min-height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

.admin-listing-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-listing-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
}

.admin-listing-top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  align-items: flex-start;
}

.admin-listing-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.admin-listing-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.admin-listing-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

.admin-listing-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  align-items: center;
  padding-top: var(--space-xs);
  border-top: 1px solid var(--border);
}

.admin-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-left: auto;
}

.admin-actions.user-actions {
  flex-wrap: nowrap;
  align-items: center;
}

.admin-actions.user-actions form {
  margin: 0;
}

.admin-actions.user-actions button {
  white-space: nowrap;
}

.admin-user-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow);
}

.admin-user-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.admin-user-identity {
  min-width: 0;
}

.admin-user-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.admin-user-email {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.admin-user-status {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-user-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px var(--space-lg);
  border-top: 1px solid var(--border);
  padding-top: var(--space-sm);
}

.admin-user-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.admin-user-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.admin-user-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: var(--space-sm);
}

.admin-user-actions form {
  margin: 0;
}

.admin-user-actions .btn {
  white-space: nowrap;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: 1px solid var(--border);
}

.badge-active { background: rgba(16,185,129,0.15); color: #34d399; border-color: rgba(16,185,129,0.4); }
.badge-draft  { background: rgba(245,158,11,0.15); color: #fbbf24; border-color: rgba(245,158,11,0.4); }
.badge-sold   { background: rgba(239,68,68,0.15); color: #f87171; border-color: rgba(239,68,68,0.4); }
.badge-neutral{ background: rgba(148,163,184,0.15); color: #cbd5e1; border-color: rgba(148,163,184,0.4); }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 4px;
  color: var(--text-main);
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow);
}

.chart-card h3 {
  margin: 0 0 var(--space-sm);
  color: var(--text-main);
}

.chart-wrapper {
  position: relative;
  height: 320px;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.6);
  color: #f87171;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.8);
  color: #fecdd3;
}

@media (max-width: 640px) {
  .chart-wrapper {
    height: 260px;
  }
  .admin-listing {
    grid-template-columns: 1fr;
  }
  .admin-listing-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-actions {
    margin-left: 0;
  }
  .admin-listing.admin-compact .admin-actions {
    width: 100%;
    justify-content: stretch;
  }
  .admin-listing.admin-compact .admin-actions button,
  .admin-listing.admin-compact .admin-actions .btn {
    min-width: 0;
    width: 100%;
  }
}

/* Profile form */
.profile-form {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.profile-type-toggle {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: nowrap;
  align-items: center;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--bg-input);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-pill:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.profile-pill input {
  accent-color: var(--primary);
}

.profile-type-toggle .profile-pill {
  flex: 1;
  min-width: 220px;
}

.profile-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.2px;
}

.profile-badge--biz {
  background: linear-gradient(120deg, #f97316, #f59e0b);
  color: #0b0b0b;
}

.profile-badge--priv {
  background: linear-gradient(120deg, #10b981, #34d399);
  color: #0b0b0b;
}

.profile-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  background: var(--bg-input);
  box-shadow: var(--shadow);
}

.profile-section--muted {
  border-style: dashed;
  background: rgba(255,255,255,0.03);
}

.profile-section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.profile-section__title {
  margin: 0;
  font-size: 1rem;
  color: var(--text-main);
}

.profile-form-wrapper.collapsed {
  display: none;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.profile-textarea {
  min-height: 110px;
  resize: vertical;
}

.profile-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.profile-switch {
  margin-top: var(--space-sm);
}

.profile-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-main);
  font-weight: 500;
}

.profile-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

@media (max-width: 640px) {
  .profile-type-toggle {
    flex-wrap: wrap;
  }
}

h1, h2, h3 {
  margin-top: 0;
  color: var(--primary);
  letter-spacing: -0.5px;
  font-weight: 600;
}

h1 { font-size: 2.25rem; font-weight: 700; }
h2 { font-size: 1.875rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }

/* FORMS */
label {
  display: block;
  margin: var(--space-md) 0 var(--space-xs);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
}

.label-required::after {
  content: " *";
  color: var(--error);
  font-weight: 700;
}

input[required],
select[required],
textarea[required] {
  border-color: rgba(237, 254, 0, 0.6);
  box-shadow: 0 0 0 1px rgba(237, 254, 0, 0.15);
}

input[type="checkbox"][required] {
  outline: 1px solid rgba(237, 254, 0, 0.5);
  outline-offset: 1px;
}

/* Checkbox: evita che prendano width 100% (ereditato da input generico) */
input[type="checkbox"] {
  width: auto;
  min-width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

/* Blocco termini/condizioni: checkbox compatto e testo su una riga */
.policies-checkbox-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.policies-checkbox-wrap input[type="checkbox"] {
  margin: 0;
}
.policies-checkbox-wrap .policies-checkbox-label {
  white-space: nowrap;
}

input, select, textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.password-field-wrap {
  position: relative;
}

.password-field-wrap input {
  padding-right: 46px;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.password-toggle-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.password-toggle-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Publish: compact step 1 */
.publish-step-compact label {
  margin: var(--space-sm) 0 var(--space-xs);
  font-size: 0.85rem;
}

.publish-step-compact input,
.publish-step-compact select,
.publish-step-compact textarea {
  padding: 6px 10px;
  font-size: 0.9rem;
}

.publish-step-compact .input-large {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.95rem;
}

.publish-step-compact .row {
  gap: var(--space-sm);
}

.publish-step-compact .row > div {
  min-width: 180px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-hover);
  box-shadow: 0 0 0 3px rgba(237, 254, 0, 0.15);
}

.row {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.row > div {
  flex: 1;
  min-width: 200px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
}

.btn-has-badge {
  overflow: visible;
  padding-right: calc(var(--space-lg) + 8px);
}

.btn-has-badge .nav-badge {
  position: absolute;
  top: -6px;
  right: -6px;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn:active {
  transform: translateY(0);
}

.btnp {
  background: var(--primary);
  border-color: var(--primary);
  color: #000000;
  font-weight: 700;
}

.btnp:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #000000;
}

.err {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: var(--space-xs);
  display: block;
}

/* GRID & LISTINGS */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

/* About page */
.about-page {
  max-width: 980px;
  margin: 0 auto;
}

.about-page .card {
  overflow: hidden;
}

.about-page h1,
.about-page h2,
.about-page h3 {
  line-height: 1.2;
}

.about-page h1 {
  margin-top: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.about-page h2 {
  margin-top: 0;
  color: var(--primary);
}

.about-page p {
  color: var(--text-muted);
}

.about-hero {
  position: relative;
  padding: clamp(28px, 6vw, 56px);
  background:
    radial-gradient(circle at top right, rgba(237, 254, 0, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
    var(--bg-card);
}

.about-hero p {
  max-width: 780px;
  font-size: 1.05rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.about-grid article {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  padding: var(--space-md);
}

.about-grid h3 {
  margin-top: 0;
}

.about-faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  padding: var(--space-md);
  margin-top: var(--space-sm);
}

.about-faq summary {
  cursor: pointer;
  color: var(--text-main);
  font-weight: 700;
}

.about-cta {
  text-align: center;
}

.about-cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

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

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  margin-top: var(--space-xl);
}

.footer-container {
  padding: calc(var(--space-xl) + 10px) var(--space-lg);
}

.pwa-install-link {
  display: none;
  font-weight: 600;
}

.pwa-install-link.is-visible {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 640px) {
  .footer-container {
    padding: var(--space-lg) var(--space-md);
  }
  .site-footer .container > div[style*="border-top"] {
    text-align: left;
  }
  .site-footer .container > div[style*="border-top"] > div {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
}

/* Blog layout */
.blog-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 2.2fr);
  gap: var(--space-lg);
  align-items: start;
}

.blog-sidebar-card {
  position: sticky;
  top: 90px;
}

.blog-content-card {
  overflow-wrap: anywhere;
}

.blog-cta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.blog-cta-grid .blog-sell-cta {
  margin-bottom: 0;
}

.blog-sell-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  border: 1px solid rgba(237, 254, 0, 0.24);
  background: linear-gradient(135deg, rgba(237, 254, 0, 0.12), rgba(237, 254, 0, 0.03));
}

.blog-sell-cta-copy {
  min-width: 0;
}

.blog-sell-cta-headline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 700;
  color: var(--primary);
}

.blog-sell-cta-headline i {
  font-size: 0.95em;
}

.blog-sell-cta p {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.blog-sell-cta-actions {
  flex-shrink: 0;
}

.blog-sell-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.blog-article-cover {
  margin-bottom: var(--space-md);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-input);
  height: clamp(220px, 42vh, 360px);
}

.blog-article-cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.blog-cover-note {
  margin-top: var(--space-md);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

.blog-list-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-list-cover {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-input);
  height: clamp(160px, 26vh, 240px);
}

.blog-list-cover-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.blog-list-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.blog-list-meta,
.blog-list-excerpt {
  color: var(--text-muted);
}

.blog-list-meta {
  font-size: 0.9rem;
}

.blog-list-excerpt {
  margin: 0;
}

.blog-list-cta {
  margin-top: auto;
}

@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .blog-cta-grid {
    grid-template-columns: 1fr;
  }
  .blog-content {
    order: 1;
  }
  .blog-sidebar {
    order: 2;
  }
  .blog-sidebar-card {
    position: static;
  }
  .blog-sell-cta {
    flex-direction: column;
    align-items: flex-start;
  }
  .blog-sell-cta-actions {
    width: 100%;
  }
  .blog-sell-cta-btn {
    width: 100%;
    justify-content: center;
  }
}

.listing-img-container {
  position: relative;
  width: 100%;
  padding-top: 66%; /* Aspect ratio 3:2 */
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--space-sm);
  background: var(--bg-input);
}

.listing-img-container img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.price-tag {
  font-size: 1.25rem;
  font-weight: 700;
  color: #edfe00;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: var(--space-sm);
  border: 1px solid var(--primary-dark);
}

.meta-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.meta-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.meta-info-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.meta-info-label {
  color: var(--text-muted);
  font-weight: 500;
  flex: 0 0 10px;
}

.meta-info-value {
  color: var(--text-main);
  font-weight: 600;
  text-align: right;
  flex: 1;
}

/* Responsive meta-info */
@media (max-width: 768px) {
  .meta-info {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .meta-info-label {
    flex: 0 0 100px;
    font-size: 0.8rem;
  }

  .meta-info-value {
    font-size: 0.8rem;
  }
}

/* Car details - organized layout for search results */
.car-details {
  margin-top: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  overflow: hidden; /* Previene overflow dal contenitore */
}

.car-specs-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs);
}

.car-location-group {
  margin-top: var(--space-xs);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

.car-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  transition: all 0.2s ease;
  min-width: 0; /* Permette ai flex items di shrinkare sotto la loro dimensione minima */
}

.car-detail-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.car-detail-label {
  color: var(--text-muted);
  font-weight: 500;
  flex: 0 0 70px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.car-detail-value {
  color: var(--text-main);
  font-weight: 600;
  text-align: right;
  flex: 1;
  font-size: 0.8rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  min-width: 0;
}

.car-detail-value .catalog-model-link {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.car-detail-value .catalog-model-link:hover,
.car-detail-value .catalog-model-link:focus-visible {
  color: var(--primary);
  outline: none;
}

.meta-info-value .catalog-model-link {
  color: var(--primary);
  text-decoration: underline;
}

.meta-info-value .catalog-model-link:hover,
.meta-info-value .catalog-model-link:focus-visible {
  color: var(--primary-hover);
}

.location-item {
  border-color: rgba(237, 254, 0, 0.2);
}

.location-item .car-detail-label,
.location-item .car-detail-value {
  color: var(--primary);
  font-weight: 700;
}

/* Responsive car-details */
@media (max-width: 768px) {
  .car-details {
    gap: var(--space-xs);
  }

  .car-specs-group {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .car-detail-item {
    padding: 5px 8px;
    font-size: 0.75rem;
    flex-wrap: wrap;
  }

  .car-detail-label {
    flex: 0 0 80px;
    font-size: 0.7rem;
  }

  .car-detail-value {
    font-size: 0.75rem;
    text-align: left;
    margin-top: 2px;
  }
  }

.badge {
  font-size: 0.75rem;
  background: var(--bg-input);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.2s ease;
}

.badge:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

/* Modifiche nelle schede annunci */
.mods-preview {
  margin: var(--space-sm) 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.mod-tag {
  background: rgba(237, 254, 0, 0.08);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid rgba(237, 254, 0, 0.2);
  max-width: 100%;
  min-width: 0;
  display: inline-flex;
  transition: all 0.2s ease;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.mod-tag.mod-more {
  background: var(--primary);
  color: #000000;
  border-color: var(--primary);
}

.mod-tag:hover {
  background: rgba(237, 254, 0, 0.15);
  border-color: rgba(237, 254, 0, 0.3);
  transform: translateY(-1px);
}

.mod-tag.mod-more:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Responsive per modifiche nelle schede */
@media (max-width: 768px) {
  .mods-preview {
    margin: var(--space-xs) 0;
    gap: 2px;
  }

  .mod-tag {
    font-size: 0.65rem;
    padding: 1px 6px;
  }
}

/* ===========================================
   MODIFICATIONS GRID - Layout Migliorato
   =========================================== */

/* Contenitore principale a griglia responsive */
.mods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

/* Card di ogni categoria di modifiche */
.mod-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  min-height: 50px; /* Altezza minima per uniformità */
  transition: all 0.2s ease;
}

.mod-category-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow);
}

/* Titolo della categoria */
.mod-category-title {
  color: var(--text-main);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mod-category-title:hover {
  color: var(--primary);
  border-bottom-color: var(--primary-hover);
}

/* Contenitore della lista delle opzioni */
.mod-items-list {
  display: grid;
  grid-template-columns: 1fr; /* Una colonna per categoria */
  gap: var(--space-xs);
  flex: 1; /* Occupa tutto lo spazio disponibile */
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Stato collassato */
.mod-category-card.collapsed .mod-items-list {
  max-height: 0 !important;
  opacity: 0 !important;
  margin-top: 0;
  margin-bottom: 0;
}

/* Stato espanso */
.mod-category-card:not(.collapsed) .mod-items-list {
  max-height: 1000px; /* Valore sufficientemente alto */
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  main {
    padding: var(--space-lg) var(--space-md);
  }

  header {
    padding: 0 var(--space-md);
    height: 60px;
    overflow: visible;
  }

  .header-brand img {
    /* Riduce il footprint del logo su mobile per lasciare spazio al menu */
    height: auto !important;
    max-height: 36px;
    max-width: 180px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    height: auto;
    width: auto;
    max-width: none;
    min-width: 0;
    background: #111827;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    box-shadow: var(--shadow-hover);
    opacity: 0;
    pointer-events: none;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    backdrop-filter: blur(10px);
    z-index: 1002;
  }

  .header-nav-mobile-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    color: var(--text-main);
  }

  .menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-main);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
  }

  .header-nav > a {
    margin-left: 0;
    font-size: 1rem;
    width: 100%;
    padding: 14px 0;
    color: #cbd5e1;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
  }

  .header-nav > form {
    display: block !important;
    width: 100%;
    margin: 0 !important;
  }

  .header-nav > form > button {
    width: 100%;
    text-align: left;
    padding: 14px 0;
    font-size: 1rem;
    color: #cbd5e1;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border) !important;
  }

  .header-nav > a:last-child,
  .header-nav > form:last-child > button {
    border-bottom: none;
  }

  .lang-switch {
    width: 100%;
    margin: 0;
  }

  .lang-dropdown {
    display: none;
  }

  .lang-switch-mobile {
    display: flex;
    width: 100%;
    gap: 8px;
    padding: 14px 0 0;
    border-top: 1px solid var(--border);
  }

  .header-nav .lang-switch-mobile a {
    margin-left: 0;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-muted);
  }

  .header-nav .lang-switch-mobile a.is-active {
    color: #111;
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 700;
  }

  .header-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1000;
  }

  .nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .card {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
  }

  .mods-preview {
    margin: var(--space-xs) 0;
    gap: 2px;
  }

  .mod-tag {
    font-size: 0.65rem;
    padding: 1px 6px;
  }

  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  /* Gestione collasso su mobile */
  .mod-category-card.collapsed .mod-items-list {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-top: 0;
    margin-bottom: 0;
  }

  .mod-category-card:not(.collapsed) .mod-items-list {
    max-height: 2000px; /* Valore più alto per mobile */
    opacity: 1;
  }
}

@media (max-width: 480px) {
  main {
    padding: var(--space-md) var(--space-sm);
  }

  header {
    padding: 0 var(--space-sm);
  }

  .header-inner {
    gap: var(--space-sm);
  }

  .grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .mods-grid {
    grid-template-columns: 1fr;
  }

  .mod-category-card {
    float: none;
    width: 100%;
    margin-right: 0;
  }

  .row {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .row > div {
    min-width: auto;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===========================================
   FEATURED LISTINGS SECTION - Homepage
   =========================================== */

.featured-section {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-hover) 100%);
  padding: var(--space-xl) 0;
  margin: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
}

.featured-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.featured-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.featured-header h2 {
  color: var(--primary);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.featured-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0;
}

.featured-header-actions {
  margin-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.featured-header-actions .featured-secondary-link {
  flex-shrink: 0;
}

.home-sort-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.home-sort-label {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
}

.home-sort-select {
  appearance: none;
  min-width: 12.5rem;
  max-width: min(100%, 18rem);
  padding: 8px 32px 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%239ca3af'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.94a.75.75 0 111.08 1.04l-4.24 4.5a.75.75 0 01-1.08 0l-4.24-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.home-sort-select:hover,
.home-sort-select:focus {
  border-color: var(--primary);
  color: var(--primary);
  outline: none;
}

@media (max-width: 768px) {
  .featured-header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .featured-header-actions .featured-secondary-link {
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }

  .home-sort-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    white-space: normal;
    gap: 6px;
  }

  .home-sort-label {
    text-align: center;
  }

  .home-sort-select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
}

.featured-secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.95rem;
  font-weight: 600;
}

.featured-secondary-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

/* Desktop: 3 colonne (come max-width 33%) senza toccare la card */
@media (min-width: 768px) {
  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile: 1 colonna, schede a tutta larghezza (evita bug da max-width sulla card) */
@media (max-width: 767px) {
  .featured-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .featured-image {
    height: 210px;
  }
}

.featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  position: relative;
}

.featured-card.sponsor-gold {
  border-color: var(--primary);
}

.featured-card.sponsor-silver {
  border-color: #FFF;
}

.featured-card.sponsor-bronze {
  border-color: #c2410c;
}

.featured-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.featured-card.sponsor-gold:hover {
  border-color: var(--primary);
}

.featured-card.sponsor-silver:hover {
  border-color: #FFF;
}

.featured-card.sponsor-bronze:hover {
  border-color: #c2410c;
}

.card.sponsor-gold {
  border-color: var(--primary);
}

.card.sponsor-silver {
  border-color: #FFF;
}

.card.sponsor-bronze {
  border-color: #c2410c;
}

.admin-listing.sponsor-gold {
  border: 1px solid var(--primary);
}

.admin-listing.sponsor-silver {
  border: 1px solid #FFF;
}

.admin-listing.sponsor-bronze {
  border: 1px solid #c2410c;
}

.featured-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.featured-image {
  position: relative;
  width: 100%;
  height: 230px;
  overflow: hidden;
  background: var(--bg-input);
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 1.2rem;
}

.featured-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: var(--primary);
  color: #000000;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.featured-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 8;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  max-width: calc(100% - 24px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.sponsored-badge + .featured-category-badge {
  top: 44px;
}

.featured-category-badge + .featured-badge {
  top: 44px;
}

/* Badge "Auto verificata" nella card in evidenza: a sinistra (come lo sponsorizzato)
   invece che a destra, dove c'è già il pulsante "Compara". Si impila sotto al
   badge sponsorizzato se presente, e il badge categoria scende di conseguenza. */
.featured-image .verified-badge {
  top: 12px;
  right: auto;
  left: 12px;
}
.featured-image .sponsored-badge + .verified-badge {
  top: 44px;
}
.featured-image .verified-badge + .featured-category-badge {
  top: 44px;
}
.featured-image .sponsored-badge + .verified-badge + .featured-category-badge {
  top: 76px;
}

.featured-content {
  padding: 12px 14px 10px;
}

/* Homepage desktop: label compatta + valore su una riga (no "Automatic o") */
@media (min-width: 768px) {
  .featured-card .car-detail-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 8px;
    align-items: center;
  }

  .featured-card .car-detail-label {
    flex: unset;
    max-width: none;
  }

  .featured-card .car-detail-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: normal;
    overflow-wrap: normal;
    min-width: 0;
  }

  .featured-card .location-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .featured-card .location-item__head,
  .featured-card .location-item > div:first-child {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 8px;
    align-items: center;
    width: 100%;
    justify-content: unset;
  }

  .featured-card .location-item .car-detail-value {
    text-align: right;
  }

  .featured-card .location-item .car-detail-value a {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.featured-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: var(--space-xs);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
  font-weight: 500;
}

.featured-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.featured-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.featured-features {
  margin: 6px 0 0;
}

.featured-features span {
  display: inline-flex;
  align-items: center;
  font-size: 0.95rem;
}

.feature-tag {
  display: inline-block;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 500;
  margin-right: var(--space-xs);
  margin-bottom: var(--space-xs);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.featured-location {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: var(--space-sm);
}

.featured-footer {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
}

/* Stats Section (admin / altri contesti) */
.stats-section {
  background: var(--bg-card);
  padding: var(--space-xl) 0;
  margin: var(--space-xl) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  text-align: center;
}

.stat-card {
  padding: var(--space-lg);
  background: var(--bg-hover);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--space-xs);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Features Section (home) */
.features-section {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-hover) 100%);
  padding: var(--space-xl) 0;
  margin: var(--space-xl) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features-section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 var(--space-xl);
  letter-spacing: -0.02em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  align-items: stretch;
}

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

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-lg);
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--primary);
}

.feature-card:hover .feature-icon {
  background: var(--primary);
  color: #0f172a;
}

.feature-card:hover .feature-link {
  color: var(--primary);
}

.feature-card--static {
  cursor: default;
}

.feature-card--static:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

.feature-card--static:hover .feature-icon {
  background: var(--bg-hover);
  color: var(--primary);
}

.feature-link.is-disabled {
  color: var(--text-muted);
  opacity: 0.65;
  cursor: default;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bg-hover);
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  transition: background 0.2s ease, color 0.2s ease;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 var(--space-sm);
  line-height: 1.3;
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 var(--space-md);
  flex: 1;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.feature-link i {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.feature-card:hover .feature-link i {
  transform: translateX(4px);
}

/* Hero Section Migliorata */
.hero {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.hero-content {
  max-width: 900px;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  line-height: 1.1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero p {
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: var(--space-xl);
  line-height: 1.6;
  opacity: 0.95;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.hero-actions {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary, .btn-sponsor {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary);
  color: #000000;
  border: 2px solid var(--primary);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 2px solid var(--border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-sponsor {
  background: rgba(237, 254, 0, 0.12);
  color: var(--primary);
  border: 2px solid var(--primary);
  cursor: pointer;
  font-family: inherit;
}

.btn-sponsor:hover {
  background: rgba(237, 254, 0, 0.22);
  border-color: var(--primary-hover);
  color: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-icon {
  font-size: 1.2rem;
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
}

.feature-icon {
  font-size: 1.2rem;
  opacity: 1;
}

@media (max-width: 768px) {
  .hero {
    padding: var(--space-lg) var(--space-md);
    min-height: 50vh;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .hero-actions {
    gap: var(--space-md);
  }

  .btn-primary, .btn-secondary {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.95rem;
  }

  .hero-features {
    gap: var(--space-lg);
  }

  .feature-item {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: var(--space-lg) var(--space-sm);
    text-align: left;
  }

  .hero-content {
    text-align: left;
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  .btn-primary, .btn-secondary {
    justify-content: center;
  }

  .hero-features {
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: var(--space-md);
  }

  .feature-item {
    justify-content: center;
    text-align: center;
  }
}

/* ===========================================
   LISTING DETAIL PAGE - Two Column Layout
   =========================================== */

.listing-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg);
}

.listing-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.listing-image-column {
  position: sticky;
  top: 20px;
  height: fit-content;
}

.listing-main-image {
  width: 100%;
  height: 500px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-card);
}

.listing-data-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.listing-header {
  padding: var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.listing-description {
  padding: var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.listing-features {
  padding: var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Gallery Section */
.gallery-section {
  margin-bottom: var(--space-xl);
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.gallery-header h3 {
  margin: 0;
}

.photo-count {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--bg-input);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-md);
}

.gallery-item {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--border);
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-hover);
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-thumb {
  transform: scale(1.1);
}

/* Modifications Section */
.modifications-section {
  margin-bottom: var(--space-xl);
}

.modifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.modification-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
}

.category-title {
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 var(--space-md) 0;
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--primary);
}

.category-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.mod-item {
  background: var(--bg-input);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.mod-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

/* Responsive per galleria e modifiche */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-sm);
  }

  .modifications-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .modification-category {
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .category-items {
    gap: 6px;
  }

  .mod-item {
    font-size: 0.8rem;
    padding: 4px 8px;
  }
}

/* Clear per creare nuove righe dopo ogni coppia di card */
.mod-category-card:nth-child(2n) {
  margin-right: 0;
}

.mod-category-card:nth-child(2n+1) {
  clear: left;
}

/* Responsive per dispositivi mobili */
@media (max-width: 768px) {
  .mod-category-card {
    float: none;
    width: 100%;
    margin-right: 0;
    margin-bottom: 12px;
    padding: 16px;
    min-height: auto;
  }

  .mod-category-card:nth-child(2n) {
    margin-right: 0;
  }

  .mod-category-card:nth-child(2n+1) {
    clear: none;
  }

  .mod-category-title {
    font-size: 1rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
  }

  .mod-option {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .mod-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 10px;
  }

  /* Gestione collasso su mobile */
  .mod-category-card.collapsed .mod-items-list {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-top: 0;
    margin-bottom: 0;
  }

  .mod-category-card:not(.collapsed) .mod-items-list {
    max-height: 2000px; /* Valore più alto per mobile */
    opacity: 1;
  }
}

/* Responsive per pagina dettaglio */
@media (max-width: 1024px) {
  .listing-main {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .listing-image-column {
    position: static;
    order: -1; /* Immagine prima su tablet */
  }

  .listing-main-image {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .listing-detail {
    padding: var(--space-md);
  }

  .listing-main {
    gap: var(--space-md);
  }

  .listing-main-image {
    height: 300px;
  }

  .listing-header,
  .listing-description,
  .listing-features {
    padding: var(--space-md);
  }

  .price-tag {
    font-size: 2rem !important;
  }
}

@media (max-width: 480px) {
  .listing-main-image {
    height: 250px;
  }

  .listing-header h1 {
    font-size: 1.5rem;
  }

  .price-tag {
    font-size: 1.8rem !important;
  }
}

/* Utility Classes */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-error { color: var(--error) !important; }

.bg-primary { background: var(--primary) !important; }
.bg-secondary { background: var(--secondary) !important; }

.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* Focus states */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* LISTING DETAIL PAGE STYLES */
.listing-detail-grid {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
}

.listing-detail-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.listing-detail-grid > * {
  min-width: 0;
  flex: 1 1 0;
}

@media (max-width: 980px) {
  .listing-detail-grid {
    flex-direction: column;
    gap: var(--space-lg);
  }
}

.listing-cover-col {
  order: 1;
  min-width: 0;
  flex: 0 0 58%;
  max-width: 58%;
}

.listing-info-col {
  order: 2;
  min-width: 0;
  flex: 0 0 42%;
  max-width: 42%;
}

@media (max-width: 768px) {
  .listing-cover-col {
    order: 1;
    flex: 1 1 100%;
    max-width: 100%;
  }
  .listing-info-col {
    order: 2;
    flex: 1 1 100%;
    max-width: 100%;
  }
}

.listing-cover-card {
  top: 90px;
}

@media (max-width: 768px) {
  .listing-cover-card {
    position: static;
  }
}

.listing-cover-main {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.listing-preparator-overlay {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 9;
  width: 74px;
  height: 74px;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 17, 17, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.listing-preparator-overlay:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.listing-preparator-overlay img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (max-width: 480px) {
  .listing-preparator-overlay {
    width: 64px;
    height: 64px;
    padding: 7px;
  }
}

.wishlist-toggle {
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.wishlist-toggle i {
  color: #000;
}

.wishlist-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.wishlist-toggle.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}

.listing-cover-main-placeholder {
  width: 100%;
  height: 300px;
  background: var(--bg-input);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.listing-price-views {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: var(--space-lg) 0;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 480px) {
  .listing-price-views {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
}

.price-tag {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

@media (max-width: 768px) {
  .price-tag {
    font-size: 2.2rem;
  }
}

.listing-views-badge {
  background: var(--bg-input);
  color: var(--text-muted);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
}

.listing-location-card {
  margin-top: 0;
  background: rgba(237, 254, 0, 0.08);
  border-color: rgba(237, 254, 0, 0.2);
}

.listing-features-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: var(--space-md) 0;
}

.listing-features-badges span {
  background: var(--success);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
}

.listing-description-box {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.listing-description-box h3 {
  margin-bottom: var(--space-md);
  color: var(--text-main);
}

.listing-description-box p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
  white-space: pre-line;
}

/* GALLERY STYLES */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.gallery-item {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-hover);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

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

/* MODIFICATIONS DETAIL STYLES */
.mods-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.mod-detail-category {
  background: var(--bg-input);
  padding: var(--space-lg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-width: 0;
}

.mod-detail-title {
  margin: 0 0 var(--space-md) 0;
  color: var(--text-main);
  font-size: 1.1rem;
  font-weight: 600;
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border);
}

.mod-detail-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  min-width: 0;
}

.mod-detail-tag {
  background: var(--primary);
  color: #000;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

/* SOCIAL SHARE STYLES */
.listing-share-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.listing-share-card {
  flex: 1 1 0;
  min-width: 0;
  font-size: 0.9rem;
}

.listing-share-card .blog-cta-box {
  gap: 10px;
}

.listing-share-card .social-share-section {
  margin: 0;
  height: 100%;
  padding: 0;
  background: transparent;
  border: none;
}

.listing-share-card h4,
.listing-share-card .blog-cta-box div {
  font-size: 0.95rem;
  letter-spacing: 0.2px;
}

.listing-share-card .btn {
  font-size: 0.9rem;
  padding: 8px 14px;
}

.social-share-section {
  margin: var(--space-lg) 0;
  padding: var(--space-lg);
  background: var(--bg-input);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.social-share-section h4 {
  margin: 0 0 var(--space-md) 0;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
}

.social-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.35rem;
  transition: color 0.2s ease;
  text-decoration: none;
  border: none;
  background: transparent;
  padding: var(--space-xs);
  border-radius: 4px;
  width: auto;
  height: auto;
}

.social-text {
  display: none;
}

.social-btn:hover {
  color: var(--primary);
}

.social-icon {
  line-height: 1;
}

.social-text {
  line-height: 1;
}

@media (max-width: 480px) {
  .listing-share-row {
    flex-direction: column;
  }

  .social-share-buttons {
    justify-content: center;
  }
}

/* LOCATION LINK STYLES */
.location-link {
  color: var(--secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.location-link:hover {
  color: var(--secondary-hover);
  text-decoration: underline;
  transform: translateY(-1px);
}

.location-link:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 8, 0.82);
  padding: var(--space-lg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cookie-banner.is-hidden {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

.cookie-banner__content {
  width: min(760px, 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
  background: #111;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.cookie-banner__text {
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.55;
}

.cookie-banner__title {
  color: var(--text-main);
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.cookie-banner__actions {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.cookie-banner__actions .btn,
.cookie-banner__actions .btn-secondary,
.cookie-banner__actions .btnp {
  flex: 0 0 220px;
  width: 220px;
  min-height: 48px;
  padding: var(--space-md) var(--space-lg);
}

.cookie-banner__link {
  color: var(--primary);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .cookie-banner__content {
    padding: 20px;
  }

  .cookie-banner__actions {
    width: 100%;
    justify-content: stretch;
  }
}

@media (max-width: 480px) {
  .cookie-banner__actions .btn,
  .cookie-banner__actions .btn-secondary,
  .cookie-banner__actions .btnp {
    flex: 1 1 auto;
    width: 100%;
  }

  .cookie-banner__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

body.cookie-consent-open {
  overflow: hidden;
}

/* FOOTER STYLES */
footer a:hover {
  color: var(--primary) !important;
}

/* MESSAGING SYSTEM STYLES */
.messages-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.message-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.message-item:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.message-avatar {
  flex-shrink: 0;
}

.avatar-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.2rem;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xs);
}

.message-sender {
  font-weight: 600;
  color: var(--text-main);
}

.message-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.unread-badge {
  background: var(--primary);
  color: #000;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: var(--space-sm);
}

.message-subject {
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: var(--space-xs);
  font-size: 0.9rem;
}

.message-preview {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* CONVERSATION STYLES */
.conversation-container {
  max-height: 600px;
  overflow-y: auto;
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.message-bubble {
  max-width: 70%;
  padding: var(--space-md);
  border-radius: var(--radius);
  position: relative;
}

.message-sent {
  align-self: flex-end;
  background: var(--primary);
  color: #000;
  margin-left: auto;
}

.message-received {
  align-self: flex-start;
  background: var(--bg-input);
  color: var(--text-main);
  margin-right: auto;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xs);
  font-size: 0.8rem;
  opacity: 0.8;
}

.message-author {
  font-weight: 600;
}

.message-time {
  font-size: 0.75rem;
}

.message-subject-bubble {
  font-weight: 600;
  margin-bottom: var(--space-xs);
  font-size: 0.9rem;
}

.message-text {
  line-height: 1.5;
  word-wrap: break-word;
}

@media (max-width: 768px) {
  .message-item {
    padding: var(--space-sm);
    gap: var(--space-sm);
  }

  .avatar-circle {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .message-bubble {
    max-width: 85%;
  }

  .conversation-container {
    max-height: 400px;
    padding: var(--space-sm);
  }
}

/* MODIFICATIONS CHEVRON AND ALIGNMENT IMPROVEMENTS */
.mod-chevron {
  margin-left: auto;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  opacity: 0.7;
  transform-origin: center;
}

.mod-category-card.collapsed .mod-chevron {
  transform: rotate(-90deg);
}

.mod-category-card:not(.collapsed) .mod-chevron {
  transform: rotate(0deg);
}

.mod-category-title:hover .mod-chevron {
  opacity: 1;
  color: var(--primary);
}

/* Miglior allineamento checkbox */
.mod-option {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.mod-option:hover {
  background-color: var(--bg-hover);
}

.mod-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  accent-color: var(--primary);
  cursor: pointer;
}

.mod-option span {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Image Popup Styles */
.image-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.image-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.image-popup-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-popup-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.image-popup-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.image-popup-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.image-popup-close:active {
  transform: scale(0.95);
}

.image-popup-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.image-popup-prev { left: -60px; }
.image-popup-next { right: -60px; }

.image-popup-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.05);
}

.image-popup-nav:active {
  transform: translateY(-50%) scale(0.95);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .image-popup-content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .image-popup-close {
    top: -45px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .image-popup-nav {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .image-popup-prev { left: 10px; }
  .image-popup-next { right: 10px; }

  .image-popup-img {
    max-height: 80vh;
  }
}

/* Aggiungi cursore pointer alle immagini cliccabili nella pagina dettaglio */
.listing-cover-main,
.gallery-item .thumb {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.listing-cover-main:hover,
.gallery-item .thumb:hover {
  transform: scale(1.02);
}

/* Sticky CTA mobile (Pubblica / Contatta) */
.mobile-cta-bar {
  display: none;
}

@media (max-width: 768px) {
  .mobile-cta-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(16, 16, 16, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10001;
    display: flex;
    justify-content: center;
  }

  .mobile-cta-btn {
    width: 100%;
    max-width: 520px;
    font-size: 1rem;
    padding: 12px 18px;
  }

  .mobile-cta-spacer {
    height: 72px;
  }
}

/* === SISTEMA UPLOAD IMMAGINI MODERNO === */
.image-upload-container {
  margin: var(--space-lg) 0;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: var(--space-xl);
  text-align: center;
  background: var(--bg-card);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(237, 254, 0, 0.05);
  transform: scale(1.01);
}

.upload-zone.drag-over {
  border-style: solid;
  background: rgba(237, 254, 0, 0.1);
  box-shadow: 0 0 20px rgba(237, 254, 0, 0.2);
}

.upload-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.upload-icon {
  font-size: 3rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.upload-zone:hover .upload-icon,
.upload-zone.drag-over .upload-icon {
  color: var(--primary);
}

.upload-text {
  font-size: 1.1rem;
  color: var(--text-main);
}

.upload-link {
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
}

.upload-link:hover {
  color: var(--primary-hover);
}

.upload-info {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.image-preview-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: move;
}

.image-preview-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-preview-item.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.image-preview-wrapper {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.image-preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-preview-item:hover .image-preview-overlay {
  opacity: 1;
}

.image-preview-remove,
.image-preview-cover {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
}

.image-preview-remove:hover {
  background: #dc2626;
  color: white;
  transform: scale(1.1);
}

.image-preview-cover:hover {
  background: var(--primary);
  color: #000;
  transform: scale(1.1);
}

.cover-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--primary);
  color: #000;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.image-preview-info {
  padding: var(--space-sm);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.image-filename {
  display: block;
  font-size: 0.8rem;
  color: var(--text-main);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 2px;
}

.image-status {
  display: block;
  font-size: 0.7rem;
  color: var(--primary);
  font-weight: 600;
}

.image-preview-item.loading .image-preview-overlay {
  opacity: 0.4;
  pointer-events: none;
}

.image-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  color: #fff;
  z-index: 2;
}

.image-loading-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.image-loading-text {
  font-size: 0.8rem;
  font-weight: 600;
}

.image-preview-item.has-error {
  border: 1px solid #dc2626;
}

/* STILI PROFILO UNIFICATO */
.nav-badge {
  background: var(--primary);
  color: #000;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* === SISTEMA LOADER PER MIGLIORARE UX === */

/* Loader globale overlay */
.global-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.global-loader-overlay.active {
  opacity: 1;
  visibility: visible;
}

.global-loader-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  min-width: 200px;
}

.global-loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.global-loader-text {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

/* Loader per bottoni */
.button-loader {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.button-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Loader per select/disabled states */
.select-loading {
  position: relative;
}

.select-loading::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  pointer-events: none;
}

/* Animazione spinner */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive per mobile */
@media (max-width: 768px) {
  .upload-zone {
    padding: var(--space-lg);
  }

  .upload-icon {
    font-size: 2.5rem;
  }

  .upload-text {
    font-size: 1rem;
  }

  .image-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-sm);
  }

  .image-preview-info {
    padding: var(--space-xs);
  }

  .global-loader-content {
    margin: var(--space-md);
    padding: var(--space-lg);
    min-width: 180px;
  }

  .global-loader-text {
    font-size: 0.8rem;
  }
}

/* === GALLERIA SCORREVOLE === */

/* Contenitore principale della galleria */
.gallery-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Area di scorrimento */
.gallery-scroll {
  flex: 1;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

/* Nasconde la scrollbar in Chrome/Safari */
.gallery-scroll::-webkit-scrollbar {
  display: none;
}

/* === ANNUNCI SIMILI === */
.similar-section {
  margin-top: var(--space-xl);
  width: 100%;
  clear: both;
  max-width: 100%;
  overflow: hidden;
}

.similar-wrapper {
  display: grid;
  gap: 12px;
  max-width: 100%;
}

.similar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-md);
}

.similar-header h3 {
  margin: 0;
}

.similar-controls {
  display: inline-flex;
  gap: 8px;
}

.similar-nav {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.similar-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.similar-nav:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: var(--primary);
}

.similar-carousel {
  position: relative;
  overflow: hidden;
}

.similar-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  max-width: 100%;
}

.similar-track::-webkit-scrollbar {
  display: none;
}

.similar-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.similar-card.sponsor-gold {
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(234, 179, 8, 0.16);
}

.similar-card.sponsor-silver {
  border-color: #FFF;
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.16);
}

.similar-card.sponsor-bronze {
  border-color: #c2410c;
  box-shadow: 0 10px 24px rgba(194, 65, 12, 0.16);
}

.similar-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.similar-card.sponsor-gold:hover {
  border-color: var(--primary);
  box-shadow: 0 14px 30px rgba(234, 179, 8, 0.22);
}

.similar-card.sponsor-silver:hover {
  border-color: #FFF;
  box-shadow: 0 14px 30px rgba(148, 163, 184, 0.22);
}

.similar-card.sponsor-bronze:hover {
  border-color: #c2410c;
  box-shadow: 0 14px 30px rgba(194, 65, 12, 0.22);
}

.similar-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.similar-card-media {
  position: relative;
  width: 100%;
  height: 160px;
  background: #0f172a;
}

.similar-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.similar-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.similar-card-body {
  padding: 12px;
  display: grid;
  gap: 6px;
}

.similar-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.similar-card-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
}

.similar-card-meta,
.similar-card-city {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.similar-empty {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: var(--space-md);
  border: 1px dashed var(--border);
  border-radius: 10px;
  text-align: center;
}

@media (max-width: 768px) {
  .similar-card {
    flex: 0 0 220px;
  }
}

/* Singola immagine della galleria scorrevole */
.gallery-container .gallery-item {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s ease;
}

/* Hover effect per le immagini della galleria */
.gallery-container .gallery-item:hover {
  transform: scale(1.05);
}

/* Pulsanti di navigazione */
.gallery-nav {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
  font-size: 16px;
  transition: all 0.2s ease;
  z-index: 1;
  flex-shrink: 0;
}

/* Hover dei pulsanti */
.gallery-nav:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

/* Stato disabilitato dei pulsanti */
.gallery-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Preparatori: mappa compatta (non usa l’altezza 70vh della mappa annunci) */
.preparatori-map-card .preparatori-map-panel {
  width: 100%;
}

.preparatori-map-card .map-canvas {
  height: 300px;
  min-height: 300px;
  max-height: 32vh;
}

.preparators-top-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.preparators-section {
  margin-top: var(--space-lg);
}

.preparators-section-title {
  margin: 0 0 14px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-main);
}

.preparator-map-pin {
  background: transparent;
  border: none;
}

.preparator-map-pin span {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
}

.preparator-map-pin--workshop span {
  background: #3b82f6;
}

.preparator-map-pin--tuner span {
  background: #ef4444;
}

.preparators-join-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(237, 254, 0, 0.35);
  background: linear-gradient(135deg, rgba(237, 254, 0, 0.12), rgba(17, 24, 39, 0.92));
}

.preparators-join-cta__content {
  min-width: 0;
}

.preparators-join-cta__title {
  margin: 0;
  font-size: 1.2rem;
}

.preparators-join-cta__body {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.preparators-join-cta__button {
  flex-shrink: 0;
}

.preparators-contact-form {
  display: grid;
  gap: 10px;
}

.preparators-contact-form__hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .preparatori-map-card .map-canvas {
    height: 200px;
    min-height: 180px;
    max-height: 28vh;
  }
  .preparators-join-cta {
    flex-direction: column;
    align-items: flex-start;
  }
  .preparators-join-cta__button {
    width: 100%;
    text-align: center;
  }
}

@media (min-width: 1024px) {
  .preparators-top-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.preparator-spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preparator-spec-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.preparator-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.preparator-header__media {
  width: 96px;
  min-width: 96px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.preparator-header__img {
  width: 100%;
  height: 96px;
  display: block;
  object-fit: cover;
}

.preparator-header__content {
  min-width: 0;
}

.preparator-detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: var(--space-lg);
  align-items: start;
}

.preparator-detail-sidebar {
  position: sticky;
  top: 90px;
}

.preparator-linked-listings {
  display: grid;
  gap: 12px;
}

.preparator-linked-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.preparator-linked-cover {
  display: block;
  width: 100%;
  background: var(--bg-input);
}

.preparator-linked-cover.placeholder {
  padding: 16px;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.9rem;
}

.preparator-linked-cover-img {
  width: 100%;
  height: 170px;
  display: block;
  object-fit: cover;
}

.preparator-linked-body {
  padding: 10px 12px 12px;
}

.preparator-linked-price {
  color: #edfe00;
  font-weight: 700;
  margin-bottom: 6px;
}

.preparator-linked-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.preparator-linked-title a {
  color: var(--text-main);
  text-decoration: none;
}

.preparator-linked-title a:hover {
  text-decoration: underline;
}

.preparator-linked-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.preparator-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preparator-gallery-item {
  display: block;
  max-width: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.preparator-gallery-img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 620px) {
  .preparator-header {
    align-items: flex-start;
  }

  .preparator-header__media {
    width: 88px;
    min-width: 88px;
  }

  .preparator-header__img {
    height: 88px;
  }
}

.preparator-desc-body {
  line-height: 1.6;
  color: var(--text-main);
}

.preparator-desc-body--html p {
  margin: 0.65em 0;
}

.preparator-desc-body--html p:first-child {
  margin-top: 0;
}

.preparator-desc-body--html p:last-child {
  margin-bottom: 0;
}

.preparator-desc-body--html ul,
.preparator-desc-body--html ol {
  margin: 0.5em 0 0.5em 1.25rem;
  padding: 0;
}

.preparator-desc-body--html h1 {
  margin: 1em 0 0.45em;
  font-size: 1.35rem;
  line-height: 1.25;
}

.preparator-desc-body--html h2 {
  margin: 1em 0 0.4em;
  font-size: 1.2rem;
  line-height: 1.3;
}

.preparator-desc-body--html h3 {
  margin: 0.95em 0 0.35em;
  font-size: 1.1rem;
  line-height: 1.3;
}

.preparator-desc-body--html h4 {
  margin: 0.9em 0 0.35em;
  font-size: 1.05rem;
  line-height: 1.3;
}

.preparator-desc-body--html h5 {
  margin: 0.85em 0 0.3em;
  font-size: 1rem;
  line-height: 1.3;
}

.preparator-desc-body--html h6 {
  margin: 0.8em 0 0.3em;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.preparator-desc-body--html h1:first-child,
.preparator-desc-body--html h2:first-child,
.preparator-desc-body--html h3:first-child,
.preparator-desc-body--html h4:first-child,
.preparator-desc-body--html h5:first-child,
.preparator-desc-body--html h6:first-child {
  margin-top: 0;
}

.preparator-desc-body--html dl {
  margin: 0.65em 0;
}

.preparator-desc-body--html dt {
  font-weight: 600;
  margin-top: 0.5em;
}

.preparator-desc-body--html dd {
  margin: 0.15em 0 0.35em 1rem;
  color: var(--text-muted);
}

.preparator-desc-body--html q {
  font-style: italic;
  color: var(--text-muted);
}

.preparator-desc-body--html {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.preparator-desc-body--html table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0.85em 0;
  font-size: 0.92rem;
}

.preparator-desc-body--html th,
.preparator-desc-body--html td {
  border: 1px solid var(--border);
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}

.preparator-desc-body--html th {
  background: color-mix(in srgb, var(--bg-card) 70%, var(--border));
  font-weight: 600;
}

.preparator-desc-body--html caption {
  caption-side: bottom;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.35em;
  text-align: left;
}

.preparator-desc-body--html pre {
  margin: 0.75em 0;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  background: color-mix(in srgb, var(--bg-card) 85%, var(--border));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.86em;
  line-height: 1.45;
}

.preparator-desc-body--html code {
  font-size: 0.9em;
  padding: 0.12em 0.4em;
  background: color-mix(in srgb, var(--bg-card) 80%, var(--border));
  border-radius: 4px;
}

.preparator-desc-body--html pre code {
  padding: 0;
  background: none;
  border-radius: 0;
  font-size: inherit;
}

.preparator-desc-body--html blockquote {
  margin: 0.75em 0;
  padding-left: 1rem;
  border-left: 3px solid var(--border);
  color: var(--text-muted);
}

.preparator-desc-body--html a {
  color: var(--primary);
  text-decoration: underline;
}

.preparator-desc-body--html hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

@media (max-width: 960px) {
  .preparator-detail-layout {
    grid-template-columns: 1fr;
  }
  .preparator-detail-sidebar {
    position: static;
  }
}

.build-score-details summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.build-score-details summary::-webkit-details-marker {
  display: none;
}

.build-score-help {
  color: var(--primary);
  text-decoration: underline;
}

.build-score-popover {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.86rem;
  line-height: 1.45;
}

.build-score-popover h4 {
  margin: 0 0 6px;
  font-size: 0.92rem;
  color: var(--text-main);
}

.build-score-popover p {
  margin: 0 0 6px;
}

.build-score-popover ul {
  margin: 0 0 6px 18px;
  padding: 0;
}

.build-score-popover li {
  margin-bottom: 4px;
}

.build-score-display {
  margin-top: 4px;
}
.build-score-main-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.build-score-tier-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}
.build-score-bonus-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.build-score-bonus-prefix {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 2px;
}
.build-score-bonus-chip {
  font-size: 0.75rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(237, 254, 0, 0.12);
  border: 1px solid rgba(237, 254, 0, 0.35);
  color: var(--text-main);
  line-height: 1.25;
}
.build-score-popover .build-score-note {
  margin: 0;
  color: var(--text-muted);
}

/* Catalogo marca/modello */
.catalog-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.catalog-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.catalog-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.catalog-header-meta {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.catalog-stats {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  width: 100%;
}

.catalog-stat {
  margin: 0;
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.catalog-stat-label {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.catalog-stat-value {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  word-break: break-word;
}

@media (max-width: 900px) {
  .catalog-stats {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .catalog-stat {
    flex: 0 0 auto;
    min-width: 132px;
  }
}

.catalog-similar {
  margin-top: 20px;
}

.catalog-similar-title {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.catalog-similar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.catalog-similar-item {
  margin: 0;
}

.catalog-similar-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.catalog-similar-link:hover {
  border-color: rgba(237, 254, 0, 0.35);
  background: rgba(237, 254, 0, 0.06);
  color: inherit;
  transform: translateY(-2px);
}

.catalog-similar-cover {
  aspect-ratio: 16 / 10;
  background: #1e293b;
  overflow: hidden;
}

.catalog-similar-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-similar-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
}

.catalog-similar-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
}

.catalog-similar-name {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.25;
}

.catalog-similar-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Banner pubblicitari laterali (300×600) */
.page-shell {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  max-width: 1860px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.page-shell .page-main {
  flex: 0 1 1200px;
  min-width: 0;
  max-width: 1200px;
  width: 100%;
}

.page-shell main {
  max-width: none;
  margin: 0;
}

.side-banners-column {
  display: none;
  flex: 0 0 300px;
  width: 300px;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 90px;
}

@media (min-width: 1681px) {
  .side-banners-column {
    display: flex;
  }
}

.side-banner-slot {
  width: 300px;
  height: 600px;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--surface);
}

.side-banner-slot a {
  display: block;
  width: 300px;
  height: 600px;
  line-height: 0;
}

.side-banner-slot img {
  display: block;
  width: 300px;
  height: 600px;
  object-fit: cover;
}

@media (max-width: 1680px) {
  .page-shell .page-main {
    flex: 1 1 auto;
    max-width: 1200px;
  }

  .page-shell {
    padding: 0;
  }
}

/* Banner orizzontale home (1000×300, desktop + mobile) */
.landscape-banners {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto var(--space-xl);
  padding: 0;
  max-width: 1000px;
  width: 100%;
}

.landscape-banners-label {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  align-self: flex-start;
}

.banner-carousel,
.landscape-banners > .landscape-banner-slot {
  width: 100%;
  max-width: 1000px;
}

.banner-carousel {
  overflow: hidden;
  border-radius: 6px;
  width: 100%;
  max-width: 1000px;
}

.banner-carousel-track {
  display: flex;
  align-items: stretch;
  transition: transform 0.35s ease;
  will-change: transform;
}

.banner-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
}

.landscape-banner-slot {
  width: 100%;
  max-width: 1000px;
  line-height: 0;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface);
}

.landscape-banner-slot a {
  display: block;
  line-height: 0;
}

.landscape-banner-slot img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 1000px;
}

.banner-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.banner-carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.banner-carousel-dot.is-active {
  background: var(--primary);
  transform: scale(1.15);
}

.landscape-banners--listing {
  margin: var(--space-lg) 0 0;
  max-width: 100%;
  width: 100%;
  align-items: stretch;
}

.landscape-banners--listing .landscape-banners-label {
  align-self: flex-start;
}

.landscape-banners--listing .banner-carousel,
.landscape-banners--listing > .landscape-banner-slot {
  max-width: 100%;
}

.landscape-banners--listing .landscape-banner-slot img {
  max-width: 100%;
}
