/* Asta live — stessi colori e caratteri del sito (css/stile.css). */

.pagina-asta { background: var(--grigio); }
.asta-nav { margin-left: auto; padding-right: 6px; }
.asta-torna {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border: 2px solid var(--indaco);
  border-radius: 999px;
  color: var(--indaco);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.asta-torna:hover { background: var(--indaco); color: #fff; }

.asta-pagina { padding: calc(var(--header) + 44px) 0 72px; }
.asta-testa { text-align: center; margin-bottom: 26px; }
.asta-testa .etichetta { margin-bottom: 10px; }
.asta-testa h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.035em; }
.asta-collegamento { min-height: 1.5em; margin: 8px 0 0; color: var(--muto); font-size: 15px; font-weight: 600; }
.asta-collegamento.problema { color: #b42318; }

/* Scheda del mobile in asta */
.asta-scheda {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  overflow: hidden;
  background: var(--bianco);
  border-radius: 28px;
  box-shadow: var(--ombra);
}
.asta-scheda[hidden], .asta-vuota[hidden], .asta-elenco[hidden] { display: none; }
.asta-foto { position: relative; min-height: 320px; background: var(--grigio); }
.asta-foto img { width: 100%; height: 100%; max-height: 560px; object-fit: contain; }
.in-diretta {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #d92d20;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(217, 45, 32, .35);
}
.in-diretta i { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: pulsa 1.2s ease-in-out infinite; }
.in-diretta[hidden] { display: none; }
@keyframes pulsa { 50% { opacity: .25; transform: scale(.7); } }

.asta-aggiudicato {
  position: absolute;
  inset: auto 16px 16px 16px;
  display: grid;
  gap: 2px;
  padding: 16px 20px;
  border-radius: 18px;
  background: var(--indaco);
  color: #fff;
  text-align: center;
  box-shadow: 0 16px 40px rgba(23, 20, 61, .35);
  animation: entra .45s cubic-bezier(.2, 1.4, .4, 1);
}
.asta-aggiudicato[hidden] { display: none; }
.asta-aggiudicato strong { font-family: var(--titoli); font-size: 1.8rem; color: var(--giallo); }
.asta-aggiudicato.vinto { background: #1d6b3a; }
.asta-aggiudicato.vinto strong { color: #fff; }
@keyframes entra { from { opacity: 0; transform: translateY(16px) scale(.96); } }

.asta-info { display: flex; flex-direction: column; padding: clamp(22px, 3.5vw, 38px); }
.asta-info h2 { margin: 0 0 6px; font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.asta-descrizione { color: var(--muto); white-space: pre-line; }
.asta-descrizione:empty { display: none; }

.asta-numeri { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; margin-top: 12px; }
.asta-prezzo, .asta-timer {
  position: relative;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--grigio);
}
.asta-prezzo { background: var(--giallo); }
.asta-prezzo span, .asta-timer span {
  display: block;
  color: var(--inchiostro);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .75;
}
.asta-prezzo strong, .asta-timer strong {
  display: block;
  color: var(--inchiostro);
  font-family: var(--titoli);
  font-size: clamp(2.1rem, 6vw, 3rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.asta-prezzo.lampo { animation: lampo .6s ease; }
@keyframes lampo { 30% { transform: scale(1.04); box-shadow: 0 0 0 6px rgba(255, 196, 46, .45); } }
.asta-timer.ultimi { background: #fdecec; }
.asta-timer.ultimi strong { color: #b42318; animation: batte 1s ease-in-out infinite; }
@keyframes batte { 50% { transform: scale(1.06); } }
.asta-bonus {
  position: absolute;
  top: -10px;
  right: -6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #1d6b3a;
  color: #fff;
  font-style: normal;
  font-weight: 800;
  font-size: 14px;
  animation: entra .4s ease;
}
.asta-bonus[hidden] { display: none; }

.asta-barra { height: 8px; margin: 12px 0 4px; overflow: hidden; border-radius: 999px; background: var(--indaco-chiaro); }
.asta-barra i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--indaco); transform-origin: left; transition: width .25s linear; }
.asta-barra.ultimi i { background: #d92d20; }

.asta-vince { min-height: 1.6em; margin: 10px 0 0; color: var(--inchiostro); font-size: 1.1rem; }
.asta-vince strong { color: var(--indaco); }
.asta-vince.tu strong { color: #1d6b3a; }
.asta-riserva { display: block; width: fit-content; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: #fdecec; color: #b42318; font-size: 13px; font-weight: 800; }
.asta-riserva.ok { background: #e8f6ee; color: #1d6b3a; }

.asta-offri { display: grid; gap: 8px; margin-top: 16px; }
.asta-offri[hidden] { display: none; }
.bottone-offri {
  width: 100%;
  min-height: 64px;
  font-size: 1.3rem;
  background: var(--indaco);
  box-shadow: 0 10px 26px rgba(57, 49, 134, .3);
}
.bottone-offri:disabled, .bottone-piu:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.asta-offri-altri { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bottone-piu {
  min-height: 48px;
  border: 2px solid var(--indaco);
  border-radius: 999px;
  background: #fff;
  color: var(--indaco);
  font-weight: 800;
}
.bottone-piu:hover:not(:disabled) { background: var(--indaco-chiaro); }
.asta-esito { min-height: 1.4em; margin: 10px 0 0; font-weight: 700; color: #b42318; }
.asta-esito.bene { color: #1d6b3a; }
.asta-chi { margin: 6px 0 0; color: var(--muto); font-size: 14px; }
.asta-chi button { padding: 0; border: 0; background: none; color: var(--indaco); font-weight: 700; text-decoration: underline; }

/* Nessuna asta */
.asta-vuota {
  padding: 48px 24px;
  background: var(--bianco);
  border-radius: 28px;
  box-shadow: var(--ombra);
  text-align: center;
}
.asta-vuota .rombi { margin: 0 auto 22px; }
.asta-vuota h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.asta-vuota p { max-width: 560px; margin: 0 auto 18px; color: var(--muto); }

/* Riquadri sotto */
.asta-colonne { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.asta-box, .asta-elenco { padding: 22px 24px; background: var(--bianco); border-radius: 22px; box-shadow: var(--ombra-piccola); }
.asta-elenco { margin-top: 18px; }
.asta-box h3, .asta-elenco h3 { margin: 0 0 12px; font-size: 1.3rem; }
.asta-ultime { margin: 0; padding: 0; list-style: none; }
.asta-ultime li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--linea); }
.asta-ultime li:last-child { border-bottom: 0; }
.asta-ultime li:first-child:not(.asta-nulla) { font-weight: 800; color: var(--inchiostro); }
.asta-ultime small { color: var(--muto); font-weight: 500; }
.asta-ultime .asta-nulla { color: var(--muto); }
.asta-regole { margin: 0; padding-left: 20px; }
.asta-regole li { margin-bottom: 6px; }
.asta-piccolo { margin: 10px 0 0; color: var(--muto); font-size: 14px; }

.asta-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.asta-mini figure { margin: 0; overflow: hidden; border: 1px solid var(--linea); border-radius: 14px; background: var(--carta); }
.asta-mini img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--grigio); }
.asta-mini figcaption { padding: 8px 10px 10px; font-size: 14px; line-height: 1.3; }
.asta-mini figcaption strong { display: block; color: var(--inchiostro); }
.asta-mini figcaption span { color: var(--muto); }

/* Registrazione */
.pagina-asta .tenda[hidden], .asta-modale[hidden] { display: none; }
.asta-modale {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow-y: auto;
  pointer-events: none;
}
.asta-modale .modulo { position: relative; width: min(460px, 100%); pointer-events: auto; }
.asta-modale .chiudi { position: absolute; top: 10px; right: 10px; font-size: 28px; }
.asta-modale h3 { padding-right: 40px; }
.asta-consenso { display: flex !important; align-items: flex-start; gap: 10px; font-weight: 500 !important; line-height: 1.4; }
.modulo .asta-consenso input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; padding: 0; accent-color: var(--indaco); }

.asta-footer { padding-top: 40px; }
.asta-footer a { color: #fff; }

@media (max-width: 800px) {
  .asta-pagina { padding-top: calc(var(--header) + 26px); }
  .asta-scheda { grid-template-columns: 1fr; border-radius: 22px; }
  .asta-foto { min-height: 0; }
  .asta-foto img { aspect-ratio: 4 / 3; height: auto; max-height: 38vh; }
  .asta-colonne { grid-template-columns: 1fr; }
  .asta-testa { margin-bottom: 16px; }
  .asta-testa h1 { display: none; }
  .asta-testa .etichetta { margin-bottom: 0; }
  .asta-numeri { grid-template-columns: 1fr 1fr; }
  .asta-prezzo strong, .asta-timer strong { font-size: 2rem; }
}
