/* ═══════════════════════════════════════════════════════════════════
   HappyDeal — public/css/public.css
   Stile catalogo pubblico: elegante, sobrio, colori logo
   Palette: Blu #3AAFE4 · Nero #1A1A1A · Verde #4CAF50 · Bianco #FFFFFF
   Font: Nunito + Playfair Display
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&family=Source+Serif+4:wght@700;900&display=swap');

:root {
  --hd-blue:     #3AAFE4;
  --hd-blue-dark:#1E8DC0;
  --hd-blue-pale:#EBF7FD;
  --hd-green:    #4CAF50;
  --hd-ink:      #1A1A1A;
  --hd-dark:     #0F0F0F;
  --hd-muted:    #6B7280;
  --hd-light:    #F8FAFC;
  --hd-white:    #FFFFFF;
  --hd-border:   #E5E7EB;
  --hd-orange:   #FF6B35;

  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;

  --shadow-card: 0 2px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.04);
  --shadow-lift: 0 8px 32px rgba(0,0,0,.14);
  --shadow-blue: 0 4px 20px rgba(58,175,228,.3);

  --font-body:    'Source Sans 3', sans-serif;
  --font-display: 'Source Serif 4', serif;
  --transition:   .2s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--hd-light);
  color: var(--hd-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--hd-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--hd-blue-dark); }
img { max-width: 100%; height: auto; display: block; }

/* ─── NAVBAR ────────────────────────────────────────────────────── */
.navbar {
  background: var(--hd-white);
  border-bottom: 1px solid var(--hd-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.navbar-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--hd-ink);
  white-space: nowrap;
}
.navbar-logo span { color: var(--hd-blue); }
.navbar-logo img { height: 36px; width: auto; }

.navbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .88rem;
  color: var(--hd-muted);
  transition: all var(--transition);
}
.navbar-link:hover { background: var(--hd-blue-pale); color: var(--hd-blue); }
.navbar-link.active { color: var(--hd-blue); }

.btn-nav-login {
  padding: 8px 20px;
  border: 2px solid var(--hd-blue);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: .88rem;
  color: var(--hd-blue);
  transition: all var(--transition);
}
.btn-nav-login:hover { background: var(--hd-blue); color: var(--hd-white); }

.btn-nav-cta {
  padding: 8px 20px;
  background: var(--hd-blue);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: .88rem;
  color: var(--hd-white);
  transition: all var(--transition);
  box-shadow: var(--shadow-blue);
}
.btn-nav-cta:hover { background: var(--hd-blue-dark); color: var(--hd-white); transform: translateY(-1px); }

/* ─── HERO ───────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0F2A3D 0%, #1A4A6E 50%, #0F2A3D 100%);
  padding: 72px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(58,175,228,.2) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 80% 30%, rgba(76,175,80,.15) 0%, transparent 60%);
}
.hero-content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: var(--hd-white);
  line-height: 1.15;
  margin-bottom: 12px;
}
.hero-title span { color: var(--hd-blue); }
.hero-subtitle {
  color: rgba(255,255,255,.75);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 40px;
}

/* ─── SEARCH BOX ─────────────────────────────────────────────────── */
.search-box {
  background: var(--hd-white);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
  max-width: 680px;
  margin: 0 auto;
}
.search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-right: 2px solid var(--hd-border);
}
.search-field:last-of-type { border-right: none; }
.search-field-icon { color: var(--hd-blue); font-size: 1.1rem; flex-shrink: 0; }
.search-field-inner { flex: 1; }
.search-field-label {
  display: block;
  font-size: .7rem;
  font-weight: 800;
  color: var(--hd-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.search-input {
  width: 100%;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 700;
  color: var(--hd-ink);
  background: transparent;
}
.search-input::placeholder { color: #B0BAC8; font-weight: 400; }
.search-btn {
  background: var(--hd-blue);
  color: var(--hd-white);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  box-shadow: var(--shadow-blue);
}
.search-btn:hover { background: var(--hd-blue-dark); transform: translateY(-1px); }

@media (max-width: 640px) {
  .search-box { flex-direction: column; border-radius: var(--radius-md); }
  .search-field { border-right: none; border-bottom: 2px solid var(--hd-border); width: 100%; }
  .search-field:last-of-type { border-bottom: none; }
  .search-btn { width: 100%; }
}

/* ─── CATEGORIE PILLS ────────────────────────────────────────────── */
.categorie-pills {
  background: var(--hd-white);
  border-bottom: 1px solid var(--hd-border);
  padding: 16px 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.categorie-pills::-webkit-scrollbar { display: none; }
.pills-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-xl);
  font-size: .85rem;
  font-weight: 700;
  border: 2px solid var(--hd-border);
  color: var(--hd-muted);
  transition: all var(--transition);
  cursor: pointer;
  background: var(--hd-white);
  text-decoration: none;
}
.pill:hover { border-color: var(--hd-blue); color: var(--hd-blue); background: var(--hd-blue-pale); }
.pill.active { background: var(--hd-blue); color: var(--hd-white); border-color: var(--hd-blue); }
.pill-icon { font-size: 1rem; }

/* ─── CONTENUTO PRINCIPALE ───────────────────────────────────────── */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ─── SEZIONE ────────────────────────────────────────────────────── */
.section { margin-bottom: 48px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--hd-ink);
}
.section-link {
  font-size: .85rem;
  font-weight: 800;
  color: var(--hd-blue);
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-link:hover { color: var(--hd-blue-dark); }

/* ─── GRIGLIA OFFERTE ────────────────────────────────────────────── */
.offerte-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 960px)  { .offerte-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .offerte-grid { grid-template-columns: 1fr; } }

/* ─── CARD OFFERTA ─ stile BellaVita ─────────────────────────────── */
.offer-card {
  background: var(--hd-white);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,.12);
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.offer-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.14);
  transform: translateY(-3px);
  color: inherit;
}

.offer-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #EEF2F7;
}
.offer-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.offer-card:hover .offer-card-img img { transform: scale(1.04); }

.offer-card-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #EBF7FD, #D1ECF9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.offer-badge-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--hd-blue);
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.offer-badge-soldout {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(220,50,50,.92);
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 700;
}

.offer-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.offer-card-title {
  font-weight: 700;
  font-size: .92rem;
  color: var(--hd-ink);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.offer-card-locale {
  font-size: .82rem;
  font-weight: 600;
  color: var(--hd-blue);
  margin-bottom: 10px;
}

.offer-card-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  color: var(--hd-muted);
  font-weight: 600;
}

.offer-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--hd-muted);
}
.rating-star { color: #FFB800; }

.offer-card-footer {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-top: 1px solid #EEF0F3;
}

.offer-price-from {
  font-size: .72rem;
  font-weight: 600;
  color: var(--hd-muted);
  display: block;
  margin-bottom: 1px;
}
.offer-price-original {
  font-size: .78rem;
  font-weight: 600;
  color: var(--hd-muted);
  text-decoration: line-through;
  display: block;
}
.offer-price-deal {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--hd-blue);
  line-height: 1;
}
.offer-price-deal span { font-size: .85rem; font-weight: 600; }

.offer-card-persons {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--hd-blue);
  font-size: .8rem;
}

.offer-card-cta {
  display: none;
}

/* ─── EMPTY STATE ────────────────────────────────────────────────── */
.empty-results {
  text-align: center;
  padding: 80px 24px;
  color: var(--hd-muted);
}
.empty-results-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-results-title { font-size: 1.2rem; font-weight: 800; color: var(--hd-ink); margin-bottom: 8px; }
.empty-results-text { font-size: .9rem; font-weight: 600; }

/* ─── FOOTER ─────────────────────────────────────────────────────── */
.footer {
  background: var(--hd-ink);
  color: rgba(255,255,255,.6);
  padding: 40px 24px;
  margin-top: 64px;
  text-align: center;
  font-size: .85rem;
  font-weight: 600;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--hd-white);
  margin-bottom: 8px;
  display: block;
}
.footer-logo span { color: var(--hd-blue); }

/* ─── PAGINA OFFERTA SINGOLA ─────────────────────────────────────── */
.offerta-hero {
  background: var(--hd-ink);
  position: relative;
  overflow: hidden;
  min-height: 400px;
}
.offerta-hero-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  opacity: .6;
}
.offerta-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
}
.offerta-hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.offerta-breadcrumb {
  font-size: .8rem;
  color: rgba(255,255,255,.65);
  font-weight: 600;
  margin-bottom: 12px;
}
.offerta-breadcrumb a { color: rgba(255,255,255,.65); }
.offerta-breadcrumb a:hover { color: var(--hd-blue); }
.offerta-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 900;
  color: var(--hd-white);
  line-height: 1.2;
  margin-bottom: 8px;
}
.offerta-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.offerta-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  font-weight: 700;
  color: rgba(255,255,255,.8);
}

.offerta-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) { .offerta-layout { grid-template-columns: 1fr; } }

/* Galleria foto */
.galleria {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.galleria img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity var(--transition);
}
.galleria img:hover { opacity: .85; }
.galleria img:first-child {
  grid-column: span 2;
  grid-row: span 2;
  height: 248px;
}

/* Sezione info offerta */
.offerta-section { margin-bottom: 32px; }
.offerta-section-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--hd-ink);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--hd-border);
}
.offerta-desc {
  font-size: .95rem;
  color: var(--hd-muted);
  line-height: 1.8;
  font-weight: 600;
}

/* Opzioni */
.opzione-card {
  border: 2px solid var(--hd-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  transition: all var(--transition);
}
.opzione-card:hover { border-color: var(--hd-blue); background: var(--hd-blue-pale); }
.opzione-card.selected { border-color: var(--hd-blue); background: var(--hd-blue-pale); }
.opzione-nome { font-weight: 800; font-size: .95rem; color: var(--hd-ink); }
.opzione-desc-text { font-size: .8rem; color: var(--hd-muted); font-weight: 600; margin-top: 3px; }
.opzione-prezzo { text-align: right; flex-shrink: 0; }
.opzione-pieno { font-size: .8rem; color: var(--hd-muted); text-decoration: line-through; }
.opzione-scontato { font-size: 1.3rem; font-weight: 900; color: var(--hd-blue); }

/* Sticky sidebar acquisto */
.acquisto-card {
  background: var(--hd-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  padding: 24px;
  position: sticky;
  top: 80px;
  border: 2px solid var(--hd-border);
}
.acquisto-prezzo-da { font-size: .8rem; color: var(--hd-muted); font-weight: 600; }
.acquisto-prezzo {
  font-size: 2rem;
  font-weight: 900;
  color: var(--hd-blue);
  line-height: 1;
  margin-bottom: 4px;
}
.acquisto-prezzo-originale {
  font-size: .9rem;
  color: var(--hd-muted);
  text-decoration: line-through;
  margin-bottom: 20px;
}
.acquisto-divider { height: 1px; background: var(--hd-border); margin: 16px 0; }

.btn-acquista {
  width: 100%;
  padding: 16px;
  background: var(--hd-blue);
  color: var(--hd-white);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-blue);
}
.btn-acquista:hover { background: var(--hd-blue-dark); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(58,175,228,.4); }
.btn-acquista:disabled { background: var(--hd-border); color: var(--hd-muted); cursor: not-allowed; transform: none; box-shadow: none; }

/* Hashtag */
.hashtag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.hashtag {
  padding: 5px 12px;
  background: var(--hd-blue-pale);
  color: var(--hd-blue);
  border-radius: var(--radius-xl);
  font-size: .78rem;
  font-weight: 700;
  transition: all var(--transition);
}
.hashtag:hover { background: var(--hd-blue); color: var(--hd-white); }

/* Locale card */
.locale-card {
  background: var(--hd-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.locale-logo {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--hd-border);
}
.locale-logo-placeholder {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: var(--hd-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.locale-nome { font-weight: 800; font-size: .95rem; color: var(--hd-ink); }
.locale-indirizzo { font-size: .78rem; color: var(--hd-muted); font-weight: 600; margin-top: 2px; }

/* Commenti */
.commento {
  padding: 16px 0;
  border-bottom: 1px solid var(--hd-border);
}
.commento:last-child { border-bottom: none; }
.commento-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.commento-autore { font-weight: 800; font-size: .88rem; color: var(--hd-ink); }
.commento-stelle { color: #FFB800; font-size: .88rem; }
.commento-testo { font-size: .88rem; color: var(--hd-muted); font-weight: 600; line-height: 1.6; }
.commento-data { font-size: .72rem; color: var(--hd-muted); margin-top: 4px; }

/* Flash pubblico */
.flash-pub { border-radius: var(--radius-md); padding: 12px 18px; margin-bottom: 20px; font-weight: 700; font-size: .9rem; }
.flash-pub-success { background: #E6FAF5; color: #00835F; border-left: 4px solid #00C48C; }
.flash-pub-error   { background: #FFF0F0; color: #CC2222; border-left: 4px solid #FF4444; }
.flash-pub-info    { background: var(--hd-blue-pale); color: var(--hd-blue-dark); border-left: 4px solid var(--hd-blue); }

/* Responsive navbar */
@media (max-width: 640px) {
  .navbar-links { display: none; }
  .navbar-inner { justify-content: space-between; }
}