/* =============================================
   MENU PRODOTTI – Stili dedicati
   ============================================= */

/* ===== LAYOUT PRINCIPALE ===== */
.menu-main {
    display: flex;
    max-width: 1200px;
    margin: 40px auto 60px;
    padding: 0 20px;
    gap: 0;
    align-items: flex-start;
    min-height: 70vh;
}

/* ===== SIDEBAR ===== */
.menu-sidebar {
    width: 200px;
    flex-shrink: 0;
    padding-right: 24px;
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 14px;
}

.sidebar-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Pulsanti categoria */
.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Baloo 2', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 6px 10px;
    border-radius: 10px;
    width: 100%;
    text-align: left;
    transition: background 0.2s, color 0.2s;
}

.sidebar-btn:hover {
    background-color: rgba(223, 78, 139, 0.08);
    color: #df4e8b;
}

.sidebar-btn.active {
    background-color: rgba(223, 78, 139, 0.12);
    color: #df4e8b;
}

/* Filtri checkbox */
.sidebar-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Baloo 2', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    user-select: none;
}

.sidebar-filter:hover {
    background-color: rgba(223, 78, 139, 0.08);
    color: #df4e8b;
}

.sidebar-filter input[type="checkbox"] {
    display: none;
}

.sidebar-filter input[type="checkbox"]:checked + .filtro-icon {
    color: #df4e8b;
}

.sidebar-filter:has(input:checked) {
    background-color: rgba(223, 78, 139, 0.12);
    color: #df4e8b;
}

.sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: inherit;
}

/* ===== DIVISORE VERTICALE ===== */
.sidebar-divider {
    width: 2px;
    background-color: #df4e8b;
    align-self: stretch;
    min-height: 600px;
    flex-shrink: 0;
}

/* ===== GRIGLIA PRODOTTI ===== */
.prodotti-section {
    flex: 1;
    padding-left: 28px;
}

.prodotti-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ===== CARD PRODOTTO ===== */
.prodotto-card {
    border: 2px solid #df4e8b;
    border-radius: 20px;
    padding: 14px 14px 12px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: default;
}

.prodotto-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(223, 78, 139, 0.15);
}

/* Riga superiore: nome + cuore */
.prodotto-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.prodotto-nome {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    flex: 1;
}

.prodotto-cuore {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.prodotto-cuore:hover {
    transform: scale(1.2);
}

.prodotto-cuore img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.prodotto-cuore.preferito img {
    filter: brightness(0) saturate(100%) invert(30%) sepia(80%) saturate(500%) hue-rotate(300deg);
}

/* Immagine prodotto */
.prodotto-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.prodotto-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.prodotto-card:hover .prodotto-img {
    transform: scale(1.04);
}

/* L'immagine e il nome sono cliccabili → cursore pointer */
.prodotto-img-wrap,
.prodotto-nome {
    cursor: pointer;
}


/* Riga inferiore: prezzo + carrello */
.prodotto-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prodotto-prezzo {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
}

.prodotto-carrello {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    transition: transform 0.2s ease;
}

.prodotto-carrello:hover {
    transform: scale(1.15);
}

.prodotto-carrello img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

/* ===== NESSUN RISULTATO ===== */
.no-risultati {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ===== ANIMAZIONE HIDE/SHOW CARD ===== */
.prodotto-card.nascosto {
    display: none;
}

.prodotto-card.in-evidenza {
    animation: fadeIn 0.3s ease both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== NAV ACTIVE ===== */
.nav-active {
    color: #df4e8b !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.accordion-icon {
    display: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .menu-main {
        flex-direction: column;
        gap: 15px;
        margin: 15px auto 40px;
    }

    .menu-sidebar {
        width: 100%;
        padding-right: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .sidebar-section {
        margin-bottom: 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .sidebar-title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 1.1rem;
        margin-bottom: 0;
        padding: 12px 0;
        cursor: pointer;
    }

    .accordion-icon {
        display: block;
        width: 20px;
        height: 20px;
        color: var(--text-dark);
        transition: transform 0.3s ease;
    }

    .sidebar-section.open .accordion-icon {
        transform: rotate(180deg);
    }

    .sidebar-list {
        display: none; /* Lists hidden on mobile to show accordion headers */
        padding-bottom: 15px;
    }

    .sidebar-section.open .sidebar-list {
        display: flex;
    }

    .sidebar-divider {
        display: none;
    }

    .prodotti-section {
        padding-left: 0;
        width: 100%;
        margin-top: 15px;
    }

    .prodotti-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .prodotto-card {
        border-radius: 25px;
        padding: 15px;
    }
}
