* {
    box-sizing: border-box;
}

.filtri > * {
    max-width: 100%;
}

/* ===== SFONDO GENERALE SITO ===== */

body {
    background-color: #f4f1e9;
}

html,
body {
    max-width: 100%;
    overflow-x: clip;
}


.contenitore{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 60px;
    width: 100%;
    min-width: 0;
    align-items: stretch;
}

.contenitore-principale {
    display: flex;
    align-items: flex-start;
    width: 100%;
    padding: 0 35px;
    box-sizing: border-box;
}

.gruppo-azzera-risultati {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.titolo-carrello {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #b8cbbd;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.3;
    color: #2f5f3d;
    display: flex;
    align-items: center;
    gap: 10px;
}

.testo-titolo-carrello {
    min-width: 0;
}

.badge-titolo-carrello {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    flex-shrink: 0;
    border-radius: 999px;
    background-color: #3f7a52;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.nome-quantita-carrello {
    white-space: nowrap;
}

.testo-prodotto-carrello {
    line-height: 1.5;
}

.scheda{
    border: 1px solid #deddd8;
    padding: 12px;
    margin: 0;
    border-radius: 10px;
    width: 100%;
    max-width: none;
    min-height: 460px;
    box-sizing: border-box;
    text-align: center;
    box-shadow: 0 3px 8px rgba(60, 55, 45, 0.14);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.scheda {
    background-color: #f8f6ef;

    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(90, 75, 55, 0.028) 0,
            rgba(90, 75, 55, 0.028) 1px,
            transparent 1px,
            transparent 4px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(90, 75, 55, 0.022) 0,
            rgba(90, 75, 55, 0.022) 1px,
            transparent 1px,
            transparent 5px
        );
}

.scheda:hover{
   transform: translateY(-4px);
   box-shadow: 0 7px 16px rgba(60, 55, 45, 0.18);
}

button,
.pulsante-home,
.pulsante-checkout {
    min-height: 40px;
    padding: 9px 16px;
    box-sizing: border-box;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

button:hover,
.pulsante-home:hover,
.pulsante-checkout:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

button:disabled,
.pulsante-checkout:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

button:focus-visible,
.pulsante-home:focus-visible,
.pulsante-checkout:focus-visible {
    outline: 3px solid #3f7a52;
    outline-offset: 2px;
}

.immagine-prodotto {
    width: 100%;
    max-width: 220px;
    height: 180px;
    object-fit: contain;
    display: block;
    margin: 0 auto 10px;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.3s ease;
}

.scheda:hover .immagine-prodotto {
    transform: scale(1.025);
}

.riga-carrello{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 10px;
    padding: 14px 16px;
    border: 1px solid #deddd8;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.62);
    max-width: 100%;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.riga-carrello:hover {
    background-color: rgba(255, 255, 255, 0.88);
    border-color: #c8d5cb;
}

.riga-carrello p {
    flex: 1; 
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 16px;
}

.riga-carrello button {
    flex-shrink: 0;
    margin: 0;
}

.riga-sconto-carrello {
    display: block;
    margin-top: 6px;
    color: #3f7a52;
    font-weight: bold;
}

.stato-disponibile {
    color: green;
}
.stato-ultimi {
    color: orange;
}
.stato-esaurito {
    color: crimson;
}

.stato-disponibile,
.stato-ultimi,
.stato-esaurito {
    font-weight: bold;
}

.sconto-prodotto {
    margin: 0;
    font-weight: 700;
    color: #a33a32;
}

.messaggio-sconto {
    margin: 10px 0;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid #b8cbbd;
    background-color: rgba(255, 255, 255, 0.58);
    line-height: 1.4;
    font-size: 14px;
}

.messaggio-sconto.sconto-da-applicare {
    color: #8a1c1c;
    animation: lampeggio-sconto 1.4s ease-in-out infinite;
}

@keyframes lampeggio-sconto {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.45;
    }
}

.messaggio-sconto.sconto-applicato {
    color: #3f7a52;
    animation: none;
    opacity: 1;
    font-weight: bold;
}

.ordina-prodotti {
    width: 190px;
}

.gruppo-prezzi {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
}

.gruppo-prezzo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.gruppo-prezzo .filtro-prezzo {
    width: 120px;
    flex: 0 0 120px;
}

.prezzo-originale-carrello {
    color: #888;
    text-decoration: line-through;
    margin-left: 2px;
}

.titolo-prodotto {
    font-size: 18px;
    line-height: 1.2;
    margin: 6px 0 10px;
    min-height: 2.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #2f5f3d;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.descrizione-prodotto {
    margin: 8px 0;
    line-height: 1.35;
}

.titolo-prodotto:hover {
    text-decoration: underline;
    color: #1f6f43;
}

.gruppo-pulsanti-prodotto {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: auto;
}

.pulsante-dettagli,
.acquista {
    min-height: 40px;
    padding: 9px 16px;
    box-sizing: border-box;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.2s ease,
                background-color 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.2s ease;
}

.pulsante-dettagli {
    background-color: #f5f5f3;
    border: 1px solid #b8cbbd;
    color: #285c3a;
    box-shadow: 0 1px 3px rgba(45, 75, 55, 0.10);
}

.acquista {
    background-color: #3f7a52;
    border: 1px solid #3f7a52;
    color: white;
    box-shadow: 0 2px 5px rgba(45, 75, 55, 0.16);
}

.pulsante-dettagli:hover {
    background-color: #eef5f0;
    border-color: #8eaa96;
    transform: translateY(-2px);
    box-shadow: 0 3px 7px rgba(45, 75, 55, 0.15);
}

.acquista:hover:not(:disabled) {
    background-color: #356846;
    border-color: #356846;
    transform: translateY(-2px);
    box-shadow: 0 4px 9px rgba(45, 75, 55, 0.22);
}

.acquista:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pulsante-dettagli:active,
.acquista:active:not(:disabled) {
    transform: translateY(0);
}

.pulsante-dettagli:focus-visible,
.acquista:focus-visible {
    outline: 2px solid #3f7a52;
    outline-offset: 2px;
}

.ricerca{
    width: 280px;
}

.chiudi-ricerca {
    margin-left: 8px;
    padding: 2px 7px;
    border: none;
    border-radius: 4px;
    background-color: crimson;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.chiudi-ricerca:hover {
    background-color: darkred;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px #aaa;
}

.chiudi-ricerca:active {
    transform: translateY(0);
}

.chiudi-ricerca:focus {
    outline: 2px solid #3f7a52;
    outline-offset: 2px;
}

.ricerca,
.filtro-dipartimento,
.filtro-categoria,
.ordina-prodotti,
.filtro-prezzo {
    border: 1px solid #b8cbbd;
    border-radius: 6px;
    padding: 0 10px;
    background-color: #faf9f6;
}

.ricerca,
.filtro-dipartimento,
.filtro-categoria,
.ordina-prodotti,
.filtro-prezzo,
.azzera-filtri,
.selettore-lingua {
    min-height: 40px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.ricerca:focus,
.filtro-dipartimento:focus,
.filtro-categoria:focus,
.ordina-prodotti:focus,
.filtro-prezzo:focus {
    outline: 2px solid  #3f7a52;
    outline-offset: 2px;
    border-color: #3f7a52;
    box-shadow: 0 0 4px #ddd;
}

.stato-ricerca {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 10px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    color: #285c3a;
    background-color: #eef5f0;
    border: 1px solid #b8cbbd;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.conta-risultati{
    margin: 0;
    padding: 0 10px;
    min-height: 40px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    background-color: #f3f4f6;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.conta-risultati-vuoto {
    color: #8a1c1c;
    border-color: #d8b5b5;
    background-color: #faf3f3;
}

.conta-risultati-errore {
    color: #8a1c1c;
    border-color: #c98f8f;
    background-color: #f8eaea;
}

.stato-ricerca,
.conta-risultati,
.nessun-risultato {
    width: auto;
    margin: 0;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.filtri {
    margin: 10px 35px 20px 35px;
    position: sticky;
    top: 208px;
    z-index: 20;
    background-color:#faf9f6;
    border-radius: 8px;
}

.controlli-filtri {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    column-gap: 14px;
    row-gap: 12px;
    padding: 12px 12px 8px 12px;
    width: 100%;
}

.controlli-filtri label {
    margin-right: 4px;
}

.info-filtri {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 16px;
    padding: 0 20px;
    margin-top: 4px;
}

.filtro-prezzo {
    width: 120px;
}

.filtro-dipartimento {
    width: 220px;
}

.filtro-categoria {
    width: 200px;
}

.azzera-filtri {
    padding: 10px 14px;
    cursor: pointer;
    border: 1px solid #b8cbbd;
    border-radius: 6px;
    background-color: #f5f5f3;
    color: #285c3a;
}

.azzera-filtri:hover {
    background-color: #eef5f0;
    border-color: #9fb8a5;
    transform: translateY(-1px);
}

.azzera-filtri:active {
    transform: translateY(0);
}

.azzera-filtri:focus-visible {
    outline: 2px solid #3f7a52;
    outline-offset: 2px;
    border-color: #3f7a52;
    box-shadow: 0 0 4px #ddd;
}

#filtro-scontati:focus-visible {
    outline: 2px solid #3f7a52;
    outline-offset: 3px;
}

#filtro-disponibili:focus-visible {
    outline: 2px solid #3f7a52;
    outline-offset: 3px;
}

#filtro-disponibili,
#filtro-scontati {
    accent-color: #3f7a52;
}

#filtro-disponibili,
#filtro-scontati,
.etichetta-checkbox {
    cursor: pointer;
}

.filtro-dipartimento:hover,
.filtro-categoria:hover,
.ordina-prodotti:hover{
    background-color: #eef5f0;
    border-color: #9fb8a5; 
}

.filtro-dipartimento:disabled,
.filtro-categoria:disabled,
.ordina-prodotti:disabled,
.filtro-prezzo:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.etichetta-checkbox {
    transition: opacity 0.2s ease;
}

.opzione-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.etichetta-checkbox:hover {
    text-decoration: underline;
    opacity: 0.8;
}

#filtro-disponibili:hover,
#filtro-scontati:hover {
    filter: brightness(0.95);
}

.filtro-dipartimento:hover,
.filtro-categoria:hover,
.ordina-prodotti:hover {
    border-color: #9fb8a5;
}

.dipartimento-prodotto:focus-visible,
.categoria-prodotto:focus-visible,
.titolo-prodotto:focus-visible {
    outline:2px solid #3f7a52;
    outline-offset: 2px;
}

.dipartimento-selezionato,
.categoria-selezionata,
.titolo-selezionato {
    outline: 2px solid black;
    outline-offset: 2px;
}

.pulsante-sezione {
    background-color: #f5f5f3;
    border: 1px solid #b8cbbd;
    color: #285c3a;
}

.pulsante-sezione:hover {
    background-color: #eef5f0;
    border-color: #9fb8a5;
    color: #285c3a;
    opacity: 1;
}

.pulsante-sezione:focus-visible {
    outline: 2px solid #3f7a52;
    outline-offset: 2px;
}

.dipartimento-prodotto,
.categoria-prodotto {
    display: inline-block;
    font-size: 14px;
    padding: 5px 10px;
    border: 1px solid;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin: 4px;
    max-width: 100%;
}

.dipartimento-prodotto {
    background-color: #eef5f0;
    border-color: #b8cbbd;
    color: #285c3a;
}

.categoria-prodotto {
    background-color: #f5f5f3;
    border-color: #d6d6d1;
    color: #4a4a46;
}

.dipartimento-prodotto:hover,
.categoria-prodotto:hover {
    transform: scale(1.05);
}

.gruppo-classificazione-prodotto .dipartimento-prodotto,
.gruppo-classificazione-prodotto .categoria-prodotto {
    margin-top: 0;
    margin-bottom: 0;
}

.gruppo-classificazione-prodotto {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.gruppo-classificazione-prodotto .dipartimento-prodotto,
.gruppo-classificazione-prodotto .categoria-prodotto {
    margin-top: 0;
    margin-bottom: 0;
}

.disponibilita-prodotto {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
    font-size: 14px;
    color: #555;
}

.disponibilita-prodotto p {
    margin: 4px 0;
}

.disponibilita-prodotto p + p::before {
    content: "·";
    margin-right: 8px;
}

.azioni-carrello {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    position: sticky;
    top: 217px;
    z-index: 30;
    background-color: #faf8f2;
    padding: 10px 0;
}

.azioni-prodotto-carrello {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.azioni-carrello button {
    flex: 1 1 160px;
    max-width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s ease, box-shadow 0.2s ease, 
    background-color 0.2s ease;
}

.azioni-carrello button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px #aaa;
}

.azioni-carrello button:active:not(:disabled) {
    transform: translateY(0);
}

.azioni-carrello button:focus-visible {
    outline: 2px solid #3f7a52;
    outline-offset: 3px;
}

.azioni-carrello button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.gruppo-checkbox {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
}

.svuota {
    background-color: #a33a32;
    border: 1px solid #a33a32;
    color: white;
}

.svuota:hover:not(:disabled) {
    background-color: #873029;
    border-color: #873029;
    transform: translateY(-2px);
    box-shadow: 0 4px 9px rgba(100, 45, 40, 0.20);
}

.completa {
    background-color: #3f7a52;
    border: 1px solid #3f7a52;
    color: white;
}

.completa:hover:not(:disabled) {
    background-color: #356846;
    border-color: #356846;
    transform: translateY(-2px);
    box-shadow: 0 4px 9px rgba(45, 75, 55, 0.22);
}

.completa:active:not(:disabled),
.svuota:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.form-checkout {
    margin-top: 15px;
    padding: 15px;
    max-width: 100%;
    border: 1px solid #b8cbbd;
    border-radius: 10px;
    background-color: #faf8f2;
}

.form-checkout input:placeholder {
    color: #777;
    opacity: 1;
}

.annulla-checkout,
.checkout-modifica,
.checkout-conferma {
    margin-top: 10px;
}

.annulla-checkout {
    margin-top: 18px;
}

.checkout input:-webkit-autofill,
.checkout input:-webkit-autofill:hover,
.checkout input:-webkit-autofill:focus,
.checkout input:-webkit-autofill:active {
    -webkit-text-fill-color: #222;
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    box-shadow: 0 0 0 1000px #fff inset;
}

.carrello {
    width: calc(100% - 48px);
    max-width: none;
    min-height: 0;
    max-height: none;
    overflow-y: visible;
    position: static;
    margin: 24px 24px 0 24px;
    padding: 24px;
    box-sizing: border-box;
    border: 1px solid #b8cbbd;
    border-radius: 12px;
    background-color: #faf8f2;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(90, 75, 55, 0.020) 0,
            rgba(90, 75, 55, 0.020) 1px,
            transparent 1px,
            transparent 4px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(90, 75, 55, 0.016) 0,
            rgba(90, 75, 55, 0.016) 1px,
            transparent 1px,
            transparent 5px
        );

    box-shadow: 0 3px 10px rgba(60, 55, 45, 0.12);
}

.carrello-vuoto {
    color: #666;
    padding: 15px;
    border: 1px dashed #b8cbbd;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.45);
    text-align: center;
    font-style: italic;
}

.totale-carrello {
    margin-top: 16px;
    padding: 14px 20px;
    border-top: 2px solid #b8cbbd;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.58);
    font-size: 18px;
    line-height: 1.4;
    min-width: 0;
}

.totale-carrello p {
    margin: 0;
    line-height: 1.5;
    white-space: pre-line;
}

.totale-carrello p + p {
    margin-top: 10px;
}

.totale-carrello .totale-finale {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #b8cbbd;
    font-size: 21px;
    color: #2f5f3d;
    font-weight: 700;
}

.totale-carrello .totale-finale:only-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.sconto-generale-carrello {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 30px 12px 14px;
    border: 1px solid #cfe0d3;
    border-radius: 8px;
    background-color:  rgba(255, 255, 255, 0.58);
    color: #355f42;
}

.testo-sconto-generale {
    font-weight: normal;
}

.importo-sconto-generale {
    display: inline-block;
    padding: 0;
    border: none;
    background: none;
    font-weight: 700;
}

.titolo-riepilogo {
    margin-top: 0;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #b8cbbd;
    font-size: 18px;
    font-weight: 600;
}

.riepilogo-ordine {
    margin-top: 15px;
    padding: 18px;
    max-width: 100%;
    border: 1px solid #b8cbbd;
    border-radius: 10px;
    background-color:#faf8f2;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.riepilogo-ordine p {
    margin: 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #e1e4e8;
}

.riepilogo-ordine p + p {
    margin-top: 8px;
}

.riepilogo-ordine strong {
    font-weight: 600;
}

.riepilogo-ordine .totale-riepilogo {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 2px solid #b8cbbd;
    font-size: 18px;
    font-weight: 700;
}

.aumenta,
.diminuisci,
.elimina {
    height: 40px;
    padding: 8px 12px;

    color: white;
    border: 1px solid transparent;
    border-radius: 8px;

    font-family: inherit;
    font-weight: 600;
    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}

/* Quantità */
.aumenta,
.diminuisci {
    width: 44px;
    font-size: 20px;
}

/* + */
.aumenta {
    background-color: #3f7a52;
    border-color: #3f7a52;
}

.aumenta:hover:not(:disabled) {
    background-color: #356846;
    border-color: #356846;
}

/* − */
.diminuisci {
    background-color: #b27a32;
    border-color: #b27a32;
}

.diminuisci:hover:not(:disabled) {
    background-color: #956528;
    border-color: #956528;
}

/* Elimina */
.elimina {
    background-color: #a33a32;
    border-color: #a33a32;

    font-size: 14px;
    padding-left: 14px;
    padding-right: 14px;
}

.elimina:hover:not(:disabled) {
    background-color: #873029;
    border-color: #873029;
}

/* Hover comune */
.aumenta:hover:not(:disabled),
.diminuisci:hover:not(:disabled),
.elimina:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 3px 7px rgba(60, 55, 45, 0.18);
}

/* Click */
.aumenta:active:not(:disabled),
.diminuisci:active:not(:disabled),
.elimina:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

/* Focus tastiera */
.aumenta:focus-visible,
.diminuisci:focus-visible,
.elimina:focus-visible {
    outline: 2px solid #3f7a52;
    outline-offset: 3px;
}

/* − disabilitato */
.diminuisci:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.barra-lingua {
   display: flex;
   align-items: center;
   gap: 10px;
   flex-wrap: wrap;
   padding: 12px 48px;
   
}

.selettore-lingua {
    min-height: 40px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.selettore-lingua {
    padding: 0 10px;
    border: 1px solid #bbb;
    border-radius: 6px;
    background-color: white;
    min-width: 150px;
}

.selettore-lingua:focus {
    outline: 2px solid #6b8fd6;
    outline-offset: 2px;
    border-color: #6b8fd6;
    box-shadow: 0 0 4px #ddd;
}

.selettore-lingua:hover {
    border-color: #6b8fd6;
    background-color: #f4f7fc;
    box-shadow: 0 0 4px #d8e1f2;
    cursor: pointer;
}

.header-principale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    padding: 4px 48px 16px;
    background-color: #ffffff;
    border-bottom: 1px solid #dddddd;
    flex-wrap: wrap;
}

.navigazione-principale {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.link-navigazione {
    position: relative;
    color: #222;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.link-navigazione:hover {
    color: #285c3a;
    background-color: #eef5f0;
    transform: translateY(-1px);
}

.link-navigazione:focus-visible {
    outline: 2px solid #3f7a52;
    outline-offset: 2px;
}

.link-navigazione::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 2px;

    height: 2px;
    background-color: #3f7a52;

    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.link-navigazione:hover::after,
.link-navigazione.attivo::after {
    transform: scaleX(1);
}

.nome-negozio {
    display: none;
}

.sezione-home {
    padding: 256px 24px 20px;
    text-align: center;
}

.sezione-home {
    position: relative;
}

.gruppo-taralli {
    position: absolute;
    left: 24%;
    top: 40%;

    width: 260px;
    height: 190px;

    pointer-events: none;
    z-index: 0;

    transform: scale(1);
    opacity: 1;

    transition:
    transform 2.3s ease-in-out,
    opacity 1.6s ease;
}

@keyframes percorso-taralli-storia {
    from {
        offset-distance: 0%;
    }

    to {
        offset-distance: 100%;
    }
}

@keyframes discesa-taralli-mobile {
    from {
        transform: translate(0, 0) scale(0.52);
    }

    to {
        transform: translate(45px, 430px) scale(0.52);
    }
}

.gruppo-taralli.taralli-storia {
    offset-path: path("M 0 0 C -30 200, 20 540, -70 765");
    offset-rotate: 0deg;

    animation: percorso-taralli-storia 2.8s
               cubic-bezier(0.45, 0, 0.55, 1) forwards;

    transform: scale(0.62);
    transform-origin: left center;

    opacity: 0.78;
}

.tarallo-home {
    position: absolute;
    height: auto;
    opacity: 1;

    filter: drop-shadow(0 7px 7px rgba(70, 55, 35, 0.12));

    animation-name: entrata-tarallo;
    animation-duration: 0.9s;
    animation-timing-function: ease-out;
    animation-fill-mode: backwards;

    transition:
        transform 0.35s ease,
        left 0.35s ease,
        top 0.35s ease;
}

/* grande, dietro */
.tarallo-1 {
    width: 175px;
    left: 0;
    top: 5px;
    transform: rotate(-14deg);
    --rotazione: -14deg;
    animation-delay: 0.05s;
}

/* medio */
.tarallo-2 {
    width: 145px;
    left: 75px;
    top: 35px;
    transform: rotate(13deg);
    --rotazione: 13deg;
    animation-delay: 0.22s;
}

/* piccolo davanti */
.tarallo-3 {
    width: 115px;
    left: 135px;
    top: 65px;
    transform: rotate(-8deg);
    --rotazione: -8deg;
    animation-delay: 0.39s;
}

.gruppo-taralli.taralli-hover-storia:not(.taralli-storia) .tarallo-1 {
    left: -20px;
    top: 0;
    transform: rotate(-28deg);
}

.gruppo-taralli.taralli-hover-storia:not(.taralli-storia) .tarallo-2 {
    left: 80px;
    top: 20px;
    transform: rotate(8deg);
}

.gruppo-taralli.taralli-hover-storia:not(.taralli-storia) .tarallo-3 {
    left: 165px;
    top: 45px;
    transform: rotate(24deg);
}

@keyframes entrata-tarallo {
    0% {
        opacity: 0;
        transform:
            translateX(-70px)
            rotate(-30deg);
    }

    100% {
        opacity: 1;
        transform:
            translateX(0)
            rotate(var(--rotazione));
    }
}

.pulsante-home {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 20px;
    background-color: #3f7a52;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #3f7a52;
    border-radius: 6px;
}

.pulsante-home:hover {
    background-color: #356846;
    border-color: #356846;
    opacity: 1;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--altezza-header, 208px);
    overflow-anchor: none;
}

.area-catalogo {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: calc(100vh - 210px);
    padding-bottom: 80px;
    box-sizing: border-box;
}

.paginazione-catalogo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;

    width: 100%;
    margin: 15px 0;
}

.indicatore-pagina {
    font-weight: bold;
    min-width: 45px;
    text-align: center;
}

.pagina-precedente,
.pagina-successiva {
    min-width: 44px;
    padding: 8px 12px;
    cursor: pointer;
}

.pagina-precedente:disabled,
.pagina-successiva:disabled {
    opacity: 0.4;
    cursor: default;
}

.titolo-catalogo {
    width: 100%;
    text-align: left;
    margin: 0 0 24px 0;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    scroll-margin-top: 300px;
}

.etichetta-valuta {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.selettore-valuta {
    margin-left: 6px;
}

.gruppo-valuta {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}


/* ===== FOOTER ===== */

.footer-principale {
    width: calc(100% - 48px);
    margin: 40px 24px 0 24px;
    padding: 24px;
    box-sizing: border-box;
    text-align: center;
    background-color: #3f4f46;
    color: #f5f5f3;
    border-top: 2px solid #b8cbbd;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -3px 10px rgba(60, 55, 45, 0.10);
}

/* ===== COLORI LINK E PULSANTI FOOTER ===== */

.footer-principale a,
.footer-principale .link-info-footer {
    color: #f5f5f3;
}

.footer-principale a {
    text-decoration: none;
}

.footer-principale a:hover,
.footer-principale .link-info-footer:hover {
    color: #d8e5db;
}

.footer-principale .link-info-footer {
    background-color: transparent;
    border: 0;
}

.footer-principale .whatsapp-footer a {
    border-color: #b8cbbd;
}

.footer-principale a:focus-visible,
.footer-principale .link-info-footer:focus-visible {
    outline: 2px solid #b8cbbd;
    outline-offset: 3px;
}

.testo-footer {
    margin: 0;
}

.contatti-footer {
    margin-top: 0;
}

.titolo-contatti-footer {
    margin: 0 0 12px 0;
}

.email-footer,
.telefono-footer,
.whatsapp-footer {
    margin: 8px 0;
}

.contatti-footer a {
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.contatti-footer a:hover {
    text-decoration: underline;
    opacity: 0.8;
}
.titolo-assistenza-footer {
    margin: 18px 0 8px 0;
    font-size: 16px;
}

.whatsapp-footer a {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #b8cbbd;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.whatsapp-footer a:hover {
    transform: translateY(-1px);
    background-color: rgba(255, 255, 255, 0.08);
    border-color: #d8e5db;
}

.whatsapp-footer a:hover {
    transform: translateY(-1px);
}

.link-legali-footer {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.link-legali-footer a {
    color: inherit;
    text-decoration: none;
}

.link-legali-footer a:hover {
    text-decoration: underline;
}

.contatti-footer {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 24px;
    box-sizing: border-box;
}

.contatti-footer p {
    line-height: 1.5;
    margin: 10px 0;
}

.contatti-footer h3 {
    margin-top: 0;
    margin-bottom: 16px;
}

.indirizzo-footer {
    margin: 20px 0 8px;
}

.indirizzo-contatti-footer a {
    color: inherit;
    text-decoration: none;
}

.indirizzo-contatti-footer a:hover {
    text-decoration: underline;
}

.ragione-sociale-footer,
.identificazione-footer {
    margin: 8px 0;
}

.social-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.social-footer p {
    margin: 0;
}

.social-footer a {
    color: inherit;
    text-decoration: none;
}

.social-footer a:hover {
    text-decoration: underline;
}

.informazioni-footer {
    margin-top: 28px;
}

.informazioni-footer h3 {
    margin-bottom: 12px;
}

.link-info-footer {
    border: 0;
    background: transparent;
    padding: 6px 10px;
    font: inherit;
    cursor: pointer;
}

.link-info-footer:hover {
    text-decoration: underline;
}

.pannello-info-footer {
    max-width: 700px;
    margin: 24px auto;
    padding: 24px;
    box-sizing: border-box;
    text-align: left;
    color: #333;
    background-color: #faf8f2;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(90, 75, 55, 0.020) 0,
            rgba(90, 75, 55, 0.020) 1px,
            transparent 1px,
            transparent 4px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(90, 75, 55, 0.016) 0,
            rgba(90, 75, 55, 0.016) 1px,
            transparent 1px,
            transparent 5px
        );

    border: 1px solid #deddd8;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(60, 55, 45, 0.12);
}

.pannello-info-footer h3 {
    margin-top: 0;
    text-align: center;
}

.testo-pannello-info {
    line-height: 1.7;
}

.testo-pannello-info li {
    margin-bottom: 8px;
}

.sezione-legale {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    box-sizing: border-box;
    color: #333;
    background-color: #faf8f2;
    border: 1px solid #deddd8;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(60, 55, 45, 0.12);
}

.sezione-legale > h2 {
    text-align: center;
    margin-top: 0;
}

.contenuto-legale {
    line-height: 1.6;
}

.contenuto-legale h3 {
    margin-top: 24px;
    margin-bottom: 8px;
}

.contenuto-legale p {
    margin-top: 0;
}

.chiudi-info-footer,
.chiudi-sezione-legale {
    display: block;
    margin: 20px auto 0;
    min-height: 40px;
    padding: 9px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #285c3a;
    background-color: #f5f5f3;
    border: 1px solid #b8cbbd;
    border-radius: 8px;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.chiudi-info-footer:hover,
.chiudi-sezione-legale:hover {
    background-color: #eef5f0;
    border-color: #8eaa96;
    transform: translateY(-2px);
    box-shadow: 0 3px 7px rgba(45, 75, 55, 0.15);
}

.chiudi-info-footer:active,
.chiudi-sezione-legale:active {
    transform: translateY(0);
    box-shadow: none;
}

.chiudi-info-footer:focus-visible,
.chiudi-sezione-legale:focus-visible {
    outline: 2px solid #3f7a52;
    outline-offset: 3px;
}

.chiudi-sezione-legale {
    margin-top: 30px;
}

.intestazione-fissa {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #faf9f6;
    border-bottom: 1px solid #d8d2c5;
    box-shadow: 0 2px 8px rgba(60, 55, 45, 0.08);
}

.badge-carrello {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 50%;
    background-color: #d9534f;
    color: white;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    box-sizing: border-box;
}

badge-carrello-alert {
    animation: avvisoCarrello 0.5s ease;
}

.checkout select.campo-checkout {
    cursor: pointer;
}

.checkout input:user-invalid,
.checkout select:user-invalid {
    border-color: #a33a32;
    box-shadow: 0 0 0 2px rgba(163, 58, 50, 0.12);
}

.checkout input:user-invalid:focus,
.checkout select:user-invalid:focus {
    border-color: #a33a32;
    box-shadow: 0 0 0 3px rgba(163, 58, 50, 0.16);
}

.info-ritiro-checkout {
    width: 100%;
    padding: 16px 18px;
    margin: 2px 0;
    background: #faf8f2;
    border: 1px solid #b8cbbd;
    border-left: 4px solid #3f7a52;
    border-radius: 8px;
    box-sizing: border-box;
}

.info-ritiro-checkout p {
    margin: 0 0 10px 0;
    line-height: 1.5;
    font-size: 15px;
}

/* Link Waze */
.info-ritiro-checkout a {
    display: inline-block;
    font-size: 15px;
    font-weight: 600;
    color: #3f7a52;
    text-decoration: none;
}

.info-ritiro-checkout a:hover {
    text-decoration: underline;
}

.info-ritiro-checkout a:focus-visible {
    outline: 2px solid #3f7a52;
    outline-offset: 3px;
    border-radius: 3px;
}

.campo-data-checkout,
.campo-ora-checkout {
    min-height: 48px;
    padding: 10px 14px;
    font-size: 16px;
    font-family: inherit;
    background-color: #ffffff;
    border: 1px solid #b8cbbd;
    border-radius: 8px;
    box-sizing: border-box;
}

.checkout input.campo-data-checkout {
    width: 190px;
    max-width: 100%;
    min-height: 48px;
    height: 48px;
    flex: none;
}

.campo-data-checkout::-webkit-calendar-picker-indicator,
.campo-ora-checkout::-webkit-calendar-picker-indicator {
    cursor: pointer;
    width: 20px;
    height: 20px;
    opacity: 1;
    filter: sepia(20%) saturate(700%) hue-rotate(85deg) brightness(75%);
}

.campo-data-checkout:focus,
.campo-ora-checkout:focus {
    outline: none;
    border-color: #3f7a52;
    box-shadow: 0 0 0 3px rgba(63, 122, 82, 0.14);
}

.dati-fattura-checkout {
    width: 100%;
    padding: 18px;
    margin-top: 6px;
    background: #faf8f2;
    border: 1px solid #b8cbbd;
    border-left: 4px solid #3f7a52;
    border-radius: 10px;
    box-sizing: border-box;
}

.dati-fattura-checkout input,
.dati-fattura-checkout select {
    width: 100%;
    box-sizing: border-box;
}

.dati-diversi-fattura {
    width: 100%;
    box-sizing: border-box;
}

.checkout input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 0;
    padding: 0;
    margin: 0 8px 0 0;
    vertical-align: middle;
    cursor: pointer;
    accent-color: #3f7a52;
}

.checkout label {
    cursor: pointer;
    line-height: 1.4;
}

.checkout input[type="checkbox"]:focus-visible {
    outline: 2px solid #3f7a52;
    outline-offset: 3px;
}

#riepilogo-ordine {
    width: 100%;
    margin-top: 22px;
    padding: 22px;
    background: #faf8f2;
    border: 1px solid #b8cbbd;
    border-radius: 12px;
    box-sizing: border-box;
}

#riepilogo-ordine h3 {
    margin: 0 0 18px 0;
    padding-bottom: 10px;
    font-size: 21px;
    font-weight: 700;
    color: #3f7a52;
    border-bottom: 1px solid #b8cbbd;
}

#riepilogo-ordine p {
    margin: 8px 0;
    line-height: 1.5;
}

#riepilogo-ordine .totale-riepilogo {
    margin-top: 18px;
    padding-top: 14px;
    font-size: 20px;
    font-weight: 700;
    color: #2f5f3d;
    border-top: 2px solid #b8cbbd;
}

.info-orari-checkout {
    margin: 0;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.5;
    background: #faf8f2;
    border-left: 3px solid #3f7a52;
    border-radius: 6px;
}

.pulsante-checkout {
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    margin-top: 10px;
    box-sizing: border-box;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

/* CONFERMA */

.checkout-conferma {
    background-color: #3f7a52;
    color: #ffffff;
    border: 1px solid #3f7a52;
}

.checkout-conferma:hover:not(:disabled) {
    background-color: #356846;
    border-color: #356846;
}


.checkout-modifica {
    background-color: #f5f5f3;
    color: #285c3a;
    border: 1px solid #b8cbbd;
}

.checkout-modifica:hover:not(:disabled) {
    background-color: #eef5f0;
    border-color: #9fb8a5;
}

.annulla-checkout {
    margin-top: 18px;
    background-color: #ffffff;
    background-image: none;
    color: #666666;
    border: 1px solid #b8cbbd;
}

.annulla-checkout:hover:not(:disabled) {
    background-color: #f5f5f3;
    background-image: none;
    color: #333333;
    border-color: #9fb8a5;
}

.checkout-whatsapp {
    margin-top: 14px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 10px;
    box-shadow: 0 3px 7px rgba(45, 75, 55, 0.16);
}

.pulsante-checkout:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 9px rgba(60, 55, 45, 0.18);
}

.pulsante-checkout:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.pulsante-checkout:focus-visible {
    outline: 2px solid #3f7a52;
    outline-offset: 3px;
}

.pulsante-checkout:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.checkout {
    width: calc(100% - 48px);
    max-width: 760px;
    margin: 30px auto;
    padding: 28px;
    box-sizing: border-box;
    background-color: #faf8f2;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(90, 75, 55, 0.020) 0,
            rgba(90, 75, 55, 0.020) 1px,
            transparent 1px,
            transparent 4px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(90, 75, 55, 0.016) 0,
            rgba(90, 75, 55, 0.016) 1px,
            transparent 1px,
            transparent 5px
        );

    border: 1px solid #b8cbbd;
    border-radius: 16px;
    box-shadow: 0 3px 10px rgba(60, 55, 45, 0.12);
}

.checkout form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.checkout input,
.checkout select {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid #b8cbbd;
    border-radius: 8px;
    background: #ffffff;
    box-sizing: border-box;
}

.checkout input:focus,
.checkout select:focus {
    outline: none;
    border-color: #3f7a52;
    box-shadow: 0 0 0 3px rgba(63, 122, 82, 0.14);
}

@keyframes avvisoCarrello {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.45);
    }

    100% {
        transform: scale(1);
    }
}

.logo-negozio {
    width: auto;
    height: 120px;
    max-width: 240px;
    object-fit: contain;
    display: block;
}

.sezione-storia {
    max-width: 850px;
    margin: 70px auto 0;
    padding: 32px 24px;
    box-sizing: border-box;
    text-align: center;
    border-top: 2px solid #3f7a52;
    border-bottom: 2px solid #3f7a52;
}

.titolo-storia {
    margin: 0 0 18px;
    font-size: 26px;
}

.testo-storia {
    margin: 0 auto 24px;
    line-height: 1.7;
}

.pulsante-storia {
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid #3f7a52;
    border-radius: 8px;
    background-color:#f5f5f3;
    color:  #285c3a;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
     transition: transform 0.2s ease,
                background-color 0.2s ease,
                border-color 0.2s ease;
}

.pulsante-storia:hover {
    background-color: #eef5f0;
    border-color: #9fb8a5;
    transform: translateY(-1px);
}

.pulsante-storia:focus-visible {
    outline: 2px solid #3f7a52;
    outline-offset: 2px;
}

.storia-completa {
    margin-top: 20px;
    padding-top: 22px;
    padding-bottom: 50px;
    border-top: 1px solid #dddddd;
    text-align: left;
    line-height: 1.75;
    white-space: pre-line;
}

/* ===== SOCIAL FOOTER ===== */

.contatti-footer .link-social-footer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 6px 12px;

    color: #f5f5f3;
    text-decoration: none;
    font-weight: 500;

    transition: transform 0.2s ease,
                opacity 0.2s ease;
}

.contatti-footer .icona-social-footer {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    fill: currentColor;
}

.contatti-footer .link-social-footer:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.contatti-footer .link-social-footer:hover span {
    text-decoration: underline;
}

.contatti-footer .link-social-footer:focus-visible {
    outline: 2px solid #b8cbbd;
    outline-offset: 3px;
    border-radius: 4px;
}

.social-facebook .icona-social-footer {
    color: #1877f2;
}

.social-instagram .icona-social-footer {
    color: #e4405f;
}

.social-tiktok .icona-social-footer {
    color: #25f4ee;
}

.dati-fattura-checkout input:not([type="checkbox"]),
.dati-fattura-checkout select {
    width: 100%;
    margin-top: 12px;
}

.dati-diversi-fattura {
    width: 100%;
    margin-top: 2px;
    box-sizing: border-box;
}

.checkout label {
    display: inline-flex;
    align-items: center;
    line-height: 1.4;
    cursor: pointer;
}

.dati-fattura-checkout label {
    margin: 5px 0;
}

.sviluppo-footer {
    margin: 24px 0 0;
    padding-top: 14px;
    border-top: 1px solid #dddddd;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.8px;
    color: #777777;
    text-align: center;
}

.pulsanti-extra-home {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.pulsanti-extra-home .pulsante-home {
    margin: 0;
}

/* =========================
   LINK CONSIGLIATI
   ========================= */

.sezione-link {
    width: 100%;
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    box-sizing: border-box;
}

.titolo-link {
    text-align: center;
    margin-bottom: 24px;
}

.contenitore-link {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}

.scheda-link {
    display: flex;
    flex-direction: column;
    padding: 22px;
    border-radius: 12px;
    background: #faf8f2;
    box-sizing: border-box;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(90, 75, 55, 0.020) 0,
            rgba(90, 75, 55, 0.020) 1px,
            transparent 1px,
            transparent 4px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(90, 75, 55, 0.016) 0,
            rgba(90, 75, 55, 0.016) 1px,
            transparent 1px,
            transparent 5px
        );

    border: 1px solid #deddd8;
    border-radius: 12px;
    box-sizing: border-box;
}

.nome-link {
    margin: 0 0 12px 0;
    font-size: 1.15rem;
}

.descrizione-link {
    margin: 0 0 20px 0;
    line-height: 1.6;
    flex-grow: 1;
}

.apri-link,
.apri-link:visited {
    display: inline-block;
    align-self: flex-start;
    padding: 10px 16px;
    background-color: #1f6f43;
    color: white;
    border: 1px solid #1f6f43;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.apri-link:hover {
    background-color: #185735;
    color: white;
    border-color: #185735;
    opacity: 1;
}

.contenitore-dettaglio-prodotto {
    display: grid;
    grid-template-columns: minmax(280px, 42%) 1fr;
    gap: 40px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
    box-sizing: border-box;
    align-items: start;
    background-color: #faf8f2;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(90, 75, 55, 0.020) 0,
            rgba(90, 75, 55, 0.020) 1px,
            transparent 1px,
            transparent 4px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(90, 75, 55, 0.016) 0,
            rgba(90, 75, 55, 0.016) 1px,
            transparent 1px,
            transparent 5px
        );

    border: 1px solid #deddd8;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(60, 55, 45, 0.12);
}

.sezione-dettaglio-prodotto {
    width: 100%;
    box-sizing: border-box;
    padding: 20px 35px 25px;
}

.sezione-notizie {
    width: 100%;
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    box-sizing: border-box;
}

.titolo-notizie {
    text-align: center;
    margin-bottom: 24px;
}

.contenitore-notizie {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}

.scheda-notizia {
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: #faf8f2;
    background-image:
    repeating-linear-gradient(
        0deg,
        rgba(90, 75, 55, 0.020) 0,
        rgba(90, 75, 55, 0.020) 1px,
        transparent 1px,
        transparent 4px
    ),
    repeating-linear-gradient(
        90deg,
        rgba(90, 75, 55, 0.016) 0,
        rgba(90, 75, 55, 0.016) 1px,
        transparent 1px,
        transparent 5px
    );
    border: 1px solid #deddd8;
    border-radius: 12px;
    box-sizing: border-box;
}

.titolo-notizia {
    margin: 0 0 8px 0;
    font-size: 1.15rem;
}

.data-notizia {
    margin: 0 0 14px 0;
    font-size: 0.9rem;
    color: #666666;
}

.testo-notizia {
    margin: 0 0 20px 0;
    line-height: 1.6;
    flex-grow: 1;
}

.link-notizia,
.link-notizia:visited {
    display: inline-block;
    align-self: flex-start;

    padding: 10px 16px;

    background-color: #1f6f43;
    color: white;

    border: 1px solid #1f6f43;
    border-radius: 8px;

    text-decoration: none;
    font-weight: 600;
}

.link-notizia:hover {
    background-color: #185735;
    color: white;
    border-color: #185735;
}
.mostra-altri,
.torna-prodotti,
.torna-inizio-catalogo {
    background-color: #f5f5f3;
    border: 1px solid #b8cbbd;
    color: #285c3a;

    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.mostra-altri:hover,
.torna-prodotti:hover,
.torna-inizio-catalogo:hover {
    background-color: #eef5f0;
    border-color: #9fb8a5;
    transform: translateY(-2px);
    opacity: 1;
}

.mostra-altri:active,
.torna-prodotti:active,
.torna-inizio-catalogo:active {
    transform: translateY(0);
}

.mostra-altri:focus-visible,
.torna-prodotti:focus-visible,
.torna-inizio-catalogo:focus-visible {
    outline: 2px solid #3f7a52;
    outline-offset: 2px;
}

.torna-prodotti {
    margin-bottom: 20px;
}

.colonna-immagine-dettaglio {
    width: 100%;
}

.immagine-dettaglio-prodotto {
    display: block;
    width: 100%;
    max-width: 500px;
    height: 420px;
    object-fit: contain;
    margin: 0 auto;
    border-radius: 10px;
}

.colonna-informazioni-dettaglio {
    min-width: 0;
}

.titolo-dettaglio-prodotto {
    margin: 0 0 12px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    color: #2f5f3d;
}

.descrizione-dettaglio-prodotto {
    margin: 0 0 18px;
    line-height: 1.65;
    color: #444;
}

.prezzo-dettaglio-prodotto {
    font-size: 22px;
    font-weight: 700;
    margin: 15px 0;
    color: #2f5f3d;
}

.stato-dettaglio-prodotto {
    font-weight: bold;
}

.scorta-dettaglio-prodotto,
.riga-dettaglio-prodotto {
    margin: 10px 0;
}

.acquista-dettaglio {
    margin-top: 20px;
}

.scorta-prodotto {
    margin: 6px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.stato-disponibile,
.stato-ultimi,
.stato-esaurito {
    margin: 4px 0;
    font-size: 14px;
    font-weight: 600;
}

.stato-disponibile {
    color: #3f7a52;
}

.stato-ultimi {
    color: #a56a24;
}

.stato-esaurito {
    color: #a33a32;
}


.galleria-immagini-prodotto {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;

    margin-top: 15px;
}

.miniatura-prodotto {
    width: 70px;
    height: 70px;
    object-fit: contain;
    padding: 4px;
    border: 1px solid #b8cbbd;
    border-radius: 6px;
    cursor: pointer;
    background-color: white;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.miniatura-prodotto:hover {
    transform: scale(1.05);
}

.miniatura-prodotto.miniatura-selezionata {
    border: 2px solid #285c3a;
}

@media (min-width: 901px) and (max-width: 1100px) {

    .gruppo-taralli {
        left: 8%;
        top: 45%;
        transform: scale(0.65);
        transform-origin: left center;
    }

    .gruppo-taralli.taralli-storia {
    offset-path: path("M 0 0 C -20 160, 10 400, -40 694");
    offset-rotate: 0deg;

    animation: percorso-taralli-storia 2.8s
               cubic-bezier(0.45, 0, 0.55, 1) forwards;

    transform: scale(0.63);
    transform-origin: left center;

    opacity: 0.78;
}

}

@media (max-width: 900px) {

    .controlli-filtri {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .ricerca, 
    .filtro-dipartimento,
    .filtro-categoria,
    .ordina-prodotti {
       width: 100%;
    }

    .filtro-prezzo {
       width: 120px;
    }

    .gruppo-checkbox {
        width: 100%;
        flex-wrap: wrap;
    }

    .gruppo-prezzi {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .scheda {
        max-width: 100%;
    }

    .carrello{
       position: static;
       width: calc(100% - 48px);
       max-width: none;
       min-height: 0;
       max-height: none;
       margin: 40px 24px 0 24px;
       overflow-y: visible;
       box-sizing: border-box;
    }

    .contenitore-principale {
        flex-direction: column;
        padding: 0 20px;
    }

    .contenitore {
        width: 100%;
        gap: 10px;
    }

    .dipartimento-prodotto,
    .categoria-prodotto {
        margin-right: 6px;
        margin-bottom: 6px;
    }

    .riepilogo-ordine {
        padding: 14px;
    }

    .pulsante-checkout {
        width: 100%;
        margin-right: 0;
    }

    .form-checkout {
        padding: 14px;
    }

    .riga-carrello {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .azioni-prodotto-carrello,
    .testo-prodotto-carrello {
        width: 100%;
    }

    .azioni-carrello button {
        width: 100%;
    }

    .barra-lingua {
        padding: 8px 20px;
    } 

    .scheda:hover {
        transform: none;
    }

   .footer-principale {
        width: calc(100% - 48px);
        margin-left: 24px;
        margin-right: 24px;
        padding: 24px 16px;
    }

}

@media (max-width: 850px) {

    .contenitore-link {
        grid-template-columns: repeat(2, 1fr);
    }

    .contenitore {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 850px) {

    .contenitore-notizie {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    body {
        padding-top: var(--altezza-header, 208px);
    }

    .intestazione-fissa {
        width: 100%;
    }

    .gruppo-taralli {
        left: 2%;
        top: calc(72% + 13px);
        transform: scale(0.60);
        transform-origin: left center;
    }

/* discesa quando viene aperta la storia */
.gruppo-taralli.taralli-storia {
    offset-path: path("M 0 0 C -5 100, 0 220, 10 280");
    offset-rotate: 0deg;

    animation: percorso-taralli-storia 2.8s
               cubic-bezier(0.45, 0, 0.55, 1) forwards;

    transform: scale(0.50);
    transform-origin: left center;

    opacity: 0.78;
}

    .navigazione-principale {
        justify-content: center;
        gap: 8px;
    }

    .link-navigazione {
        padding: 7px 9px;
        font-size: 14px;
    }

    .sezione-home {
        padding-top: 20px;
    }

    .sezione-dettaglio-prodotto {
        padding: 20px 15px;
    }

    .contenitore-dettaglio-prodotto {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .immagine-dettaglio-prodotto {
        max-width: 100%;
        height: auto;
        max-height: 280px;
    }

    .titolo-dettaglio-prodotto {
        font-size: 24px;
    }

    .filtri {
        position: static;
    }
}

@media (min-width: 769px) {
    .contenitore-principale {
        padding-top: 205px;
    }
}

@media (max-width: 600px) {

    .sezione-link {
        padding: 15px;
        margin-top: 20px;
    }

    .logo-negozio {
        height: 95px;
        max-width: 200px;
    }

    .titolo-catalogo {
        font-size: 20px;
        line-height: 1.3;
        text-align: center;
        scroll-margin-top: calc(var(--altezza-header, 208px) + 20px);
    }

    .barra-lingua {
        justify-content: center;
        gap: 8px;
        padding: 8px 12px;
    }

    .contenitore {
        grid-template-columns: 1fr;
    }

    .contenitore-link {
        grid-template-columns: 1fr;
    }

    .gruppo-azzera-risultati {
        width: 100%;
        gap: 10px;
        flex-wrap: wrap;
    }

    .gruppo-azzera-risultati .azzera-filtri {
        flex: 1 1 0;
        width: 0;
        min-width: 0;
    }

    .gruppo-azzera-risultati .conta-risultati,
    .gruppo-azzera-risultati .stato-ricerca {
        flex-basis: calc(50% - 5px);
        width: calc(50% - 5px);
        min-height: 48px;
        box-sizing: border-box;
        padding: 6px 8px;
    }

    .gruppo-azzera-risultati .stato-ricerca {
        margin-left: calc(50% + 5px);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        text-align: center;
    }
    
    .stato-ricerca {
        flex: 0 0 100%;
    }

    .stato-ricerca {
        width: fit-content;
        max-width: 100%;
        box-sizing: border-box;
    }

    .scheda-link {
        padding: 18px;
    }

    .apri-link {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .checkout {
        width: calc(100% - 24px);
        margin: 20px auto;
        padding: 18px 14px;
        border-radius: 12px;
    }

    .checkout form {
        gap: 12px;
    }

    .checkout input,
    .checkout select {
        min-height: 46px;
        padding: 10px 12px;
        font-size: 16px;
    }

    .sezione-notizie {
        padding: 15px;
        margin-top: 20px;
    }

    .contenitore-notizie {
        grid-template-columns: 1fr;
    }

    .scheda-notizia {
        padding: 18px;
    }

    .link-notizia {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .checkout input[type="checkbox"] {
        width: 18px;
        height: 18px;
        min-height: 0;
        padding: 0;
        flex-shrink: 0;
    }

    .info-ritiro-checkout {
        padding: 14px;
    }

    .info-ritiro-checkout p {
        font-size: 14px;
        overflow-wrap: anywhere;
    }

    .info-orari-checkout {
        padding: 10px 12px;
        font-size: 14px;
    }

    .dati-fattura-checkout {
        padding: 14px;
    }

    .riepilogo-ordine {
        margin-top: 18px;
        padding: 16px;
    }

    .riepilogo-ordine h3 {
        font-size: 19px;
    }

    .riepilogo-ordine p {
        font-size: 14px;
        overflow-wrap: anywhere;
    }

    .riepilogo-ordine .totale-riepilogo {
        font-size: 18px;
    }

    .pulsante-checkout {
        width: 100%;
        min-height: 48px;
        padding: 12px 14px;
        font-size: 15px;
    }

    .titolo-carrello {
        font-size: 21px;
        margin-bottom: 16px;
        padding-bottom: 10px;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .testo-titolo-carrello {
        white-space: nowrap;
    }

    .badge-titolo-carrello {
        min-width: 25px;
        height: 25px;
        padding: 0 7px;
        font-size: 13px;
    }
    
    .footer-principale {
        width: calc(100% - 24px);
        margin: 24px 12px 0 12px;
        padding: 20px 12px;
    }

    .contatti-footer .link-social-footer {
        margin: 6px 8px;
    }

    .navigazione-principale {
        width: 100%;
        justify-content: center;
        gap: 2px;
        flex-wrap: nowrap;
    }

    .link-navigazione {
        padding: 7px 6px;
        font-size: 13px;
        white-space: nowrap;
    }

    .gruppo-taralli {
        left: -1%;
        top: 82%;
        transform: scale(0.40);
        transform-origin: left center;
    }

    .gruppo-taralli.taralli-storia {
        offset-path: path("M 0 0 C 10 105, 30 220, 45 300");
        offset-rotate: 0deg;

        animation: percorso-taralli-storia 2.8s
                   cubic-bezier(0.45, 0, 0.55, 1) forwards;

        transform: scale(0.48);
        transform-origin: left center;

        opacity: 0.78;
    }

    .filtro-prezzo {
        width: 110px;
        min-width: 110px;
        max-width: 110px;
        box-sizing: border-box;
    }

    label[for="prezzo-minimo"],
    label[for="prezzo-massimo"] {
        display: inline-block;
        width: 115px;
        flex-shrink: 0;
    }
    
    .social-footer {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 8px;
        margin-top: 14px;
    }
}

@media (max-width: 360px) {

    .titolo-carrello {
        font-size: 19px;
        gap: 6px;
    }

    .badge-titolo-carrello {
        min-width: 23px;
        height: 23px;
        padding: 0 6px;
        font-size: 12px;
    }

    .nome-quantita-carrello {
        white-space: normal;
    }

    .totale-carrello {
        padding-left: 14px;
        padding-right: 14px;
    }

    .sconto-generale-carrello {
        padding-left: 12px;
        padding-right: 12px;
    }
}
