/* Carrello affiancato su desktop, riepilogo apribile dal basso su telefono. */
.lst-carrello-foto {
  border: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  background: var(--foglio);
  box-shadow: var(--shadow-3);
  color: var(--navy);
  font-family: "Inter", system-ui, sans-serif;
}

.lst-carrello-foto .lst-carrello-elenco {
  max-height: 65dvh;
  background: var(--foglio);
  animation: none;
}

.lst-carrello-foto .lst-carrello-testa {
  align-items: center;
  padding: 16px;
}

.lst-carrello-foto .lst-carrello-titolo {
  color: var(--navy);
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
}

.lst-carrello-foto .lst-carrello-svuota {
  min-height: 44px;
  color: var(--gray-text);
}

.lst-carrello-foto .lst-carrello-righe {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.lst-carrello-articolo {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.lst-carrello-prodotto {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 0;
  background: var(--foglio);
  color: var(--navy);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lst-carrello-foto-prodotto {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
}

.lst-carrello-identita {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
}

.lst-carrello-identita strong {
  font-size: 13px;
  font-weight: 600;
}

.lst-carrello-codice {
  color: var(--gray-text);
  font-size: 11px;
}

.lst-carrello-note-foto:empty {
  display: none;
}

.lst-carrello-comandi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid var(--border);
  background: var(--azure-soft);
}

.lst-carrello-quantita {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.lst-carrello-quantita button {
  min-width: 32px;
  min-height: 44px;
  padding: 4px;
  border: 0;
  background: var(--foglio);
  color: var(--navy);
  font: inherit;
  font-size: 17px;
  cursor: pointer;
}

.lst-carrello-quantita .lst-carrello-valore {
  min-width: 62px;
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

.lst-carrello-modifica,
.lst-carrello-rimuovi {
  min-height: 44px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.lst-carrello-rimuovi {
  min-width: 32px;
  color: var(--danger);
  font-size: 23px;
}

.lst-carrello-foto .lst-carrello-barra {
  border-top: 1px solid var(--border);
}

.lst-carrello-apri-testo {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

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

.lst-carrello-anteprima {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  background: var(--azure-soft);
  color: var(--navy);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.lst-carrello-anteprima > span {
  flex: none;
}

.lst-carrello-anteprima strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.lst-carrello-aperto .lst-carrello-anteprima {
  display: none;
}

.lst-body-foto.lst-con-carrello {
  padding-bottom: 138px;
}

.lst-carrello-foto .lst-carrello-apri {
  min-height: 44px;
  color: var(--navy);
}

.lst-carrello-foto .lst-carrello-freccia {
  border-bottom-color: var(--navy);
}

.lst-carrello-foto .lst-carrello-invia {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--navy);
  letter-spacing: 0;
  text-transform: none;
}

.lst-carrello-vuoto {
  padding: 20px;
}

.lst-carrello-vuoto h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.lst-carrello-vuoto p {
  margin: 0;
  color: var(--gray-text);
  font-size: 13px;
  line-height: 1.6;
}

.lst-carrello-foto[data-vuoto="true"] .lst-carrello-barra {
  display: none;
}

@media (min-width: 1100px) {
  .lst-carrello-foto .lst-carrello-anteprima {
    display: none;
  }

  .lst-body-foto {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
    max-width: 1480px;
    margin: 0 auto;
    padding: 24px;
  }

  .lst-body-foto .lst-foglio {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin: 0;
  }

  .lst-body-foto > .lst-nota {
    grid-column: 1;
    grid-row: 2;
  }

  .lst-carrello-foto {
    position: sticky;
    top: 24px;
    right: auto;
    bottom: auto;
    left: auto;
    grid-column: 2;
    grid-row: 1;
    border-radius: 10px;
    box-shadow: var(--shadow-1);
  }

  .lst-carrello-foto .lst-carrello-elenco {
    max-height: calc(100dvh - 150px);
  }

  .lst-carrello-foto .lst-carrello-barra {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .lst-carrello-foto .lst-carrello-apri {
    min-height: 28px;
    cursor: default;
  }

  .lst-carrello-foto .lst-carrello-freccia {
    display: none;
  }
}

@media print {
  .lst-body-foto {
    display: block;
  }

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