/* Reset CSS minimo */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Stile base */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
    max-width: 100vw;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Header */
header {
    padding: 0.75rem 2rem;
    text-align: center;
    background-color: #f5f5f5;
    border-bottom: none;
}

header .header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

header .header-account {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
}

/* Main */
main {
    min-height: 60vh;
    padding: 2rem;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
    border-top: none;
}

/* Footer */
footer {
    padding: 1.5rem;
    text-align: center;
    background-color: #f5f5f5;
    color: #666;
    font-size: 0.9rem;
}

/* Bottone Scopri ricette */
.content-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: top;
    min-height: 50vh;
    gap: 2rem;
    position: relative;
}

.btn-ricette {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-ricette:hover {
    background-color: #555;
}

/* Pagina ricette */
h2 {
    font-size: 1.8rem;
    margin-bottom: 0;
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 300px;
}

.input-container label {
    font-weight: 500;
    font-size: 0.9rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.input-container input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #fff;
}

.input-container input:focus {
    outline: none;
    border-color: #333;
}

.input-container input::placeholder {
    color: #999;
    font-size: 0.9rem;
}

.btn-cerca {
    padding: 0.75rem 1.5rem;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.btn-cerca:hover {
    background-color: #555;
}

.btn-cerca:active {
    background-color: #222;
}

.btn-elimina {
    padding: 0.75rem 1.5rem;
    background-color: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.btn-elimina:hover {
    background-color: #c82333;
}

.btn-elimina:active {
    background-color: #bd2130;
}

/* Navigation */
header nav {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

header nav a {
    color: #333;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.catalog-tab {
    position: relative;
}

.catalogo-badge {
    position: absolute;
    top: 4px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #d11;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    pointer-events: none;
}

header nav a:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header nav a:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

header nav a.active {
    background-color: #b9a182;
    color: #000000;
    border-color: #27322f;
    font-weight: 600;
}

header nav a.active:hover {
    background-color: #2d3a35;
    border-color: #2d3a35;
}

/* Header contacts - Desktop */

    /* Contenitore principale della sezione contatti */
    .header-contacts {
        background-color: #f5f5f5; /* Sfondo grigio chiarissimo come in foto */
        padding: 15px 20px;
        margin: 0;
        font-family: sans-serif;
        border-bottom: 1px solid #e0e0e0;
        line-height: 0.2;
    }

    /* Stile del titolo "Contatti" e del messaggio */
    .contacts-title {
        display: block;
        font-weight: 600;
        margin-bottom: 4px;
        padding: 5px;
        opacity: 0.7;
        white-space: nowrap;
        font-size: 0.85rem;
    }

    .contacts-message {
        font-weight: normal;
        font-style: italic;
        color: #888;
        margin-left: 10px;
    }

    /* Righe dei link */
    .contacts-row {
        display: flex;
        gap: 25px;       /* Spazio tra un link e l'altro */
        margin-top: 8px;
    }

    /* Stile dei singoli link (Telefono, Email, ecc.) */
    .contact-link {
        text-decoration: none;
        color: #333;
        display: flex;
        align-items: center;
        gap: 8px;        /* Spazio tra l'icona e il testo */
        font-size: 14px;
        transition: color 0.2s;
    }

    /* Effetto al passaggio del mouse */
    .contact-link:hover {
        color: #000;
    }

    /* Colore specifico per le icone (opzionale, per farle risaltare) */
    .contact-link i {
        font-size: 16px;
        width: 20px;     /* Larghezza fissa per allineare i testi verticalmente */
        text-align: center;
    }



/* Animazione prodotto che vola nel carrello */
.flying-product {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    font-size: 1.5rem; /* 🔴 Modifica dimensione icona */
    color: #28a745; /* 🔴 Modifica colore icona */
    will-change: transform, opacity;
}

@keyframes flyToCart {
    0% {
        opacity: 1;
        transform: scale(0.6); /* 🔴 Modifica scala iniziale */
        left: var(--start-x);
        top: var(--start-y);
    }
    50% {
        opacity: 1;
        transform: scale(1.5); /* 🔴 Modifica scala massima (salto) */
        left: calc(var(--start-x) + var(--fly-x) * 0.5);
        top: calc(var(--start-y) + var(--fly-y) * 0.5);
    }
    100% {
        opacity: 0;
        transform: scale(0.4); /* 🔴 Modifica scala finale */
        left: calc(var(--start-x) + var(--fly-x));
        top: calc(var(--start-y) + var(--fly-y));
    }
}

/* Pannello Carrello */
.cart-panel {
    position: fixed;
    display: block;
    left: 170px;
    right: auto;
    top: 100px;
    width: 242px;
    max-width: calc(100% - 2rem);
    z-index: 999;
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.cart-panel.dragging {
    transition: none;
}

.cart-panel.collapsed {
    max-height: auto;
}

.cart-panel-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-panel-header {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #eeeeee;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
}

.cart-panel-drag-handle {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: grab;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    padding: 0.25rem;
}

.cart-panel-drag-handle:hover {
    opacity: 0.8;
}

.cart-panel-drag-handle:active {
    cursor: grabbing;
    opacity: 1;
}

.drag-dot {
    width: 4px;
    height: 4px;
    background-color: #666;
    border-radius: 50%;
    flex-shrink: 0;
}

.cart-panel-drag-handle:hover .drag-dot {
    background-color: #333;
}

.drag-dot-row {
    display: flex;
    gap: 3px;
}

.cart-panel-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.cart-panel-toggle {
    background: none;
    border: none;
    font-size: 0.875rem;
    color: #666;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cart-panel-toggle:hover {
    background-color: #e0e0e0;
    color: #333;
}

.cart-panel-body {
    padding: 0.75rem;
    overflow-y: auto;
    flex: 1;
    max-height: 350px;
    min-height: 0;
}

.cart-panel-body::-webkit-scrollbar {
    width: 6px;
}

.cart-panel-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cart-panel-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.cart-panel-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    min-height: 44px;
    gap: 0.5rem;
}

.cart-item-image-container {
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 0.9rem;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.cart-item-gusto {
    font-weight: 600;
    color: #333;
    font-size: 0.875rem;
    line-height: 1.2;
}

.cart-item-peso {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.2;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cart-item-quantity {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
    flex-shrink: 0;
    line-height: 1;
}

.cart-item-quantity-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    margin: 0;
    padding: 0;
}

.cart-item-decrease,
.cart-item-increase {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.65rem;
    color: #333;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.cart-item-decrease:hover,
.cart-item-increase:hover {
    background-color: #f0f0f0;
    border-color: #333;
}


.cart-panel-footer {
    padding: 0.75rem;
    border-top: 1px solid #e0e0e0;
    background-color: #eeeeee;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.cart-panel-footer .btn-request {
    width: 100%;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.cart-panel.collapsed .cart-panel-body,
.cart-panel.collapsed .cart-panel-footer {
    display: none;
}

/* Responsive per pannello */
@media (max-width: 768px) {
    .cart-panel {
        width: calc(100% - 1rem);
        max-width: 220px;
        top: 0.5rem;
        right: 0.5rem;
        max-height: calc(100vh - 1rem);
    }
    
    .cart-panel-header {
        padding: 0.4rem 0.5rem;
    }
    
    .cart-panel-header h3 {
        font-size: 0.8rem;
    }
    
    .cart-panel-toggle {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
    
    .cart-panel-body {
        padding: 0.4rem;
        max-height: 200px;
    }
    
    .cart-item {
        padding: 0.4rem 0.5rem;
        min-height: 44px;
    }
    
    .cart-item-gusto {
        font-size: 0.8rem;
    }
    
    .cart-item-peso {
        font-size: 0.7rem;
    }
    
    .cart-item-decrease,
    .cart-item-increase {
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
    }
    
    .cart-item-quantity {
        min-width: 20px;
        font-size: 0.75rem;
    }
    
    .cart-item-quantity-controls {
        gap: 0.1rem;
        margin: 0;
        padding: 0;
    }
    
    .cart-item {
        padding: 0.35rem;
        min-height: 40px;
    }
    
    .cart-items-list {
        gap: 0.4rem;
    }
    
    .cart-panel-footer {
        padding: 0.5rem;
    }
    
    .cart-panel-footer .btn-request {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .cart-panel-footer .btn-request i {
        font-size: 1rem;
    }
}

.btn-request {
    padding: 0.875rem 1.75rem;
    background-color: #25D366;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.btn-request:hover {
    background-color: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.btn-request:active {
    transform: translateY(0);
}

.btn-request i {
    font-size: 1.2rem;
}

/* Messaggi loading/errore */
.message {
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    text-align: center;
    min-width: 300px;
}

.message.loading {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Container dati record */
.data-container {
    margin-top: 0;
    min-width: 300px;
    max-width: 600px;
    width: 100%;
}

/* Container ricetta strutturato */
.recipe-container {
    margin-top: 0;
    width: 100%;
    max-width: 900px;
}

/* Header ricetta */
.recipe-header {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 2rem;
    margin-bottom: 0.7rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    min-height: 200px;
}

.recipe-image-container {
    flex-shrink: 0;
    order: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-width: 200px;
    width: 200px;
}

.recipe-image {
    width: 100%;
    height: 100%;
    max-width: 180px;
    max-height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
    display: none;
    margin: 0;
}

.recipe-image[src]:not([src=""]) {
    display: block;
}

.recipe-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    order: 2;
    min-width: 0;
}

.recipe-name {
    font-size: 1.75rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
    word-wrap: break-word;
    hyphens: auto;
}

.recipe-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: flex-end;
}

.meta-item {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.meta-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.meta-value {
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Sezione dati aggiuntivi (lotto, data produzione, peso pacchetto, sequenza) */
.additional-data-section {
    margin-bottom: 1rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.additional-data-title {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.additional-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: center;
}

.additional-meta .meta-item {
    line-height: 0.3;
}

.additional-meta .meta-label,
.additional-meta .meta-value {
    line-height: 0.6;
}

/* Titolo sezione ricetta */
.recipe-section-title {
    margin: 1.5rem 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

/* Sezione descrizione differenza ricetta */
.diff-ricetta-section {
    margin-top: 0rem;
    margin-bottom: 0.7rem;
    padding: 1rem 1.5rem;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.diff-ricetta-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.diff-ricetta-text {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Sezione ingredienti */
.ingredients-section {
    margin-top: 2rem;
    margin-bottom: 0.7;
    padding: 1rem 1.5rem;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.ingredients-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.ingredients-text {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.allergens-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.allergens-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin: 0 0 0.4rem 0;
}

.allergens-text {
    margin: 0;
    color: #666;
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Tabella nutrizionale - Stile completamente ricreato */
.nutrition-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border: none;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 0 1.5px #999999;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 2rem;
}

.nutrition-table thead {
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}


.nutrition-title {
    text-align: left !important;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    padding: 0.1rem 0.75rem;
    background-color: #f5f5f5;
    vertical-align: middle;
}

.nutrition-row-highlighted {
    background-color: #fafafa; /* Grigio più chiaro */
}

.nutrition-table thead tr {
    border-bottom: 1px solid #e0e0e0;
}

.nutrition-table th {
    padding: 0.05rem 0.5rem;
    text-align: center;
    font-weight: 600;
    color: #333333;
    font-size: 0.75rem;
    line-height: 1.0;
    vertical-align: middle;
}

.nutrition-header {
    font-size: 0.7rem;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

/* Permette il wrap solo nell'ultima colonna (per porzione 40g) */
.nutrition-table th.nutrition-header:last-child {
    white-space: normal;
}

.nutrition-table tbody {
    display: table-row-group;
}

.nutrition-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    background-color: #ffffff;
    height: auto;
    min-height: 0;
}

.nutrition-table tbody tr td {
    padding-top: 0.04rem !important;
    padding-bottom: 0.04rem !important;
    height: auto;
    min-height: 0;
}

.nutrition-table tbody tr.nutrition-row-highlighted {
    background-color: #fafafa !important; /* Grigio più chiaro */
}

.nutrition-table tbody tr:last-child {
    border-bottom: none;
}

.nutrition-table td {
    line-height: 1.4; /* NOTA: Per modificare la dimensione della riga */
    padding: 0.04rem 0.75rem;
    font-size: 0.9rem; /* NOTA: Per modificare la dimensione del font delle etichette principali (es. "Carboidrati netti", "Proteine", ecc.)*/
    vertical-align: middle;
}

/* Righe principali - separazione tra gruppi di macronutrienti */
.nutrition-row-main {
    border-top: 2px solid #bbbbbb;
}

.nutrition-row-main:first-child {
    border-top: none;
}

/* Etichette principali */
.nutrition-label {
    
    font-weight: 500;
    color: #555555;
    text-align: left;
    width: 50%;
}

/* Etichette kJ - meno importanti */
.nutrition-label-kj {
    font-size: 0.85em;
    color: #888888;
    font-weight: 400;
    text-align: left;
}

/* Etichette sottocategorie "di cui" */
.nutrition-table td.nutrition-label-sub {
    /* Dimensione del font per le etichette "di cui..." - controlla quanto sono grandi rispetto alle righe principali */
    font-size: 0.8em !important;
    color: #666666;
    font-weight: 400;
    text-align: left;
    padding-left: 25px !important;
    position: relative;
    line-height: 1.2 !important;
    overflow: hidden;
}

.gusto-card-occasioni-note {
    padding: 0.5rem 0.9rem;
    border-top: 1px dashed #ddd;
    border-bottom: 1px dashed #ddd;
    background: #fff7e6;
    color: #333;
    font-size: 13px;
    line-height: 20px;
}

.nutrition-label-sub::before {
    content: '';
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background-color: #dddddd;
}

/* Righe sottocategorie */
.nutrition-row-sub {
    background-color: #fcfcfc;
}

/* Righe kJ */
.nutrition-row-kj {
    opacity: 0.7;
}

/* Valori principali */
.nutrition-value {
    text-align: right;
    color: #333333;
    font-weight: 500;
    width: 25%;
    padding-right: 1rem;
}

/* Allinea tutte le celle con valori a destra (escludendo le label) */
.nutrition-table td:not(.nutrition-label):not(.nutrition-label-kj):not(.nutrition-label-sub) {
    text-align: right;
}

/* Valori sottocategorie */
.nutrition-table td.nutrition-value-sub {
    /* Dimensione del font per i valori numerici delle righe "di cui..." - controlla quanto sono grandi rispetto alle righe principali */
    font-size: 0.9em !important;
    color: #666666;
    font-weight: 400;
    text-align: right;
    line-height: 1.2 !important;
}

/* Valori kJ */
.nutrition-value-kj {
    font-size: 0.75em;
    color: #888888;
    font-weight: 400;
    text-align: right;
    line-height: 0.7;
}

.nutrition-table .no-data {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
}

.record-data {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.75rem 1rem;
}

.record-data dt {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.record-data dd {
    margin: 0;
    color: #333;
    word-break: break-word;
}

.record-data dt.field-name {
    text-transform: capitalize;
}

.record-data dd.field-value {
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .catalog-tabs {
        margin-left: -1rem; /* Estende oltre il padding di main su mobile */
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        width: calc(100% + 2rem);
    }
    
    .input-container {
        min-width: 100%;
    }
    
    .message {
        min-width: 100%;
    }
    
    .data-container {
        min-width: 100%;
    }
    
    .recipe-container {
        max-width: 100%;
    }
    
    .recipe-header {
        flex-direction: row;
        gap: 1rem;
        padding: 1rem;
        align-items: stretch;
        min-height: 140px;
    }
    
    .recipe-image-container {
        order: 1;
        flex-shrink: 0;
        width: 140px;
        min-width: 140px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0rem;
        
    }
    
    .recipe-info {
        order: 2;
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 0.5rem;
    }
    
    .recipe-image {
        width: 100%;
        height: 100%;
        max-width: calc(140px - 1.5rem);
        max-height: calc(140px - 1.5rem);
        margin: 0;
        object-fit: cover;
        border-radius: 8px;
    }
    
    .recipe-name {
        font-size: 1.5rem;
        margin: 0;
        line-height: 1.3;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .recipe-meta {
        gap: 0.25rem;
        justify-content: flex-end;
    }
    
    .meta-item {
        flex-wrap: nowrap;
        white-space: nowrap;
    }
    
    .meta-label {
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .meta-value {
        font-size: 0.9rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* Titolo rimosso - ora è dentro la tabella */
    
    .ingredients-section {
        margin-top: 0rem;
        margin-bottom: 0.8rem;
        padding: 0.75rem 1rem;
    }
    
    .ingredients-title {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }
    
    .ingredients-text {
        font-size: 0.9rem;
    }
    
    .allergens-section {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }
    
    .allergens-title {
        font-size: 0.75rem;
        margin-bottom: 0.3rem;
    }
    
    .allergens-text {
        font-size: 0.7rem;
    }
    
    .nutrition-title {
        font-size: 1.1rem;
        padding: 0.05rem 0.5rem;
    }
    
    .nutrition-table {
        margin-top: 1.5rem;
    }
    
    .record-data {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .record-data dt {
        margin-top: 0.5rem;
        border-top: 1px solid #e0e0e0;
        padding-top: 0;
    }
    
    .record-data dt:first-child {
        margin-top: 0;
        border-top: none;
        padding-top: 0;
    }

    .header-contacts {
        margin: 0;
        font-size: 0.85rem;
        text-align: left;
    }
    

    
    .contacts-row {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .contact-link {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        text-decoration: none;
        color: inherit;
        white-space: nowrap;
    }
    
    .contact-link i {
        font-size: 0.9rem;
    }

    .contacts-message {
        font-size: 0.8rem;
        color: #666;
        font-style: italic;
        font-weight: normal;
        margin-left: 0.5rem;
    }
}

/* Catalog Section Title */
.catalog-section-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #666;
    margin: 0;
    margin-top: -0.3rem; /* Leggermente più spaziato dal titolo */
    margin-bottom: 0.75rem; /* Spazio prima dei tab */
}

/* Catalog Tabs - Full Width Two Row Navigation */
.catalog-tabs-wrapper {
    width: 100%;
    margin: 1rem 0 0 0;
    padding: 0;
    background-color: #f5f5f5;
    position: relative;
}

.catalog-tabs-wrapper::after {
    content: '';
    position: absolute;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    bottom: -12px;
    width: 100vw;
    height: 3px;
    background-color: #ddd;
    z-index: 1;
}

.catalog-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1px;
    width: 100%;
    background-color: #ddd;
    margin: 0;
    padding: 0;
}

.catalog-tab {
    padding: 0.75rem 1rem;
    background-color: #f5f5f5;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    margin: 0;
}

.catalog-tab:hover:not(:disabled):not(.active) {
    background-color: #e8e8e8;
    color: #333;
}

.catalog-tab.active {
    background-color: #F9E9D7;
    color: #333;
    font-weight: 600;
    box-shadow: inset 0 -3px 0 0 #b9a182;
}

.catalog-tab:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .catalog-tabs-wrapper::after {
        height: 2px;
        bottom: -10px;
    }
    
    .catalog-tabs {
        gap: 1px;
    }
    
    .catalog-tab {
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* Stili per il catalogo - Card Orizzontali */
.catalog-container {
    width: 100%;
    max-width: 1400px;
    margin-top: 0;
}

/* Spazio tra titolo e sottotitolo catalogo */
.content-center h2 + .catalog-section-title {
    margin-top: -0.3rem; /* Leggermente più spaziato */
}

.content-center .catalog-section-title + .catalog-tabs-wrapper {
    margin-top: 0.75rem;
}

/* Catalog Filters */
.catalog-filters-wrapper {
    width: 100%;
    margin-top: 1.25rem;
    margin-bottom: 0;
    padding-top: 0px;
    background-color: #fff;
}

.catalog-filters {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
    overflow-x: hidden;
    overflow-y: visible;
    padding-bottom: 0.2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
}

.catalog-filters.scrollable {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.catalog-filters.scrollable::-webkit-scrollbar {
    height: 4px;
}

.catalog-filters.scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.catalog-filters.scrollable::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 2px;
}

.catalog-filters.scrollable::-webkit-scrollbar-thumb:hover {
    background-color: #999;
}

.filter-toggle-wrapper {
    position: relative;
    flex-shrink: 0;
}

.filter-toggle-btn {
    padding: 0.25rem 0.6rem;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-toggle-btn i {
    font-size: 0.65rem;
}

.filter-toggle-btn:hover {
    background-color: #e8e8e8;
}

.filter-buttons {
    display: flex;
    gap: 0.3rem;
    flex-wrap: nowrap;
    align-items: center;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.filter-btn {
    padding: 0.25rem 0.6rem;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-width: fit-content;
    flex-shrink: 0;
    touch-action: manipulation;
}

.filter-btn:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.filter-btn.active {
    background-color: #333;
    color: #fff;
    border-color: #333;
    padding-right: 1.4rem;
}

.filter-btn.active::after {
    content: '×';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1;
}

.filter-btn[data-filter="all"].active {
    background-color: #666;
    padding-right: 0.6rem; /* Rimuove lo spazio per la X */
}

.filter-btn[data-filter="all"].active::after {
    display: none; /* Nasconde la X per "Tutti" */
}

/* Filter Panel - Pannello espandibile */
.filter-panel {
    width: 100%;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-top: 0.3rem;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, margin-top 0.3s ease-out;
}

.filter-panel.open {
    max-height: 1000px;
    opacity: 1;
    margin-top: 0.3rem;
}

.filter-panel-content {
    padding: 0.5rem 0.75rem;
}

.filter-panel-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-panel-header-row .filter-panel-section {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.filter-panel-section {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-panel-section:last-child {
    margin-bottom: 0;
}

.filter-panel-title {
    font-size: 0.7rem;
    font-weight: 500;
    color: #666;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-reset-btn {
    padding: 0.25rem 0.6rem;
    background-color: #ffe5e5;
    border: 1px solid #ffcccc;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #cc3333;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    line-height: 1.2;
    align-self: flex-start;
    margin-top: 0;
}

.filter-reset-btn:hover {
    background-color: #ffd5d5;
    border-color: #ffaaaa;
    color: #aa2222;
}

.filter-reset-btn i {
    font-size: 0.65rem;
}

.filter-panel-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
    flex: 1;
}

.filter-panel-option {
    padding: 0.25rem 0.6rem;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: fit-content;
    flex-shrink: 0;
    line-height: 1.2;
    position: relative;
    overflow: hidden;
    height: auto;
}

.filter-panel-option:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.filter-panel-option.active {
    background-color: #333;
    color: #fff;
    border-color: #333;
    padding-right: 1.4rem;
}

.filter-panel-option.active::after {
    content: '×';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1;
}

/* Icone di ordinamento - nascondi la X per le opzioni di ordinamento */
.filter-panel-option[data-sort]::after {
    display: none !important;
}

.filter-panel-option[data-sort] {
    padding-right: 0.6rem; /* Padding normale quando non attivo */
}

.filter-panel-option[data-sort].active {
    padding-right: 1.8rem; /* Spazio per l'icona di ordinamento quando attivo */
}

.filter-panel-option[data-sort] .sort-icon {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem;
    color: inherit;
    opacity: 0.8;
}

.filter-panel-option[data-sort].active .sort-icon {
    opacity: 1;
}


@media (max-width: 768px) {
    .catalog-filters {
        gap: 0.3rem;
        margin-top: 0.25rem;
        margin-bottom: 0.25rem;
    }
    
    .filter-toggle-btn {
        padding: 0.2rem 0.5rem;
        font-size: 0.65rem;
    }
    
    .filter-toggle-btn i {
        font-size: 0.6rem;
    }
    
    .filter-btn {
        padding: 0.2rem 0.5rem;
        font-size: 0.65rem;
    }
    
    .filter-btn.active {
        padding-right: 1.2rem;
    }
    
    .filter-btn[data-filter="all"].active {
        padding-right: 0.5rem; /* Rimuove lo spazio per la X su mobile */
    }
    
    .filter-btn.active::after {
        right: 0.4rem;
        font-size: 0.8rem;
    }
    
    .filter-btn[data-filter="all"].active::after {
        display: none; /* Nasconde la X per "Tutti" su mobile */
    }
}

/* Riduce gap generale per pagina catalogo */
body:has(.catalog-container) .content-center {
    gap: 0.5rem;
}

/* Riduce margin-bottom dell'h2 nella pagina catalogo */
body:has(.catalog-container) .content-center h2 {
    margin-bottom: -0.5rem;
}

/* Sfondo immagine per tutta la sezione header catalogo - elemento separato sotto tutto */
body:has(.catalog-container) .content-center {
    position: relative;
}

/* Rimuove il padding superiore di main nella pagina catalogo */
body:has(.catalog-container) main {
    padding-top: 0;
}

/* Elemento di sfondo che ignora i margini del contenuto */
body:has(.catalog-container) .content-center::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2rem; /* Estende oltre il padding di main */
    right: -2rem; /* Estende oltre il padding di main */
    bottom: 0;
    background-image: url('https://i.pinimg.com/736x/2b/c3/89/2bc389d61f5bd2e43a55276ab56be81b.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}

/* Overlay semitrasparente per opacità 10% dell'immagine */
body:has(.catalog-container) .content-center::after {
    content: '';
    position: absolute;
    top: 0;
    left: -2rem; /* Estende oltre il padding di main */
    right: -2rem; /* Estende oltre il padding di main */
    bottom: 0;
    background-color: rgba(255, 255, 255, 1); /* Opacità 10% = 90% bianco sopra */
    z-index: 1;
    pointer-events: none; /* Permette interazione con elementi sottostanti */
}

/* Assicura che il contenuto sia sopra l'overlay */
body:has(.catalog-container) .content-center > * {
    position: relative;
    z-index: 2;
}

.catalog-cards-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.75rem;
    padding: 0;
    align-items: start;
}

.gusto-card {
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    align-self: flex-start;
}

.gusto-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gusto-card.expanded {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: visible;
    width: 100%;
}

.gusto-card-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    flex: 1;
}

.gusto-card-image-container {
    width: 80px;
    height: 80px;
    min-width: 80px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.gusto-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gusto-card-image.bw-filter {
    filter: grayscale(100%);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 1.5rem;
}

.gusto-card-body {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.gusto-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.25rem 0;
    line-height: 1.1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    overflow: hidden;
}

.gusto-card-tipo-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.gusto-card-tipo {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: nowrap;
    line-height: 1.1;
    overflow: hidden;
}

.crystal-meat-label {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    line-height: 1.1;
}

/* Goccioline di umidità */
.moisture-droplets {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    margin-left: 0;
    overflow: nowrap;
    align-self: flex-end;
    margin-bottom: 0rem;
}

.moisture-droplet {
    position: relative;
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
}

.moisture-droplet i {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 0.7rem;
    display: block;
    width: 0.7rem;
    height: 0.7rem;
}

.moisture-droplet .droplet-empty {
    color: #ccc;
    z-index: 1;
}

.moisture-droplet .droplet-filled {
    color: #4a9eff;
    z-index: 2;
    transition: clip-path 0.3s ease;
}

.moisture-droplet[data-fill] {
    --fill-height: attr(data-fill);
}

.gusto-card-count {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #e0e0e0;
    min-width: 60px;
    flex-shrink: 0;
}

.count-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.count-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.gusto-card-detail {
    border-top: 1px solid #e0e0e0;
    background-color: #fafafa;
    max-height: 0;
    overflow: hidden;
    padding: 0 0.2rem;
    /* Animazione di chiusura (inversa dell'apertura) - padding orizzontale senza transizione */
    transition: max-height 0.35s cubic-bezier(0.6, 1, 0.8, 1), padding-top 0.35s cubic-bezier(0.6, 1, 0.8, 1), padding-bottom 0.35s cubic-bezier(0.6, 1, 0.8, 1);
}

.gusto-card.expanded .gusto-card-detail {
    max-height: 1000px;
    padding: 0.2rem 0.2rem;
    overflow: visible;
    /* Animazione di apertura (fluida) - solo verticale, padding orizzontale senza transizione */
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding-top 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding-bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1), overflow 0s 0.35s;
}

.detail-content {
    padding: 0.5rem 1rem;
    position: relative;
    overflow: visible;
}

.detail-section {
    margin-bottom: 0.5rem;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section-header {
    margin-bottom: 0.25rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e0e0e0;
}

.detail-section-header.ingredients-header {
    border-bottom: none;
}

.detail-section-header h4 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
    padding: 0;
    margin: 0;
}

.detail-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.recipe-id-small {
    /* Valori originali (per revert):
       font-size: 0.75rem;
       padding: 0.35rem 0.75rem;
       padding-right: 2rem;
    */
    font-size: 0.7rem; /* Ridotto da 0.75rem */
    color: #333;
    font-weight: 500;
    font-family: monospace;
    background-color: #f5f5f5;
    padding: 0.2rem 0.65rem; /* Ridotto padding verticale da 0.3rem a 0.2rem */
    padding-right: 1.75rem; /* Ridotto da 2rem */
    margin-top: 0.3rem;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-block;
    position: relative;
    box-shadow: inset -1px -1px 2px rgba(0, 0, 0, 0.07), inset 1px 1px 2px rgba(255, 255, 255, 0.9);
}

.recipe-id-small.clickable {
    cursor: pointer;
}

.recipe-id-small.clickable:hover {
    background-color: #eeeeee;
    color: #000;
}

.recipe-id-small.clickable:active {
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.07), inset -1px -1px 2px rgba(255, 255, 255, 0.9);
}

.recipe-id-icon {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: #666;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.recipe-id-small.clickable:hover .recipe-id-icon {
    opacity: 1;
    color: #333;
    transform: translateY(-50%) scale(1.1);
}

.detail-section p {
    margin: 0;
    color: #555;
    line-height: 1.5;
    font-size: 0.85rem;
}

.recipe-id {
    font-family: monospace;
    font-weight: 600;
    color: #333;
}

.pesi-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Barra pesi nella card */
.gusto-card-weights-bar {
    border-top: 1px solid #e0e0e0;
    padding: 0.5rem 0;
    background-color: #fafafa;
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
}

.pesi-list-scrollable {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0.75rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    -webkit-overflow-scrolling: touch;
    /* Permetti lo scroll anche quando si scrolla verticalmente sulla card */
    touch-action: pan-x pan-y;
    cursor: grab;
}

.pesi-list-scrollable:active {
    cursor: grabbing;
}

.pesi-list-scrollable::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Animazione scroll hint - gestita da JavaScript */
.pesi-list-scrollable.scroll-hint {
    scroll-behavior: smooth;
}

.gusto-card-weights-bar .peso-item-btn {
    flex-shrink: 0;
    opacity: 1;
    transform: none;
    animation: none;
}

.peso-item-btn {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: inset -1px -1px 2px rgba(0, 0, 0, 0.1), inset 1px 1px 2px rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateY(10px);
    position: relative;
    overflow: visible;
    min-height: 2rem;
    touch-action: manipulation;
}

.peso-info-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    line-height: 1;
    padding: 0.15rem 0;
}

/* Effetto shine metallico ogni 5 secondi - più sottile e concentrato, inclinato */
.peso-item-btn {
    position: relative;
    overflow: hidden;
}

.peso-item-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(
        135deg,
        transparent 0%,
        transparent 20%,
        rgba(255, 255, 255, 0.5) 50%,
        transparent 80%,
        transparent 100%
    );
    animation: shine 5s infinite;
    z-index: 1;
    pointer-events: none;
    transform: skewX(-25deg) translateX(-100%);
    transform-origin: center;
}

@keyframes shine {
    0% {
        transform: skewX(-25deg) translateX(-100%) translateY(0);
    }
    50% {
        transform: skewX(-25deg) translateX(400%) translateY(0);
    }
    100% {
        transform: skewX(-25deg) translateX(400%) translateY(0);
    }
}

/* ============================================
   OPZIONE 1: SCALE + FADE (Zoom in con fade)
   ============================================ */
/* .gusto-card.expanded .peso-item-btn {
    animation: scaleFadeIn 0.35s ease forwards;
}

@keyframes scaleFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
} */

/* ============================================
   OPZIONE 2: SLIDE DA SINISTRA + FADE
   ============================================ */
/* .gusto-card.expanded .peso-item-btn {
    animation: slideFromLeft 0.4s ease forwards;
}

@keyframes slideFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
} */

/* ============================================
   ZOOM BOUNCY - Animazione zoom con uno swing
   ============================================ */
.gusto-card.expanded .peso-item-btn {
    animation: none;
}

@keyframes zoomBouncy {
    0% {
        opacity: 1;
        transform: scale(0.7);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Reset quando la card si chiude */
.gusto-card:not(.expanded) .gusto-card-weights-bar .peso-item-btn {
    opacity: 1;
    transform: none;
    animation: none;
}


.peso-item-btn:hover {
    background-color: #eeeeee;
}

.peso-item-btn:active {
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.1), inset -1px -1px 2px rgba(255, 255, 255, 0.8);
}

.peso-item-btn.added {
    background-color: #d4edda;
    border-color: #28a745;
}

.peso-item-btn i {
    color: #28a745;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
}

.peso-item-btn .peso-value {
    font-weight: 600;
    color: #333;
    position: relative;
    z-index: 2;
    line-height: 1.2;
}

.peso-item-btn .peso-count {
    font-weight: 300;
    color: #666;
    font-size: 0.68em;
    position: relative;
    z-index: 2;
    line-height: 1.2;
}

.peso-item-info {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.peso-item-info .peso-value {
    font-weight: 600;
    color: #666;
}

.peso-item-info .peso-count {
    font-weight: 500;
    color: #999;
    font-size: 0.8em;
}

/* Toast Message */
.toast-message {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background-color: #dc3545;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    max-width: 90%;
    text-align: center;
}

.toast-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .toast-message {
        top: 0.75rem;
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
        max-width: calc(100% - 2rem);
    }
}

.no-items {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
}

.occasioni-intro {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Responsive per catalogo */
@media (min-width: 769px) and (max-width: 1024px) {
    .catalog-cards-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .catalog-container {
        max-width: 100%;
    }
    
    .catalog-cards-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .gusto-card-image-container {
        width: 70px;
        height: 70px;
        min-width: 70px;
    }
    
    .gusto-card-body {
        padding: 0.625rem;
        padding-left: 0.38rem;
    }
    
    .gusto-card-name {
        font-size: 0.95rem;
    }
    
    .gusto-card-tipo {
        font-size: 0.8rem;
    }
    
    .gusto-card-count {
        padding: 0.625rem 0.75rem;
        min-width: 50px;
    }
    
    .count-value {
        font-size: 1.3rem;
    }
    
    .count-label {
        font-size: 0.7rem;
    }
    
    .detail-content {
        padding: 0.2rem 0.5rem;
    }
    
    .detail-section-header h4 {
        padding: 0;
        margin: 0;
    }
    
    .detail-section {
        margin-bottom: 0.5rem;
    }
    
    .detail-section-header {
        margin-bottom: 0.2rem;
        padding-bottom: 0.0rem;
    }
    
    .detail-section h4 {
        font-size: 0.85rem;
    }
    
    .detail-section p {
        font-size: 0.8rem;
    }
    
    .pesi-list {
        gap: 0.4rem;
    }
    
    .peso-item {
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .gusto-card-weights-bar {
        padding: 0.4rem 0;
    }
    
    .pesi-list-scrollable {
        padding: 0 0.5rem;
        gap: 0.4rem;
    }
}

/* Stili per la landing page */
.landing-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0.5rem 2rem 2rem 2rem;
}

.landing-section {
    margin-bottom: 4rem;
}

.landing-section h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    text-align: left;
}

.product-section {
    text-align: left;
    padding: 0.5rem 0 1rem 0;
    background: transparent;
    border-radius: 0;
    margin-bottom: 1.5rem;
    margin-top: -1rem;
}

.product-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.product-type-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-type-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid #333;
    padding-bottom: 0.4rem;
}

.product-type-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    margin: 0;
}

.lead-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 0.75rem;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.cta-text {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    margin-top: 0.75rem;
}

.product-actions {
    margin-top: 1rem;
}

.product-actions .btn-ricette {
    margin: 0;
}

.mission-section {
    padding: 2rem 0;
}

.mission-intro {
    font-size: 1.2rem;
    text-align: center;
    color: #666;
    margin-bottom: 3rem;
    font-style: italic;
}

.mission-goals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.goal-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.goal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.goal-card h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    border-bottom: 3px solid #333;
    padding-bottom: 0.5rem;
}

.goal-card p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 1rem;
}

.goal-card p:last-child {
    margin-bottom: 0;
}

.landing-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.landing-actions .btn-ricette {
    margin: 0;
}

/* Responsive per landing page */
@media (max-width: 768px) {
    .landing-content {
        padding: 1rem;
    }
    
    .landing-section h2 {
        font-size: 2rem;
    }
    
    .product-section {
        padding: 1rem;
    }
    
    .lead-text {
        font-size: 1.1rem;
    }
    
    .cta-text {
        font-size: 1rem;
    }
    
    .product-types {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin: 0.75rem 0;
    }
    
    .product-type-card {
        padding: 0.875rem;
    }
    
    .product-type-card h3 {
        font-size: 1.2rem;
    }
    
    .mission-goals {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .goal-card {
        padding: 1.5rem;
    }
    
    .goal-card h3 {
        font-size: 1.5rem;
    }
    
    .landing-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .landing-actions .btn-ricette {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

/* Popup Preview Ricetta - Finestra Modale */
.recipe-preview-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: auto;
}

.recipe-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    pointer-events: auto;
    z-index: 1;
}

.recipe-preview-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
    height: 100%;
    max-width: calc(100% - 2rem);
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    z-index: 2;
    overflow: hidden;
    pointer-events: auto;
}

.recipe-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f9f9f9;
    flex-shrink: 0;
}

.recipe-preview-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.recipe-preview-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    width: 32px;
    height: 32px;
}

.recipe-preview-close:hover {
    background-color: #e0e0e0;
    color: #333;
}

.recipe-preview-close:active {
    background-color: #d0d0d0;
}

.recipe-preview-body {
    padding: 0;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.recipe-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
    min-height: 0;
}

.recipe-preview-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin: 0 auto;
}

.recipe-preview-no-image {
    width: 100%;
    max-width: 300px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 8px;
    color: #999;
    font-size: 3rem;
    margin: 0 auto;
}

.recipe-preview-main-info {
    text-align: center;
}

.recipe-preview-main-info h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1rem 0;
}

.preview-recipe-meta {
    font-size: 0.9rem;
    color: #666;
    margin: 0.5rem 0;
}

.recipe-preview-nutrition-section {
    margin-top: 1rem;
}

.recipe-preview-nutrition-section h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1rem 0;
}

.nutrition-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.nutrition-table thead {
    background-color: #f5f5f5;
}

.nutrition-table th,
.nutrition-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.nutrition-table th {
    font-weight: 600;
    color: #333;
}

.nutrition-table td {
    color: #666;
}

.nutrition-table tbody tr:hover {
    background-color: #fafafa;
}

/* Stili per modalità iframe (popup) */
.iframe-mode .recipe-header {
    gap: 1rem;
    padding: 1rem;
    min-height: 140px;
    margin-bottom: 1rem;
}

/* Tutorial mano per prima card */
.tutorial-hand {
    position: absolute;
    z-index: 1000;
    font-size: 2.5rem;
    color: #333;
    pointer-events: none;
    opacity: 0.9;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, opacity 0.5s ease;
}

.tutorial-hand.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.tutorial-hand.clicking {
    animation: handClick 6.9s ease-in-out 1;
    animation-delay: 0.5s;
}

@keyframes handClick {
    /* Primo pulse (0-0.6s) */
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    4.35% {
        transform: translate(-50%, -50%) scale(0.85) translateY(5px);
    }
    8.7% {
        transform: translate(-50%, -50%) scale(1);
    }
    /* Pausa 1.5s (0.6-2.1s) */
    30.43% {
        transform: translate(-50%, -50%) scale(1);
    }
    /* Secondo pulse (2.1-2.7s) */
    30.44% {
        transform: translate(-50%, -50%) scale(1);
    }
    34.78% {
        transform: translate(-50%, -50%) scale(0.85) translateY(5px);
    }
    39.13% {
        transform: translate(-50%, -50%) scale(1);
    }
    /* Pausa 1.5s (2.7-4.2s) */
    60.87% {
        transform: translate(-50%, -50%) scale(1);
    }
    /* Terzo pulse (4.2-4.8s) */
    60.88% {
        transform: translate(-50%, -50%) scale(1);
    }
    65.22% {
        transform: translate(-50%, -50%) scale(0.85) translateY(5px);
    }
    69.57% {
        transform: translate(-50%, -50%) scale(1);
    }
    /* Pausa 1.5s */
    91.3% {
        transform: translate(-50%, -50%) scale(1);
    }
    /* Quarto pulse */
    91.31% {
        transform: translate(-50%, -50%) scale(1);
    }
    95.65% {
        transform: translate(-50%, -50%) scale(0.85) translateY(5px);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

@media (max-width: 768px) {
    .tutorial-hand {
        font-size: 2rem;
    }
}

.iframe-mode .recipe-image-container {
    min-width: 120px;
    width: 120px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iframe-mode .recipe-image {
    max-width: calc(120px - 1.5rem);
    max-height: calc(120px - 1.5rem);
}

.iframe-mode .recipe-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
}

.iframe-mode .recipe-name {
    font-size: 1.25rem;
}

.iframe-mode .recipe-meta {
    gap: 0.25rem;
}

.iframe-mode .meta-label {
    font-size: 0.8rem;
}

.iframe-mode .meta-value {
    font-size: 0.85rem;
}

.iframe-mode .meta-item {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.iframe-mode .meta-label {
    white-space: nowrap;
    flex-shrink: 0;
}

.iframe-mode .meta-value {
    white-space: nowrap;
    flex-shrink: 0;
}

.iframe-mode .nutrition-table {
    margin-top: 1rem;
}

/* Titolo rimosso - ora è dentro la tabella */

/* Responsive per popup ricetta */
@media (max-width: 768px) {
    .recipe-preview-popup {
        padding: 0.5rem;
    }
    
    .recipe-preview-content {
        max-width: calc(100% - 1rem);
        max-height: calc(100vh - 1rem);
    }
    
    .recipe-preview-header {
        padding: 0.75rem 1rem;
    }
    
    .recipe-preview-header h3 {
        font-size: 1.1rem;
    }
    
    .recipe-preview-close {
        font-size: 1.25rem;
        width: 28px;
        height: 28px;
    }
    
    .recipe-preview-body {
        padding: 0;
    }
    
    /* Stili iframe anche su mobile */
    .iframe-mode .recipe-header {
        gap: 0.75rem;
        padding: 0.75rem;
        min-height: 120px;
    }
    
    .iframe-mode .recipe-image-container {
        min-width: 100px;
        width: 100px;
        padding: 0.5rem;
    }
    
    .iframe-mode .recipe-image {
        max-width: calc(100px - 1rem);
        max-height: calc(100px - 1rem);
    }
    
    .iframe-mode .recipe-name {
        font-size: 1.1rem;
    }
    
    .iframe-mode .meta-item {
        flex-wrap: nowrap;
        white-space: nowrap;
    }
    
    .iframe-mode .meta-label {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .iframe-mode .meta-value {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* Rating stars */
.rating-stars-container {
    position: relative;
    margin-bottom: 0.5rem;
    display: inline-block;
    cursor: pointer;
    z-index: 10001;
}

.rating-stars {
    display: flex;
    gap: 0.2rem;
    font-size: 1rem;
}

.rating-stars .fa-star {
    color: #ddd;
    transition: color 0.2s ease;
}

.rating-stars .fa-star.star-filled {
    color: #ffc107;
}

.rating-stars .fa-star.star-empty {
    color: #ddd;
}

.star-partial-container {
    position: relative;
    display: inline-block;
    width: 1em;
    height: 1em;
    line-height: 1;
}

.star-partial-container .star-empty {
    position: relative;
    z-index: 1;
    display: block;
}

.star-partial-container .star-partial {
    position: absolute;
    top: 0;
    left: 0;
    color: #ffc107;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    clip-path: inset(0 50% 0 0);
}

.rating-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.8rem;
    background-color: #333;
    color: #fff;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    z-index: 10000;
}

.rating-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.rating-stars-container:hover .rating-tooltip,
.rating-stars-container.active .rating-tooltip {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .rating-stars {
        font-size: 0.9rem;
        gap: 0.15rem;
    }
    
    .rating-tooltip {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}

/* ============================================
   RUOTA DELLA FORTUNA - EDIZIONE LIMITATA
   ============================================ */

.edizione-limitata-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: 60vh;
    gap: 2rem;
}

.edizione-limitata-message {
    text-align: center;
    margin-bottom: 1rem;
}

.edizione-limitata-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.edizione-limitata-subtext {
    font-size: 1rem;
    color: #666;
    font-style: italic;
}

.spin-wheel-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 500px;
}

.spin-wheel-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    margin: 0 auto;
}

.spin-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    border: 8px solid #333;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    transform-origin: center;
    transition: transform 0s;
}

.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    box-sizing: border-box;
    overflow: hidden;
}

.wheel-segment span {
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.segment-1 {
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    transform-origin: bottom right;
}

.segment-1 span {
    transform: rotate(-45deg);
}

.segment-2 {
    top: 0;
    right: 0;
    background: linear-gradient(225deg, #4ecdc4, #44a08d);
    transform-origin: bottom left;
}

.segment-2 span {
    transform: rotate(45deg);
}

.segment-3 {
    bottom: 0;
    right: 0;
    background: linear-gradient(315deg, #ff6b6b, #ee5a6f);
    transform-origin: top left;
}

.segment-3 span {
    transform: rotate(135deg);
}

.segment-4 {
    bottom: 0;
    left: 0;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    transform-origin: top right;
}

.segment-4 span {
    transform: rotate(225deg);
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid #333;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.spin-wheel-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spin-wheel-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.spin-wheel-btn:active:not(:disabled) {
    transform: translateY(0);
}

.spin-wheel-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.spin-result {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    animation: resultPop 0.5s ease;
}

@keyframes resultPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Popup Immagine Bisio */
.bisio-image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: auto;
    animation: bisioPopupFadeIn 0.3s ease;
}

.bisio-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    pointer-events: auto;
    z-index: 1;
    animation: bisioOverlayFadeIn 0.3s ease;
}

.bisio-image-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    z-index: 2;
    overflow: hidden;
    pointer-events: auto;
    animation: bisioContentPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bisioPopupFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bisioOverlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bisioContentPop {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.bisio-image-popup.closing {
    animation: bisioPopupFadeOut 0.25s ease forwards;
}

.bisio-image-popup.closing .bisio-image-overlay {
    animation: bisioOverlayFadeOut 0.25s ease forwards;
}

.bisio-image-popup.closing .bisio-image-content {
    animation: bisioContentPopOut 0.25s ease forwards;
}

@keyframes bisioPopupFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes bisioOverlayFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes bisioContentPopOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.8);
        opacity: 0;
    }
}

/* Popup Codice Sconto */
.discount-code-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: auto;
    animation: bisioPopupFadeIn 0.3s ease;
}

.discount-code-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    pointer-events: auto;
    z-index: 1;
    animation: bisioOverlayFadeIn 0.3s ease;
}

.discount-code-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    z-index: 2;
    overflow: hidden;
    pointer-events: auto;
    animation: bisioContentPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.discount-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    flex-shrink: 0;
}

.discount-code-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.discount-code-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    width: 32px;
    height: 32px;
}

.discount-code-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.discount-code-close:active {
    background-color: rgba(255, 255, 255, 0.4);
}

.discount-code-body {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.discount-code-label {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    text-align: center;
}

.discount-code-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.25rem 1.75rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
}

.discount-code-text {
    font-size: 1.8rem;
    letter-spacing: 3px;
    font-family: monospace;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.discount-code-copy {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.discount-code-copy:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.discount-code-copy:active {
    transform: scale(0.95);
}

.discount-code-instruction {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
    text-align: center;
    line-height: 1.5;
}

.discount-code-popup.closing {
    animation: bisioPopupFadeOut 0.25s ease forwards;
}

.discount-code-popup.closing .discount-code-overlay {
    animation: bisioOverlayFadeOut 0.25s ease forwards;
}

.discount-code-popup.closing .discount-code-content {
    animation: bisioContentPopOut 0.25s ease forwards;
}

@media (max-width: 768px) {
    .discount-code-popup {
        padding: 0.5rem;
    }
    
    .discount-code-content {
        max-width: calc(100% - 1rem);
    }
    
    .discount-code-header {
        padding: 1.25rem 1rem 0.75rem 1rem;
    }
    
    .discount-code-header h3 {
        font-size: 1.25rem;
    }
    
    .discount-code-close {
        font-size: 1.25rem;
        width: 28px;
        height: 28px;
    }
    
    .discount-code-body {
        padding: 1.5rem 1rem;
        gap: 1.25rem;
    }
    
    .discount-code-label {
        font-size: 1rem;
    }
    
    .discount-code-box {
        padding: 1rem 1.25rem;
        gap: 0.75rem;
    }
    
    .discount-code-text {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }
    
    .discount-code-copy {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
    
    .discount-code-instruction {
        font-size: 0.85rem;
    }
}

.bisio-image-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f9f9f9;
    flex-shrink: 0;
}

.bisio-image-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.bisio-image-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    width: 32px;
    height: 32px;
}

.bisio-image-close:hover {
    background-color: #e0e0e0;
    color: #333;
}

.bisio-image-close:active {
    background-color: #d0d0d0;
}

.bisio-image-body {
    padding: 1.5rem;
    overflow: auto;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bisio-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 200px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .edizione-limitata-container {
        padding: 1.5rem 0.5rem;
        min-height: 50vh;
    }
    
    .edizione-limitata-text {
        font-size: 1rem;
    }
    
    .edizione-limitata-subtext {
        font-size: 0.9rem;
    }
    
    .spin-wheel-container {
        max-width: 300px;
    }
    
    .wheel-segment {
        font-size: 0.85rem;
        padding: 0.3rem;
    }
    
    .wheel-segment span {
        font-size: 0.85rem;
    }
    
    .spin-wheel-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .spin-result {
        font-size: 1rem;
        padding: 0.8rem;
    }
    
    .bisio-image-popup {
        padding: 0.5rem;
    }
    
    .bisio-image-content {
        max-width: calc(100% - 1rem);
        max-height: calc(100vh - 1rem);
    }
    
    .bisio-image-header {
        padding: 0.75rem 1rem;
    }
    
    .bisio-image-header h3 {
        font-size: 1.1rem;
    }
    
    .bisio-image-close {
        font-size: 1.25rem;
        width: 28px;
        height: 28px;
    }
    
    .bisio-image-body {
        padding: 1rem;
    }
    
    .bisio-image {
        max-height: calc(100vh - 150px);
    }
}

/* Spotlight Product Slider */
.spotlight-slider-container,
.spotlight-slider-container * {
    box-sizing: border-box;
}

.spotlight-slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 0;
}

.spotlight-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.spotlight-slider-btn {
    width: 36px;
    height: 36px;
    background: #27322f;
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 10;
    position: relative;
}

.spotlight-slider-btn:hover {
    background: #2d3a35;
    transform: scale(1.05);
}

.spotlight-slider-btn:active {
    transform: scale(0.95);
}

.spotlight-slider-track {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0;
    min-width: 0;
    user-select: none;
    position: relative;
}

.spotlight-slider-track::-webkit-scrollbar {
    display: none;
}

.spotlight-product-card {
    flex: 0 0 auto;
    flex-shrink: 0;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-font-smoothing: antialiased;
    pointer-events: auto;
}

.spotlight-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.spotlight-product-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.spotlight-crystal-meat-label {
    font-size: 0.875rem;
    color: #666;
    font-weight: 400;
    text-transform: lowercase;
    line-height: 12px;
    -webkit-font-smoothing: antialiased;
}

.spotlight-product-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #27322f;
    -webkit-font-smoothing: antialiased;
}

.spotlight-crystal-meat {
    color: #666;
    font-weight: normal;
    font-size: 0.875rem;
}

.spotlight-product-tipo {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.2rem;
    -webkit-font-smoothing: antialiased;
}

.spotlight-add-btn {
    margin-top: auto;
    background: #b9a182;
    color: #000;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 45px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    touch-action: manipulation;
}

.spotlight-add-btn i {
    font-size: 0.875rem;
}

.spotlight-add-btn:hover {
    background: #a8926f;
    transform: translateY(-1px);
}

.spotlight-add-btn:active {
    transform: translateY(0);
}

.spotlight-add-btn.added {
    background: #4caf50;
    color: #fff;
}

.spotlight-add-btn:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
}

.spotlight-add-btn:disabled:hover {
    background: #ccc;
    transform: none;
}

/* Desktop: comportamento controllato ma larghezza limitata */
@media (min-width: 769px) {
    .spotlight-slider-container {
        width: 100%;
        max-width: 100%;
        margin-bottom: 0;
        overflow: hidden;
    }
    
    .spotlight-slider-wrapper {
        gap: 0.8rem;
        width: calc(3 * 200px + 2 * 0.8rem + 2 * 36px + 2 * 0.8rem);
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        overflow: visible;
    }
    
    .spotlight-slider-btn {
        display: flex !important; /* Mantieni le frecce visibili su desktop */
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .spotlight-slider-track {
        gap: 0.8rem;
        min-width: 0;
        width: calc(3 * 200px + 2 * 0.8rem);
        flex: 0 0 calc(3 * 200px + 2 * 0.8rem);
        overflow: hidden;
        padding: 0.5rem 0;
    }
    
    .spotlight-product-card {
        flex: 0 0 auto !important;
        width: 200px !important;
        min-width: 200px !important;
        max-width: 200px !important;
        box-sizing: border-box;
    }
    
    .spotlight-product-image {
        height: 150px;
    }
}

@media (max-width: 768px) {
    .spotlight-slider-container {
        width: 100%;
        max-width: 100vw;
        margin-bottom: 0;
        overflow: hidden;
    }
    
    .spotlight-slider-wrapper {
        gap: 0;
        width: 100%;
        max-width: 100vw;
        min-width: 0;
        overflow: visible;
    }
    
    .spotlight-slider-btn {
        display: none;
    }
    
    .spotlight-slider-track {
        gap: 0.8rem;
        min-width: 0;
        width: 100vw;
        max-width: 100vw;
        flex: 0 0 100vw;
        overflow: hidden;
        padding: 0.5rem 0;
    }
    
    .spotlight-product-card {
        flex: 0 0 auto !important;
        width: calc((100vw - 100px) / 1.8) !important;
        min-width: calc((100vw - 100px) / 1.8) !important;
        max-width: calc((100vw - 100px) / 1.8) !important;
        box-sizing: border-box;
    }
    
    .spotlight-product-image {
        height: 120px;
    }
    

}