/* ============================================================
   vetrina.css — PublicCartaPage + PublicWineSheet
   ============================================================ */

/* ---------- HEADER ---------- */
.vetrina { min-height: 100vh; background: var(--avorio-50); }

.vetrina-header {
  background: var(--bordeaux-950);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
  color: var(--avorio-50);
}
.vetrina-header__name { color: var(--oro-light); opacity: .9; }
.vetrina-header__title {
  margin: .5rem 0 0;
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 6vw, 3.75rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1;
  color: var(--avorio-50);
}
.vetrina-header__rule { width: 10rem; margin: 1.25rem auto 0; opacity: .7; }

/* ---------- CONTAINER ---------- */
.vetrina-container {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* ---------- FILTRI STICKY ---------- */
.filter-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0 -1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(250,246,238,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--avorio-200);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.filter-bar__search { position: relative; }
.filter-bar__search-icon {
  position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
  width: 1rem; height: 1rem; color: var(--oro-dark); pointer-events: none;
}
.filter-bar__input {
  height: 3rem;
  padding-left: 2.5rem;
  padding-right: 2.5rem;
  font-size: 1rem;
}
.filter-bar__clear {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  color: var(--ink-muted); padding: .25rem; display: inline-flex;
}
.filter-bar__chips {
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.chip {
  display: inline-flex; align-items: center; gap: .375rem;
  border: 1px solid rgba(197,160,89,0.4);
  padding: .5rem .875rem;
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--bordeaux-800);
  background: transparent;
  border-radius: 0;
  transition: background-color .15s, border-color .15s, color .15s;
  flex-shrink: 0;
}
.chip:hover { background: rgba(197,160,89,0.1); }
.chip.is-active {
  border-color: var(--oro);
  background: var(--bordeaux-800);
  color: var(--oro-light);
}
.chip__count { opacity: .7; }
.chip__dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

/* ---------- GRUPPI E RIGHE VINO ---------- */
.gruppo { margin-top: 2rem; }
.gruppo__titolo {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--bordeaux-700);
  margin: 0;
}
.gruppo__lista {
  list-style: none; margin: .5rem 0 0; padding: 0;
  border-top: 1px solid var(--avorio-200);
  border-bottom: 1px solid var(--avorio-200);
}
.gruppo__lista li + li { border-top: 1px solid var(--avorio-200); }

.riga-vino {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: .875rem 0;
  text-align: left;
  transition: background-color .15s;
}
.riga-vino:hover { background: rgba(197,160,89,0.1); }

.riga-vino__thumb {
  width: 56px; height: 72px;
  border-radius: 0;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(180deg, var(--bordeaux-800), var(--bordeaux-950));
  display: flex; align-items: center; justify-content: center;
}
.riga-vino__thumb img { width: 100%; height: 100%; object-fit: cover; }
.riga-vino__thumb svg { width: 2rem; height: 2rem; color: rgba(197,160,89,.5); }

.riga-vino__body { min-width: 0; }
.riga-vino__nome-row { display: flex; align-items: center; gap: .375rem; }
.riga-vino__star { color: var(--oro-bright); flex-shrink: 0; fill: var(--oro-bright); }
.riga-vino__nome {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--bordeaux-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block;
}
.riga-vino__meta {
  font-size: .75rem;
  color: var(--ink-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.riga-vino__prezzo {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--bordeaux-800);
}
.riga-vino__prezzo.is-esaurito {
  font-size: .6875rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--bordeaux-600);
  font-family: var(--font-sans);
  font-weight: 600;
}

/* ---------- STATO VUOTO ---------- */
.vetrina-empty {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; color: var(--ink-muted);
  margin-top: 4rem;
}
.vetrina-empty svg { width: 2.5rem; height: 2.5rem; color: var(--oro); }
.vetrina-empty p {
  margin-top: .75rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
}
.vetrina-loading {
  text-align: center; margin-top: 4rem;
  font-family: var(--font-serif); font-size: 1.25rem; font-style: italic; color: var(--ink-muted);
}

/* ---------- FOOTER ---------- */
.vetrina-footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: .75rem;
  color: var(--ink-muted);
}

/* ---------- SHEET (modale scheda vino) ---------- */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(36,6,12,0.55);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease-out;
}
.sheet-overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%;
  max-width: 42rem;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--avorio-50);
  border: 1px solid rgba(197,160,89,0.4);
  border-radius: var(--radius) var(--radius) 0 0;
  animation: slideUp .25s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.sheet__hero {
  height: 18rem;
  width: 100%;
  background: var(--bordeaux-950);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.sheet__hero img { width: 100%; height: 100%; object-fit: contain; }

.sheet__body { padding: 1.5rem 1.5rem 2.5rem; }

.sheet__badge {
  display: inline-flex; align-items: center; gap: .375rem;
  font-size: .625rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .18em; color: var(--oro-dark);
  margin-bottom: .5rem;
}
.sheet__badge svg { width: .75rem; height: .75rem; fill: var(--oro-bright); color: var(--oro-bright); }

.sheet__title {
  margin: .25rem 0 0;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--bordeaux-900);
}
.sheet__subtitle {
  margin: .25rem 0 0;
  font-size: .875rem;
  color: var(--ink-muted);
}
.sheet__price-wrap { margin-top: 1rem; }
.sheet__price {
  display: inline-block;
  background: var(--bordeaux-950);
  color: var(--oro-light);
  font-family: var(--font-display);
  font-size: 1.25rem;
  padding: .5rem 1rem;
}
.sheet__price.is-esaurito { text-decoration: line-through; opacity: .5; }
.sheet__soldout {
  margin-left: .75rem;
  vertical-align: middle;
  font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .15em; color: var(--bordeaux-600);
}

.sheet__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.5rem;
  margin-top: 1rem;
}
.sheet__grid .info { grid-column: span 1; }
.sheet__grid .info--full { grid-column: span 2; }

.info { border-bottom: 1px solid var(--avorio-200); padding: .625rem 0; }
.info__label { font-size: 10px; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; color: var(--oro-dark); }
.info__value { margin-top: .125rem; font-size: .875rem; color: var(--ink); }

.sheet__note {
  margin: 1.25rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-line;
}

.sheet__abbinamenti {
  margin-top: 1.25rem;
  border-left: 2px solid var(--oro);
  padding-left: 1rem;
}
.sheet__abbinamenti .info__label { margin-bottom: .25rem; }
.sheet__abbinamenti p { margin: 0; font-size: .875rem; line-height: 1.6; white-space: pre-line; }

/* ---------- MOBILE ---------- */
@media (min-width: 640px) {
  .sheet { border-radius: var(--radius) var(--radius) 0 0; margin: 0 auto; }
  .sheet-overlay { align-items: flex-end; }
}
@media (min-width: 768px) {
  .sheet { border-radius: var(--radius); max-height: 92vh; }
  .sheet-overlay { align-items: center; }
}
/* Dimensioni fisse per icone inline */
.chip svg { width: 12px; height: 12px; flex-shrink: 0; }
.riga-vino__star { width: 14px; height: 14px; flex-shrink: 0; }
.riga-vino__thumb svg { width: 28px; height: 28px; }
.vetrina-empty svg { width: 40px; height: 40px; }
.sheet__hero svg { width: 64px; height: 64px; color: rgba(197,160,89,0.5); }
.sheet__badge svg { width: 12px; height: 12px; flex-shrink: 0; }
