/* Righe con miniatura e gli stessi comandi d'ordine del listino compatto. */
.lst-foto {
  --barra-reparti: 80px;
  max-width: 1120px;
  padding: 24px;
  font-family: "Inter", system-ui, sans-serif;
  box-shadow: var(--shadow-2);
}

.lst-foto .lst-logo {
  width: 140px;
}

.lst-foto .lst-claim {
  padding-left: 16px;
  font-size: 15px;
}

.lst-foto .lst-occhiello {
  display: none;
}

.lst-foto .lst-aggiornamento {
  margin-top: 4px;
  margin-bottom: 12px;
  font-size: 12px;
}

.lst-foto .lst-cataloghi {
  margin: 0 0 8px;
  border-radius: 8px;
}

.lst-foto .lst-cataloghi a {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 14px;
}

.lst-foglio.lst-foto > .lst-riepilogo-guscio {
  margin: 0 -24px 8px;
  padding: 8px 24px;
}

.lst-foto .lst-titolo {
  color: var(--navy);
  font-family: inherit;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.lst-foto .lst-barra {
  margin: 0 -24px -24px;
}

.lst-foto-vista {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-text);
  font-size: 12px;
}

.lst-foto-vista a,
.lst-foto-apri {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--navy);
  font-weight: 600;
  text-underline-offset: 4px;
}

.lst-foto .lst-tabella-guscio {
  overflow: visible;
  border: 0;
}

.lst-foto table {
  display: block;
  width: 100%;
}

.lst-foto thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.lst-foto tbody {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.lst-foto tr.lst-sezione,
.lst-foto tr.lst-sottosezione {
  display: block;
  margin-top: 8px;
  border: 0;
}

.lst-foto .lst-sezione td,
.lst-foto .lst-sottosezione td {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--azure);
  background: transparent;
  color: var(--navy);
}

.lst-foto .lst-sezione-titolo {
  gap: 8px;
  color: var(--navy);
  font-size: 14px;
}

.lst-foto .lst-sezione-icona {
  color: var(--navy);
}

.lst-foto .lst-sezione-spunta,
.lst-foto .lst-sezione-numero {
  display: none;
}

.lst-foto .lst-sezione-descrizione {
  margin-bottom: 0;
  color: var(--gray-text);
}

.lst-foto tr[data-cerca] {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 100px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--foglio);
}

.lst-foto tbody tr[data-cerca] td {
  display: block;
  min-width: 0;
  width: auto;
  padding: 0;
  border: 0;
  text-align: left;
  background: transparent;
  box-shadow: none;
}

/* Il passaggio del puntatore non deve cambiare display, bordi o spaziature. */
.lst-foto tbody tr[data-cerca]:hover td {
  background: transparent;
  box-shadow: none;
}

.lst-foto-immagine {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 6px;
  background: var(--azure-soft);
  color: var(--navy);
  font-size: 10px;
  text-align: center;
  overflow: hidden;
}

.lst-foto-immagine img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lst-foto-immagine svg {
  width: 28px;
  height: 28px;
}

.lst-foto .lst-prodotto-nome {
  display: block;
  color: var(--navy);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
}

.lst-foto-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin: 4px 0;
  color: var(--gray-text);
  font-size: 11px;
  line-height: 1.3;
}

.lst-foto-importo {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--navy);
  white-space: nowrap;
}

.lst-foto .lst-prezzo-valore {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.lst-foto-unita {
  color: var(--gray-text);
  font-size: 12px;
  font-weight: 400;
}

.lst-foto-sconto {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
}

.lst-foto-ordine {
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
}

.lst-foto-miniatura {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: start;
}

.lst-foto-dettagli {
  grid-column: 2 / -1;
  grid-row: 1;
}

.lst-foto-prezzo {
  grid-column: 2;
  grid-row: 2;
}

.lst-foto tbody tr[data-cerca] .lst-foto-lavorazioni {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.lst-lavorazioni-apri {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 32px;
  padding: 2px 4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.lst-lavorazioni-apri svg {
  width: 16px;
  height: 16px;
}

.lst-lavorazioni-apri:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.lst-lavorazioni-riepilogo {
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
}

.lst-foto tr[data-cerca]:has(.lst-ordine-attivo) .lst-foto-prezzo {
  grid-column: 2 / -1;
}

.lst-foto tbody tr[data-cerca]:has(.lst-ordine-attivo) .lst-foto-ordine {
  grid-column: 1 / -1;
  grid-row: 3;
  justify-self: stretch;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.lst-foto .lst-ordine {
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

.lst-ordine-unita {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.lst-unita-chip {
  min-width: 34px;
  min-height: 44px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--foglio);
  color: var(--navy);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.lst-unita-chip[aria-pressed="true"] {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--foglio);
}

.lst-foto .lst-ordine-piu {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: var(--navy);
  box-shadow: var(--shadow-1);
}

.lst-foto .lst-stepper {
  border-color: var(--border);
  border-radius: 6px;
}

.lst-foto .lst-stepper-tasto {
  width: 34px;
  min-height: 44px;
}

.lst-foto .lst-stepper-quantita {
  min-width: 44px;
  max-width: 64px;
  padding: 6px;
  border-color: var(--border);
  background: var(--foglio);
  font-size: 16px;
  white-space: normal;
}

.lst-foto .lst-stepper-note,
.lst-foto .lst-stepper-quantita::after {
  display: none;
}

.lst-foto .lst-riepilogo {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 6px;
}

.lst-foto .lst-riepilogo li {
  flex: 0 0 auto;
}

.lst-foto tr.lst-nascosta {
  display: none;
}

/* Il pannello resta condiviso; le unità vanno su più righe senza schiacciarsi. */
.lst-scheda-foto {
  max-height: 90dvh;
  overflow-y: auto;
  font-family: "Inter", system-ui, sans-serif;
  box-shadow: var(--shadow-3);
}

.lst-scheda-foto .lst-scheda-testa {
  background: var(--navy);
}

.lst-scheda-foto .lst-scheda-chiudi {
  width: 44px;
  height: 44px;
}

.lst-scheda-foto .lst-scheda-unita {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  background: transparent;
}

.lst-scheda-foto .lst-scelta-unita {
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: 14px;
  white-space: normal;
}

.lst-scheda-foto .lst-scelta-unita.lst-scelta-attiva {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--foglio);
  box-shadow: none;
}

.lst-scheda-foto .lst-scheda-titoletto {
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.lst-scheda-foto .lst-scheda-lavorazioni {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lst-scheda-foto .lst-scelta {
  min-height: 44px;
  padding: 8px 10px;
}

.lst-scheda-foto .lst-scelta-lavorazione.lst-scelta-attiva {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--foglio);
  box-shadow: none;
}

.lst-scheda-foto .lst-scheda-fatto {
  box-shadow: var(--shadow-1);
  letter-spacing: 0;
  text-transform: none;
}

@media (max-width: 760px) {
  .lst-foto {
    padding: 16px 12px;
  }

  .lst-foto .lst-logo {
    width: 110px;
  }

  .lst-foto .lst-claim {
    font-size: 12px;
  }

  .lst-foto .lst-barra {
    margin: 0 -12px -16px;
  }

  .lst-foglio.lst-foto > .lst-riepilogo-guscio {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .lst-foto tr[data-cerca] {
    grid-template-columns: 80px minmax(0, 1fr) auto;
    gap: 8px 10px;
  }

  .lst-foto-miniatura {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
  }

  .lst-foto-immagine {
    width: 80px;
    height: 80px;
  }

  .lst-foto-dettagli {
    grid-column: 2 / -1;
    grid-row: 1;
  }

  .lst-foto .lst-prodotto-nome {
    font-size: 14px;
  }

  .lst-foto-prezzo {
    grid-column: 2;
    grid-row: 2;
  }

  .lst-foto-ordine {
    grid-column: 3;
    grid-row: 2;
  }

  .lst-foto .lst-prezzo-valore {
    font-size: 22px;
  }

}

@media (min-width: 900px) {
  .lst-foto tr[data-cerca] {
    grid-template-columns: 88px minmax(0, 1fr) auto 270px;
    gap: 8px 16px;
  }

  .lst-foto .lst-foto-dettagli {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .lst-foto tr[data-cerca] .lst-foto-prezzo,
  .lst-foto tr[data-cerca]:has(.lst-ordine-attivo) .lst-foto-prezzo {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .lst-foto tbody tr[data-cerca] .lst-foto-ordine,
  .lst-foto tbody tr[data-cerca]:has(.lst-ordine-attivo) .lst-foto-ordine {
    grid-column: 4;
    grid-row: 1;
    justify-self: start;
    padding: 0;
    border: 0;
  }

}

@media print {
  .lst-foto tr[data-cerca] {
    grid-template-columns: 60px minmax(0, 1fr) auto;
    break-inside: avoid;
  }

  .lst-foto tr[data-cerca] .lst-foto-ordine,
  .lst-foto-lavorazioni,
  .lst-foto-vista,
  .lst-foto-apri {
    display: none;
  }
}
