:root {
    /* Palette colori Coral Plant */
    --olivine: #91B05A;
    --olivine-light: #bccf9c;
    --olivine-dark: #748f45;

    --beige: #D2DAC5;
    --beige-light: #f6f7f3;
    --beige-dark: #aab991;

    --asparagus: #7EA238;
    --asparagus-light: #b6d37d;
    --asparagus-dark: #4d6222;

    --white: #FFFFFF;
    --white-dark: #f0f0f0;

    --fern-green: #557E34;
    --fern-green-light: #75ae47;
    --fern-green-dark: #334c1f;

    --text-dark: #2c3e50;
    --text-light: #546e7a;

    /* Variabili funzionali */
    --primary-color: var(--asparagus);
    --primary-dark: var(--asparagus-dark);
    --primary-light: var(--asparagus-light);
    --secondary-color: var(--olivine);
    --secondary-light: var(--olivine-light);
    --secondary-dark: var(--olivine-dark);
    --background: var(--white);
    --background-card: var(--white);
    --background-sidebar: var(--beige-light);
    --gray-light: var(--beige);
    --accent-color: var(--fern-green);
    --accent-light: var(--fern-green-light);

    /* Ombre e raggi bordi */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    --sidebar-width: 280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    background-image: linear-gradient(to bottom, var(--white) 0%, var(--beige-light) 100%);
    background-attachment: fixed;
    background-size: 100% 100%;
}

/* Navigazione */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 15px 30px;
    z-index: 1000;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.nav-scrolled {
    box-shadow: var(--shadow-lg);
}

.logo {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 1.3rem;
    color: var(--accent-color);
}

.nav-hidden {
    transform: translateY(-100%);
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Main Content */
.main-container {
    display: flex;
    margin-top: 80px;
    min-height: calc(100vh - 80px - 200px);
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px 80px 15px;
    position: relative;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, var(--beige-light) 0%, var(--beige) 100%);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    height: auto;
    max-height: calc(100vh - 140px);
    position: sticky;
    top: 120px;
    overflow-y: auto;
    transition: var(--transition);
    margin-right: 24px;
    border-left: 4px solid var(--olivine);
    align-self: flex-start;
    z-index: 5;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--beige-light);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

.sidebar h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--beige-dark);
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}

.sidebar h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 0;
}

.filter-group {
    margin-bottom: 16px;
}

/* Miglioramento delle aree cliccabili nella sidebar */
.filter-category {
    font-weight: 600;
    cursor: pointer;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dark);
    transition: var(--transition);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.7);
    position: relative;
    text-decoration: none;
}

.filter-category:hover,
.filter-category.active {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
}

.filter-category::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.filter-category:hover::after,
.filter-category.active::after {
    width: calc(100% - 40px);
}

.filter-category-text {
    flex: 1;
}

.filter-icon {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.filter-icon.expanded {
    transform: rotate(90deg);
}

.filter-items {
    list-style: none;
    margin-left: 12px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.filter-items.expanded {
    max-height: 1000px;
}

.filter-item {
    padding: 8px 12px 8px 15px;
    margin-left: 8px;
    border-left: 2px solid var(--beige-dark);
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-item:hover,
.filter-item.active {
    border-left-color: var(--primary-color);
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.8);
}

.filter-item-text {
    color: var(--text-light);
    display: block;
    transition: var(--transition);
    font-size: 0.95rem;
}

.filter-item:hover .filter-item-text,
.filter-item.active .filter-item-text {
    color: var(--primary-color);
    font-weight: 600;
}

/* Migliora l'effetto per il pulsante "Visualizza catalogo completo" */
.view-all-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: var(--secondary-light);
    color: var(--accent-color);
    margin-bottom: 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-all-filters:hover,
.view-all-filters.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(126, 162, 56, 0.3);
}

.reset-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--white);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 10px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.reset-filters:hover {
    background: var(--secondary-light);
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Products Container */
.products-container {
    flex: 1;
    padding: 20px 0 40px 0;
    min-height: 300px;
}

.products-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
    width: 100%;
}

.products-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.products-title {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    display: inline-block;
    position: relative;
}

.products-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding-top: 10px;
}

/* Card più vivaci - stile aggiornato */
.product-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--beige);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.product-card.slide-up {
    animation: slideUp 0.5s ease forwards;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(to bottom, rgba(143, 188, 91, 0.15) 0%, rgba(46, 204, 113, 0.05) 100%);
    transition: height 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(85, 126, 52, 0.2);
    border-color: var(--olivine);
}

.product-card:hover::before {
    height: 100%;
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-image-container {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, var(--white) 0%, var(--beige-light) 100%);
    position: relative;
    z-index: 2;
}

.product-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--accent-color);
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
}

.product-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.product-card:hover .product-title::after {
    width: 100%;
}

.product-card:hover .product-title {
    color: var(--primary-color);
}

.product-category {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-category i {
    color: var(--secondary-color);
    font-size: 0.8rem;
}

.product-description {
    color: var(--text-light);
    margin-bottom: 15px;
    flex-grow: 1;
    line-height: 1.6;
    position: relative;
    padding-left: 10px;
    border-left: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.product-card:hover .product-description {
    border-left-color: var(--olivine-light);
    padding-left: 12px;
}

.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    background: var(--secondary-light);
    color: var(--fern-green-dark);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.product-card:hover .product-badge {
    transform: translateY(-3px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.product-badge.featured {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.product-badge i {
    margin-right: 4px;
    font-size: 0.8rem;
}

/* Nuovo bottone "Scopri di più" */
.product-action {
    margin-top: auto;
    display: flex;
    justify-content: center;
    padding-top: 10px;
}

.view-details-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 25px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0.9;
}

.product-card:hover .view-details-btn {
    opacity: 1;
    transform: translateY(-2px);
}

.view-details-btn:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(126, 162, 56, 0.3);
}

/* Stile migliorato per il messaggio "nessun prodotto trovato" */
.no-products {
    text-align: center;
    padding: 60px 30px;
    background: var(--beige-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 30px auto;
    border: 1px solid var(--beige);
    animation: fadeIn 0.5s ease;
}

.no-products h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.no-products p {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.back-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Stili per la modale dei prodotti */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1010;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

.product-modal.active {
    display: flex;
    opacity: 1;
}

/* Container della modale */
.modal-container {
    background: white;
    width: 90%;
    max-width: 1000px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.product-modal.active .modal-container {
    transform: translateY(0);
}

/* Header della modale */
.modal-header {
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--fern-green);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header h2 {
    color: white;
    font-size: 1.8rem;
    margin: 0;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Contenuto della modale con layout flessibile */
.modal-content {
    display: flex;
    flex-direction: row;
    max-height: calc(90vh - 80px);
}

/* Container immagine */
.modal-image-container {
    position: relative;
    overflow: hidden;
    width: 50%;
    max-height: calc(90vh - 80px);
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    min-height: 500px;
    object-fit: cover;
    transition: transform 0.5s ease;
    border: 12px solid white;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.modal-image-container:hover img {
    transform: scale(1.05);
}

/* Badge biologico sull'immagine */
.modal-image-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
}

/* Dettagli prodotto */
.modal-details {
    padding: 25px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f9f9f9 0%, #f2f2f2 100%);
    flex: 1;
}

/* Righe di informazioni */
.modal-info-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.info-label {
    font-weight: 600;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100px;
    flex-shrink: 0;
}

.info-label i {
    color: var(--primary-color);
}

.info-value {
    color: var(--text-dark);
    font-size: 1.05rem;
}

/* Container della descrizione */
.modal-description-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    margin-bottom: 20px;
}

/* Titolo sezione */
.modal-section-title {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-section-title i {
    color: var(--primary-color);
}

/* Descrizione del prodotto */
.modal-description {
    flex: 1;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--beige);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    line-height: 1.8;
    color: var(--text-dark);
    font-size: 1.05rem;
    overflow-y: auto;
}

/* Bottoni di azione */
.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.modal-action-btn,
.modal-close-btn {
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    flex: 1;
}

.modal-action-btn {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 10px rgba(126, 162, 56, 0.3);
}

.modal-action-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(126, 162, 56, 0.4);
}

.modal-close-btn {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--beige-dark);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.modal-close-btn:hover {
    background: var(--beige-light);
    border-color: var(--beige-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.08);
}

/* Animazioni per la modale */
@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-container>* {
    animation: slideInUp 0.5s ease forwards;
}

.modal-header {
    animation-delay: 0.1s;
}

.modal-image-container {
    animation-delay: 0.2s;
}

.modal-details {
    animation-delay: 0.3s;
}

/* Stile modal-open per bloccare lo scroll del body */
body.modal-open {
    overflow: hidden;
}

/* Miglioramenti di accessibilità */
.reset-filters:focus,
.view-all-filters:focus,
.filter-category:focus,
.filter-link:focus,
.view-details-btn:focus,
.back-btn:focus,
.modal-close:focus,
.modal-action-btn:focus,
.modal-close-btn:focus {
    outline: 3px solid rgba(126, 162, 56, 0.5);
    outline-offset: 2px;
}

/* Animazioni innovative per le card quando si seleziona una varietà */
@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(40px);
        filter: blur(5px);
    }
    70% {
        opacity: 1;
        transform: scale(1.03) translateY(-5px);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.product-card.filter-animation {
    animation: cardAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.products-grid.filtering .product-card:nth-child(3) { animation-delay: 0.15s; }
.products-grid.filtering .product-card:nth-child(4) { animation-delay: 0.2s; }
.products-grid.filtering .product-card:nth-child(5) { animation-delay: 0.25s; }
.products-grid.filtering .product-card:nth-child(6) { animation-delay: 0.3s; }
.products-grid.filtering .product-card:nth-child(7) { animation-delay: 0.35s; }
.products-grid.filtering .product-card:nth-child(8) { animation-delay: 0.4s; }
.products-grid.filtering .product-card:nth-child(9) { animation-delay: 0.45s; }
.products-grid.filtering .product-card:nth-child(10) { animation-delay: 0.5s; }
.products-grid.filtering .product-card:nth-child(11) { animation-delay: 0.55s; }
.products-grid.filtering .product-card:nth-child(12) { animation-delay: 0.6s; }
.products-grid.filtering .product-card:nth-child(13) { animation-delay: 0.65s; }
.products-grid.filtering .product-card:nth-child(14) { animation-delay: 0.7s; }
.products-grid.filtering .product-card:nth-child(15) { animation-delay: 0.75s; }
.products-grid.filtering .product-card:nth-child(16) { animation-delay: 0.8s; }
.products-grid.filtering .product-card:nth-child(17) { animation-delay: 0.85s; }
.products-grid.filtering .product-card:nth-child(18) { animation-delay: 0.9s; }
.products-grid.filtering .product-card:nth-child(19) { animation-delay: 0.95s; }
.products-grid.filtering .product-card:nth-child(20) { animation-delay: 1s; }

/* Effetto di scintillio per evidenziare i nuovi prodotti */
@keyframes sparkle {
    0%, 100% { box-shadow: 0 0 0 rgba(126, 162, 56, 0); }
    50% { box-shadow: 0 0 20px rgba(126, 162, 56, 0.5); }
}

.product-card.filter-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
                rgba(255, 255, 255, 0.4) 0%, 
                rgba(255, 255, 255, 0) 60%, 
                rgba(255, 255, 255, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 2;
    pointer-events: none;
    animation: sparkle 2s ease-in-out;
}

.product-card.filter-animation:hover::before {
    opacity: 1;
}

/* Animazioni per la pagina */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scrollbar personalizzata per la modale */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--beige-light);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Nasconde completamente il pulsante mobile-filter-toggle nella versione desktop */
.mobile-filter-toggle {
    display: none;
}

/* Stili per lo slider delle immagini nella modale */
.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slider-controls {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.slider-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
    border-color: white;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Container immagine con slider */
.modal-image-container {
    position: relative;
    overflow: hidden;
    width: 50%;
    max-height: calc(90vh - 80px);
}

.image-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.image-slider img {
    width: 100%;
    height: 100%;
    min-height: 500px;
    object-fit: cover;
    transition: transform 0.5s ease;
    border: 12px solid white;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.image-slider:hover img {
    transform: scale(1.05);
}

/* Frecce di navigazione */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
}

.prev-image {
    left: 20px;
}

.next-image {
    right: 20px;
}

.image-slider:hover .slider-nav {
    opacity: 1;
}

.slider-nav:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav:active {
    transform: translateY(-50%) scale(0.95);
}

/* Puntini di navigazione */
.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 5;
}

.slider-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.slider-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* Animazione per il cambio di immagine */
@keyframes fadeSlide {
    0% {
        opacity: 0.7;
        transform: translateX(10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.image-slider img.changing {
    animation: fadeSlide 0.3s ease forwards;
}

/* Versione mobile */
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
    }

    .modal-image-container {
        width: 100%;
        max-height: 300px;
    }

    .image-slider img {
        min-height: 250px;
        border-width: 6px;
    }

    .slider-nav {
        opacity: 1;
        width: 36px;
        height: 36px;
    }

    .prev-image {
        left: 10px;
    }

    .next-image {
        right: 10px;
    }

    .slider-controls {
        bottom: 10px;
    }
}

/* Migliorie per l'accessibilità */
.slider-nav:focus,
.slider-dot:focus {
    outline: 3px solid rgba(126, 162, 56, 0.5);
    outline-offset: 2px;
}

/* Stato "caricamento" per l'immagine */
.image-slider.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}