        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #f8f9fa;
            color: #333;
            line-height: 1.6;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 12px;
        }
        
        /* Header Animato - Variante 3: Shimmer */
        .header {
            background: linear-gradient(135deg, #FF6B35 0%, #FF8B35 100%);
            color: white;
            padding: 30px 20px;
            text-align: center;
            border-radius: 16px;
            margin-bottom: 12px;
            box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
            position: relative;
            overflow: hidden;
        }
        
        /* Effetto shimmer */
        .header::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -100%;
            width: 50%;
            height: 200%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            animation: shimmer 3s infinite;
        }
        
        @keyframes shimmer {
            0% { left: -100%; }
            100% { left: 200%; }
        }
        
        .header h1 {
            font-size: 2.5em;
            margin-bottom: 8px;
            font-weight: 800;
            letter-spacing: -0.5px;
            position: relative;
            z-index: 1;
            animation: fadeInDown 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
        }
        
        .header p {
            font-size: 1em;
            opacity: 0.95;
            font-weight: 500;
            letter-spacing: 0.3px;
            position: relative;
            z-index: 1;
            animation: fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
        }
        
        @keyframes fadeInDown {
            from { opacity: 0; transform: translateY(-30px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 0.95; transform: translateY(0); }
        }
        
        /* Filtri */
        .filters-wrapper {
            background: white;
            padding: 10px;
            border-radius: 12px;
            margin-bottom: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        }
        
        .filters-compact {
            display: grid;
            grid-template-columns: 1fr 1fr auto auto;
            gap: 8px;
            align-items: center;
        }
        
        .filter-item {
            position: relative;
        }
        
        .filter-icon {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 1.1em;
            pointer-events: none;
            z-index: 1;
        }
        
        .filter-item select {
            width: 100%;
            padding: 9px 10px 9px 34px;
            border: 1px solid #e8e8e8;
            border-radius: 10px;
            font-size: 0.85em;
            background: white;
            cursor: pointer;
            font-weight: 500;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 10px center;
        }
        
        .filter-item select:hover {
            border-color: #FF6B35;
            box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
            transform: translateY(-1px);
        }
        
        .mese-anno-wrapper {
            display: flex;
            gap: 6px;
            align-items: center;
        }
        
        .mese-control, .anno-control {
            display: flex;
            gap: 4px;
            align-items: center;
            background: #f9fafb;
            padding: 4px 8px;
            border-radius: 10px;
        }
        
        .filter-arrow {
            background: white;
            border: 1px solid #e8e8e8;
            width: 28px;
            height: 28px;
            border-radius: 7px;
            cursor: pointer;
            font-size: 1.1em;
            font-weight: bold;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .filter-arrow:hover {
            background: #FF6B35;
            color: white;
            border-color: #FF6B35;
        }
        
        .mese-display, .anno-display {
            font-weight: 600;
            font-size: 0.85em;
            text-align: center;
            color: #1e293b;
        }
        
        .mese-display {
            min-width: 85px;
        }
        
        .anno-display {
            min-width: 38px;
        }
        
        .buttons-wrapper {
            display: flex;
            gap: 6px;
        }
        
        .filter-apply, .filter-reset {
            padding: 9px 12px;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.8em;
            transition: all 0.3s;
            white-space: nowrap;
        }
        
        .filter-apply {
            background: linear-gradient(135deg, #FF6B35 0%, #FF8B35 100%);
            color: white;
            box-shadow: 0 2px 6px rgba(255, 107, 53, 0.2);
        }
        
        .filter-apply:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(255, 107, 53, 0.3);
        }
        
        .filter-reset {
            background: #f5f5f5;
            color: #666;
        }
        
        .filter-reset:hover {
            background: #e8e8e8;
        }
        
        /* Results */
        .results-bar {
            padding: 8px 0;
            margin-bottom: 12px;
            text-align: center;
        }
        
        .results-count {
            font-size: 0.9em;
            color: #666;
            background: #f5f5f5;
            padding: 6px 14px;
            border-radius: 20px;
            display: inline-block;
            font-weight: 600;
        }
        
        .results-count strong {
            color: #FF6B35;
            font-weight: 700;
        }
        
        /* Grid */
        .mercatini-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 18px;
        }
        
        /* Card */
        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .mercatino-card {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 2px 12px rgba(0,0,0,0.08);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            animation: fadeInUp 0.5s ease forwards;
        }
        
        .mercatino-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 12px 28px rgba(0,0,0,0.15);
        }
        
        .mercatino-card:active {
            transform: translateY(-4px) scale(0.98);
            transition: all 0.1s;
        }
        
        /* Bordo evidenza - colore dinamico via inline style */
        .mercatino-card.card-featured {
            border: 3px solid var(--featured-color, #FFD700);
            box-shadow: 
                0 2px 12px rgba(0,0,0,0.08),
                0 0 20px var(--featured-glow, rgba(255, 215, 0, 0.5)),
                0 0 35px var(--featured-glow, rgba(255, 215, 0, 0.4)),
                0 0 50px var(--featured-glow, rgba(255, 215, 0, 0.3));
            will-change: box-shadow;
            animation: neonGlowCard 2s ease-in-out infinite;
            position: relative;
        }
        
        .mercatino-card.card-featured:hover {
            box-shadow: 
                0 12px 28px rgba(0,0,0,0.15),
                0 0 25px var(--featured-glow, rgba(255, 215, 0, 0.7)),
                0 0 45px var(--featured-glow, rgba(255, 215, 0, 0.6)),
                0 0 65px var(--featured-glow, rgba(255, 215, 0, 0.5));
            animation: neonGlowCardHover 1.2s ease-in-out infinite;
        }
        
        @keyframes neonGlowCard {
            0%, 100% {
                box-shadow: 
                    0 2px 12px rgba(0,0,0,0.08),
                    0 0 20px var(--featured-glow, rgba(255, 215, 0, 0.5)),
                    0 0 35px var(--featured-glow, rgba(255, 215, 0, 0.4)),
                    0 0 50px var(--featured-glow, rgba(255, 215, 0, 0.3));
            }
            50% {
                box-shadow: 
                    0 2px 12px rgba(0,0,0,0.08),
                    0 0 30px var(--featured-glow, rgba(255, 215, 0, 0.7)),
                    0 0 50px var(--featured-glow, rgba(255, 215, 0, 0.6)),
                    0 0 70px var(--featured-glow, rgba(255, 215, 0, 0.5));
            }
        }
        
        @keyframes neonGlowCardHover {
            0%, 100% {
                box-shadow: 
                    0 12px 28px rgba(0,0,0,0.15),
                    0 0 25px var(--featured-glow, rgba(255, 215, 0, 0.7)),
                    0 0 45px var(--featured-glow, rgba(255, 215, 0, 0.6)),
                    0 0 65px var(--featured-glow, rgba(255, 215, 0, 0.5));
            }
            50% {
                box-shadow: 
                    0 12px 28px rgba(0,0,0,0.15),
                    0 0 35px var(--featured-glow, rgba(255, 215, 0, 0.8)),
                    0 0 60px var(--featured-glow, rgba(255, 215, 0, 0.7)),
                    0 0 85px var(--featured-glow, rgba(255, 215, 0, 0.6));
            }
        }
        
        /* Disabilita animazione per utenti con motion sickness */
        @media (prefers-reduced-motion: reduce) {
            .mercatino-card.card-featured {
                animation: none;
                box-shadow: 
                    0 2px 12px rgba(0,0,0,0.08),
                    0 0 25px var(--featured-glow, rgba(255, 215, 0, 0.6));
            }
            
            .mercatino-card.card-featured:hover {
                animation: none;
                box-shadow: 
                    0 12px 28px rgba(0,0,0,0.15),
                    0 0 35px var(--featured-glow, rgba(255, 215, 0, 0.7));
            }
        }
        
        /* Disabilita animazione per utenti sensibili al movimento */
        @media (prefers-reduced-motion: reduce) {
            .mercatino-card.card-featured {
                animation: none;
                box-shadow: 
                    0 2px 12px rgba(0,0,0,0.08),
                    0 0 25px var(--featured-glow, rgba(255, 215, 0, 0.5));
            }
            .mercatino-card.card-featured:hover {
                animation: none;
                box-shadow: 
                    0 12px 28px rgba(0,0,0,0.15),
                    0 0 35px var(--featured-glow, rgba(255, 215, 0, 0.6));
            }
        }
        
        .card-image-wrapper {
            position: relative;
            height: 190px;
            overflow: hidden;
        }
        
        .card-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.4s;
        }
        
        .mercatino-card:hover .card-image {
            transform: scale(1.08);
        }
        
        .card-badge {
            position: absolute;
            top: 12px;
            left: 12px;
            background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
            color: #1a1a1a;
            padding: 6px 14px;
            border-radius: 8px;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.5px;
            z-index: 2;
            box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
            text-transform: uppercase;
        }
        
        .card-date-badge {
            position: absolute;
            top: 12px;
            right: 12px;
            background: rgba(255, 255, 255, 0.97);
            padding: 8px 12px;
            border-radius: 12px;
            backdrop-filter: blur(10px);
            text-align: center;
            min-width: 58px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
            z-index: 2;
        }
        
        .card-date-day {
            font-size: 1.5em;
            font-weight: 800;
            line-height: 1;
            color: #FF6B35;
        }
        
        .card-date-month {
            font-size: 0.7em;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: #666;
            margin-top: 2px;
            font-weight: 600;
        }
        
        /* Badge IN CORSO - Pulsante */
        .badge-live {
            position: absolute;
            top: 12px;
            left: 12px;
            background: #ef4444;
            color: white;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.5px;
            display: flex;
            align-items: center;
            gap: 6px;
            box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
            z-index: 3;
            animation: pulseBadge 2s infinite;
        }
        
        .badge-live::before {
            content: '';
            width: 8px;
            height: 8px;
            background: white;
            border-radius: 50%;
            animation: blinkDot 1.5s infinite;
        }
        
        @keyframes pulseBadge {
            0%, 100% { 
                transform: scale(1);
                box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
            }
            50% { 
                transform: scale(1.05);
                box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
            }
        }
        
        @keyframes blinkDot {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }
        
        /* Badge list view */
        .badge-live-list {
            top: 4px;
            left: 4px;
            font-size: 9px;
            padding: 4px 8px;
        }
        
        .badge-live-list::before {
            width: 6px;
            height: 6px;
        }
        
        .card-exhibitors-badge {
            position: absolute;
            bottom: 12px;
            left: 12px;
            background: rgba(255, 255, 255, 0.95);
            color: #1e293b;
            padding: 6px 12px;
            border-radius: 10px;
            font-size: 0.75em;
            font-weight: 700;
            backdrop-filter: blur(10px);
            z-index: 2;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }
        
        .card-content {
            padding: 16px;
        }
        
        .card-title {
            font-size: 1.1em;
            font-weight: 700;
            margin-bottom: 12px;
            color: #1e293b;
            line-height: 1.3;
            min-height: 2.6em;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .card-info {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-bottom: 14px;
        }
        
        .card-info-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.85em;
            color: #64748b;
        }
        
        .card-info-icon {
            font-size: 1.1em;
        }
        
        .card-button {
            width: 100%;
            padding: 11px;
            background: linear-gradient(135deg, #FF6B35 0%, #FF8B35 100%);
            color: white;
            border: none;
            border-radius: 10px;
            font-weight: 700;
            cursor: pointer;
            font-size: 0.9em;
            box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
            transition: all 0.3s;
        }
        
        .card-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 107, 53, 0.35);
        }
        
        /* POPUP (stesso del precedente) */
        .popup-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0, 0, 0, 0.75);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            padding: 20px;
            animation: fadeInOverlay 0.25s ease;
            backdrop-filter: blur(4px);
        }
        .popup-overlay.active { display: flex; }
        
        @keyframes fadeInOverlay { 
            from { 
                opacity: 0; 
                backdrop-filter: blur(0px);
            } 
            to { 
                opacity: 1; 
                backdrop-filter: blur(4px);
            } 
        }
        
        .popup-container {
            background: white;
            border-radius: 20px;
            max-width: 900px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
            overflow-x: hidden;
            position: relative;
            animation: popupEnter 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        }
        
        @keyframes popupEnter {
            from { 
                opacity: 0; 
                transform: translateY(30px) scale(0.9);
            }
            to { 
                opacity: 1; 
                transform: translateY(0) scale(1);
            }
        }
        .popup-close {
            position: absolute;
            top: 20px; right: 20px;
            width: 44px; height: 44px;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            border: none;
            font-size: 1.6em;
            cursor: pointer;
            z-index: 10;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .popup-close:hover {
            background: #dc2626;
            transform: rotate(90deg) scale(1.1);
        }
        .popup-image-slider {
            position: relative;
            height: 400px;
            overflow: hidden;
            background: #f3f4f6;
        }
        .popup-main-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .slider-arrow {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 50px; height: 50px;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            border: none;
            font-size: 2em;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 5;
        }
        .slider-arrow:hover { background: rgba(0, 0, 0, 0.9); transform: translateY(-50%) scale(1.15); }
        .slider-arrow-left { left: 20px; }
        .slider-arrow-right { right: 20px; }
        .slider-dots {
            position: absolute;
            bottom: 20px; left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
            z-index: 5;
        }
        .slider-dot {
            width: 12px; height: 12px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.5);
            cursor: pointer;
            transition: all 0.3s;
        }
        .slider-dot.active {
            background: white;
            transform: scale(1.3);
            border: 2px solid #FF6B35;
        }
        .popup-title-section {
            padding: 25px 30px;
            border-bottom: 2px solid #e5e7eb;
        }
        .popup-title {
            font-size: 2em;
            font-weight: 800;
            margin-bottom: 12px;
            color: #1e293b;
            word-wrap: break-word;
            overflow-wrap: break-word;
            white-space: normal;
            max-width: 100%;
        }
        .popup-badges { display: flex; gap: 10px; flex-wrap: wrap; }
        .popup-badge {
            padding: 8px 16px;
            border-radius: 25px;
            font-size: 0.85em;
            font-weight: 700;
        }
        .popup-badge-featured {
            background: rgba(255, 107, 53, 0.12);
            color: #FF6B35;
        }
        .popup-badge-exhibitors {
            background: rgba(59, 130, 246, 0.12);
            color: #3b82f6;
        }
        .popup-content { 
            padding: 30px;
            overflow-wrap: break-word;
            word-wrap: break-word;
        }
        .popup-section { margin-bottom: 35px; }
        .popup-section-title {
            font-size: 1.3em;
            font-weight: 700;
            margin-bottom: 18px;
            color: #1e293b;
            padding-bottom: 12px;
            border-bottom: 3px solid #e5e7eb;
        }
        .info-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 18px;
        }
        .info-item {
            background: #f9fafb;
            padding: 16px;
            border-radius: 12px;
            border-left: 4px solid #FF6B35;
        }
        .info-label {
            font-size: 0.8em;
            color: #64748b;
            font-weight: 700;
            margin-bottom: 6px;
            text-transform: uppercase;
        }
        .info-value {
            font-size: 1.05em;
            color: #1e293b;
            font-weight: 600;
        }
        .date-list { display: flex; flex-direction: column; gap: 14px; }
        .date-item {
            background: linear-gradient(135deg, #fff5f0 0%, #fff 100%);
            padding: 18px;
            border-radius: 12px;
            border-left: 5px solid #FF6B35;
            transition: all 0.3s;
        }
        .date-item:hover {
            transform: translateX(5px);
            box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
        }
        .date-item-date {
            font-size: 1.05em;
            color: #1e293b;
            margin-bottom: 6px;
            font-weight: 600;
        }
        .date-item-time {
            font-size: 0.9em;
            color: #64748b;
        }
        .popup-description {
            line-height: 1.8;
            color: #475569;
            font-size: 1.05em;
            overflow-wrap: break-word;
            word-wrap: break-word;
            hyphens: auto;
        }
        .popup-actions {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            margin-top: 30px;
            padding-top: 30px;
            border-top: 3px solid #e5e7eb;
        }
        .popup-button {
            flex: 1;
            min-width: 220px;
            padding: 16px 24px;
            border-radius: 12px;
            text-decoration: none;
            text-align: center;
            font-weight: 700;
            font-size: 1em;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
        .popup-button-primary {
            background: linear-gradient(135deg, #FF6B35 0%, #FF8B35 100%);
            color: white;
            box-shadow: 0 4px 15px rgba(255, 107, 53, 0.25);
        }
        .popup-button-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(255, 107, 53, 0.35);
        }
        .popup-button-secondary {
            background: white;
            color: #FF6B35;
            border: 3px solid #FF6B35;
        }
        .popup-button-secondary:hover {
            background: #FF6B35;
            color: white;
            transform: translateY(-3px);
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .container { padding: 8px; }
            .header { padding: 24px 16px; margin-bottom: 10px; }
            .header h1 { font-size: 1.8em; }
            .header p { font-size: 0.85em; }
            .filters-wrapper { padding: 8px; margin-bottom: 8px; }
            .filters-compact { grid-template-columns: 1fr; gap: 6px; }
            .mese-anno-wrapper { justify-content: space-between; width: 100%; }
            .buttons-wrapper { width: 100%; }
            .filter-apply, .filter-reset { flex: 1; padding: 8px 10px; font-size: 0.75em; }
            .results-bar { padding: 6px 0; margin-bottom: 8px; }
            .mercatini-grid { grid-template-columns: 1fr; gap: 12px; }
            .card-image-wrapper { height: 170px; }
            .card-content { padding: 14px; }
            .card-title { font-size: 1em; margin-bottom: 10px; }
            .popup-image-slider { height: 220px; }
            .popup-title { font-size: 1.4em; }
            .popup-title-section, .popup-content { padding: 16px; }
            .popup-section { margin-bottom: 20px; }
            .popup-section-title { font-size: 1.1em; margin-bottom: 12px; }
            .info-grid { grid-template-columns: 1fr; gap: 12px; }
            .info-item { padding: 12px; }
            .date-list { gap: 10px; }
            .date-item { padding: 14px; }
            .popup-actions { flex-direction: column; gap: 10px; }
            .popup-button { min-width: 100%; padding: 14px; font-size: 0.95em; }
        }

        /* Fix text overflow per mobile - NON spezza parole normali */
        .popup-title,
        .popup-description,
        .popup-description p,
        .info-value,
        .date-item-date,
        .date-item-time,
        .date-item-note {
            overflow-wrap: break-word;
            word-wrap: break-word;
        }

        /* FIX DESCRIZIONE MOBILE - FORZA IL WRAP */
        .popup-description,
        .popup-description * {
            max-width: 100% !important;
            word-wrap: break-word !important;
            overflow-wrap: break-word !important;
            white-space: normal !important;
            box-sizing: border-box !important;
        }

        /* ===== SISTEMA RATING MINIMALE ===== */
        .rating-section {
            background: #f9fafb;
            padding: 12px 16px;
            border-radius: 10px;
            border-left: 3px solid #FFB800;
            margin-bottom: 20px;
        }
        
        .rating-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
        }
        
        .rating-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .rating-average {
            font-size: 1.5em;
            font-weight: 800;
            color: #FF6B35;
            line-height: 1;
        }
        
        .rating-stars-small {
            display: flex;
            gap: 1px;
            font-size: 0.9em;
            color: #FFB800;
        }
        
        .rating-count {
            font-size: 0.7em;
            color: #64748b;
            font-weight: 600;
        }
        
        .rating-interactive {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }
        
        .rating-label {
            font-size: 0.8em;
            font-weight: 600;
            color: #64748b;
            white-space: nowrap;
        }
        
        .stars-container {
            display: flex;
            gap: 4px;
        }
        
        .star-button {
            background: none;
            border: none;
            font-size: 1.5em;
            cursor: pointer;
            transition: all 0.2s;
            color: #e5e7eb;
            padding: 0;
            line-height: 1;
        }
        
        .star-button:hover {
            transform: scale(1.1);
        }
        
        .star-button.active {
            color: #FFB800;
        }
        
        .star-button.hover {
            color: #FFB800;
        }
        
        .star-button:disabled {
            cursor: not-allowed;
            opacity: 0.5;
        }
        
        .rating-message {
            font-size: 0.75em;
            color: #059669;
            font-weight: 600;
            text-align: right;
            margin-top: 6px;
        }
        
        /* Rating mobile */
        @media (max-width: 768px) {
            .rating-section { padding: 10px 14px; margin-bottom: 16px; }
            .rating-average { font-size: 1.3em; }
            .star-button { font-size: 1.8em; }
            .rating-label { font-size: 0.75em; }
            .rating-interactive { gap: 8px; }
        }

/* ============================================
   BANNER PUBBLICITARI
   ============================================ */

.mercatini-banner-container {
    position: relative;
    width: 100%;
    max-width: 970px;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.mercatini-banner-item {
    display: none;
    width: 100%;
    position: relative;
}

.mercatini-banner-item.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.mercatini-banner-link {
    display: block;
    width: 100%;
    text-decoration: none;
    transition: transform 0.3s;
}

.mercatini-banner-link:hover {
    transform: scale(1.02);
}

.mercatini-banner-image {
    width: 100%;
    height: auto;
    display: block;
}

.mercatini-banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 107, 53, 0.7);
    cursor: pointer;
    transition: all 0.3s;
}

.banner-dot:hover {
    background: rgba(255, 107, 53, 0.8);
    transform: scale(1.2);
}

.banner-dot.active {
    background: #FF6B35;
    transform: scale(1.3);
}

/* Responsive Mobile - IMPORTANTE! */
@media (max-width: 768px) {
    .mercatini-banner-container {
        margin: 15px 10px;
        border-radius: 8px;
        max-width: 100%;
    }
    
    /* Banner mobile usa dimensioni ridotte */
    .mercatini-banner-image {
        max-height: 100px; /* Limita altezza su mobile */
        object-fit: cover;
    }
    
    .mercatini-banner-dots {
        bottom: 5px;
        gap: 6px;
    }
    
    .banner-dot {
        width: 8px;
        height: 8px;
    }
    
    /* Touch-friendly - area tap minima 44x44px */
    .mercatini-banner-link {
        min-height: 44px;
    }
    
    /* Rimuovi hover effect su mobile (touch) */
    .mercatini-banner-link:hover {
        transform: none;
    }
    
    /* Dots più grandi per touch */
    .banner-dot {
        width: 12px;
        height: 12px;
        padding: 4px; /* Aumenta area tap */
    }
}

/* Mobile molto piccolo (< 400px) */
@media (max-width: 400px) {
    .mercatini-banner-container {
        margin: 10px 5px;
    }
    
    .mercatini-banner-image {
        max-height: 80px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .mercatini-banner-container {
        max-width: 728px; /* Usa formato 728x90 su tablet */
    }
}

/* Stile per admin upload button */
.upload-banner-image {
    margin-left: 10px;
}


/* ============================================
   VIEW TOGGLE
   ============================================ */

.view-toggle-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.view-toggle {
    display: inline-flex;
    gap: 8px;
    background: #f3f4f6;
    padding: 6px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    color: #64748b;
    transition: all 0.3s;
}

.view-toggle-btn:hover {
    background: rgba(255, 107, 53, 0.1);
    color: #FF6B35;
}

.view-toggle-btn.active {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8B35 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.view-icon {
    font-size: 1.2em;
}

/* Mobile: nascondi label */
@media (max-width: 500px) {
    .view-label {
        display: none;
    }
    
    .view-toggle-btn {
        padding: 10px 16px;
    }
}

/* ============================================
   LIST VIEW
   ============================================ */

.mercatini-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.5s;
}

.mercatino-card-list {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s;
    cursor: pointer;
    display: grid;
    grid-template-columns: 180px 1fr auto;
    align-items: center;
    gap: 16px;
    animation: slideInLeft 0.5s ease both;
}

.mercatino-card-list:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.mercatino-card-list:active {
    transform: translateX(4px) scale(0.99);
    transition: all 0.1s;
}

/* Bordo evidenza LIST - colore dinamico */
.mercatino-card-list.list-featured {
    border: 3px solid var(--featured-color, #FFD700);
    box-shadow: 
        0 2px 12px rgba(0,0,0,0.08),
        0 0 18px var(--featured-glow, rgba(255, 215, 0, 0.5)),
        0 0 32px var(--featured-glow, rgba(255, 215, 0, 0.4)),
        0 0 46px var(--featured-glow, rgba(255, 215, 0, 0.3));
    will-change: box-shadow;
    animation: neonGlowList 2s ease-in-out infinite;
    position: relative;
}

.mercatino-card-list.list-featured:hover {
    box-shadow: 
        0 4px 20px rgba(0,0,0,0.12),
        0 0 24px var(--featured-glow, rgba(255, 215, 0, 0.7)),
        0 0 42px var(--featured-glow, rgba(255, 215, 0, 0.6)),
        0 0 60px var(--featured-glow, rgba(255, 215, 0, 0.5));
    animation: neonGlowListHover 1.2s ease-in-out infinite;
}

@keyframes neonGlowList {
    0%, 100% {
        box-shadow: 
            0 2px 12px rgba(0,0,0,0.08),
            0 0 18px var(--featured-glow, rgba(255, 215, 0, 0.5)),
            0 0 32px var(--featured-glow, rgba(255, 215, 0, 0.4)),
            0 0 46px var(--featured-glow, rgba(255, 215, 0, 0.3));
    }
    50% {
        box-shadow: 
            0 2px 12px rgba(0,0,0,0.08),
            0 0 28px var(--featured-glow, rgba(255, 215, 0, 0.7)),
            0 0 48px var(--featured-glow, rgba(255, 215, 0, 0.6)),
            0 0 66px var(--featured-glow, rgba(255, 215, 0, 0.5));
    }
}

@keyframes neonGlowListHover {
    0%, 100% {
        box-shadow: 
            0 4px 20px rgba(0,0,0,0.12),
            0 0 24px var(--featured-glow, rgba(255, 215, 0, 0.7)),
            0 0 42px var(--featured-glow, rgba(255, 215, 0, 0.6)),
            0 0 60px var(--featured-glow, rgba(255, 215, 0, 0.5));
    }
    50% {
        box-shadow: 
            0 4px 20px rgba(0,0,0,0.12),
            0 0 32px var(--featured-glow, rgba(255, 215, 0, 0.8)),
            0 0 56px var(--featured-glow, rgba(255, 215, 0, 0.7)),
            0 0 80px var(--featured-glow, rgba(255, 215, 0, 0.6));
    }
}

/* Disabilita animazione per utenti sensibili al movimento */
@media (prefers-reduced-motion: reduce) {
    .mercatino-card-list.list-featured {
        animation: none;
        box-shadow: 
            0 2px 12px rgba(0,0,0,0.08),
            0 0 22px var(--featured-glow, rgba(255, 215, 0, 0.6));
    }
    
    .mercatino-card-list.list-featured:hover {
        animation: none;
        box-shadow: 
            0 4px 20px rgba(0,0,0,0.12),
            0 0 32px var(--featured-glow, rgba(255, 215, 0, 0.7));
    }
}
            0 2px 12px rgba(0,0,0,0.08),
            0 0 20px var(--featured-glow, rgba(255, 215, 0, 0.5));
    }
    .mercatino-card-list.list-featured:hover {
        animation: none;
        box-shadow: 
            0 4px 20px rgba(0,0,0,0.12),
            0 0 30px var(--featured-glow, rgba(255, 215, 0, 0.6));
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.list-image-wrapper {
    width: 180px;
    height: 130px;
    position: relative;
    overflow: hidden;
}

.list-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.mercatino-card-list:hover .list-image {
    transform: scale(1.1);
}

.list-content {
    padding: 16px 0;
    flex: 1;
    min-width: 0; /* Fix overflow text */
}

/* List header con titolo + badge */
.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.list-title {
    font-size: 1.25em;
    font-weight: 700;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* Badge IN CORSO inline con titolo */
.badge-live-list-inline {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.badge-live-list-inline::before {
    width: 6px;
    height: 6px;
    gap: 4px;
}

.list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 10px;
}

.list-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.9em;
}

.list-meta-item strong {
    color: #1e293b;
    font-weight: 600;
}

.list-icon {
    font-size: 1.1em;
}

.list-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.list-badge {
    background: #FFF5F0;
    color: #FF6B35;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.list-badge.featured {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8B35 100%);
    color: white;
}

.list-actions {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-left: 2px solid #f3f4f6;
}

.list-exhibitors {
    text-align: center;
    background: #f8f9fa;
    padding: 10px 16px;
    border-radius: 10px;
    min-width: 100px;
}

.list-exhibitors strong {
    display: block;
    font-size: 1.5em;
    color: #FF6B35;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2px;
}

.list-exhibitors-label {
    font-size: 0.75em;
    color: #64748b;
    font-weight: 600;
}

.list-button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8B35 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    width: 100%;
}

.list-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Responsive List View - Mobile */
@media (max-width: 768px) {
    .mercatino-card-list {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .list-image-wrapper {
        width: 100%;
        height: 160px; /* Un po' più stretto come richiesto */
    }
    
    .list-content {
        padding: 16px;
    }
    
    .list-title {
        font-size: 1.1em;
        white-space: normal; /* Allow wrap on mobile */
    }
    
    .list-meta {
        gap: 10px;
    }
    
    .list-meta-item {
        font-size: 0.85em;
    }
    
    .list-actions {
        padding: 16px;
        flex-direction: row;
        border-left: none;
        border-top: 2px solid #f3f4f6;
        gap: 12px;
    }
    
    .list-exhibitors {
        flex: 1;
        min-width: auto;
    }
    
    .list-exhibitors strong {
        font-size: 1.3em;
    }
    
    .list-button {
        flex: 2;
    }
}

/* Mobile molto piccolo - ancora più stretto */
@media (max-width: 400px) {
    .list-image-wrapper {
        height: 140px; /* Più compatto */
    }
    
    .list-content {
        padding: 12px;
    }
    
    .list-title {
        font-size: 1em;
    }
    
    .list-meta-item {
        font-size: 0.8em;
    }
    
    .list-actions {
        padding: 12px;
    }
}

/* MOBILE COMPACT - Ottimizzazione spazio */
@media (max-width: 768px) {
    .header {
        padding: 20px 16px;
        margin-bottom: 8px;
    }
    
    .header h1 {
        font-size: 1.8em;
        margin-bottom: 6px;
    }
    
    .header p {
        font-size: 0.9em;
    }
    
    .filters-wrapper {
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .filtri-compact {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .filter-item select {
        padding: 10px 12px 10px 40px;
        font-size: 0.9em;
    }
    
    .mese-anno-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .buttons-wrapper {
        margin-top: 6px;
    }
    
    .container {
        padding: 8px;
    }
    
    .view-toggle-wrapper {
        padding: 8px;
    }
}


/* ============================================
   LUCIDE ICONS CONTAINERS
   ============================================ */

.icon-container {
    width: 32px;
    height: 32px;
    background: #FFF5F0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
}

.icon-container svg {
    width: 20px;
    height: 20px;
    stroke: #FF6B35;
}

/* Icon container nel testo (inline) */
.icon-inline {
    width: 28px;
    height: 28px;
    background: #FFF5F0;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    vertical-align: middle;
}

.icon-inline svg {
    width: 16px;
    height: 16px;
    stroke: #FF6B35;
}

/* Icon in badges */
.card-badge .icon-inline,
.list-badge .icon-inline,
.popup-badge .icon-inline {
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.3);
    margin-right: 6px;
}

.card-badge .icon-inline svg,
.list-badge .icon-inline svg,
.popup-badge .icon-inline svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

/* Icon in buttons */
.card-button .icon-inline,
.list-button .icon-inline,
.popup-button .icon-inline {
    margin-right: 8px;
    background: rgba(255, 255, 255, 0.2);
}

/* Hover effects */
.mercatino-card:hover .icon-container,
.mercatino-card-list:hover .icon-container {
    background: #FFE5D9;
    transform: scale(1.05);
}

/* Filter icons (più piccoli) */
.filter-icon {
    width: 24px;
    height: 24px;
    background: #FFF5F0;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.filter-icon svg {
    width: 16px;
    height: 16px;
    stroke: #FF6B35;
}

/* View toggle icons */
.view-icon svg {
    stroke: currentColor;
    width: 20px;
    height: 20px;
}


/* ============================================
   NUOVO DESIGN - FILTRI POPUP + MOBILE FIX
   ============================================ */

/* Nuovo wrapper filtri */
.filtri-wrapper-new {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

/* Pulsante Filtri */
.filter-trigger-button {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8B35 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.filter-trigger-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

/* Popup Filtri Overlay */
.filter-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.2s;
}

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

/* Popup Filtri */
.filter-popup {
    background: white;
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s;
}

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

.filter-popup-header {
    padding: 20px;
    border-bottom: 2px solid #F0F0F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-popup-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.filter-popup-close {
    background: #F5F5F5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-popup-close:hover {
    background: #E5E5E5;
    transform: rotate(90deg);
}

.filter-popup-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

.filter-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.filter-select:focus {
    outline: none;
    border-color: #FF6B35;
}

.filter-select:disabled {
    background: #F5F5F5;
    cursor: not-allowed;
}

.month-year-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #F8F8F8;
    border-radius: 10px;
}

.month-arrow {
    background: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.month-arrow:hover {
    background: #FF6B35;
    color: white;
}

.month-display {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.filter-popup-footer {
    padding: 16px 20px;
    border-top: 2px solid #F0F0F0;
    display: flex;
    gap: 12px;
}

.filter-popup-reset,
.filter-popup-apply {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-popup-reset {
    background: #F5F5F5;
    color: #64748b;
}

.filter-popup-reset:hover {
    background: #E5E5E5;
}

.filter-popup-apply {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8B35 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.filter-popup-apply:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

/* ============================================
   MOBILE - GRID VS LIST BEN DISTINTE
   ============================================ */

@media (max-width: 768px) {
    /* GRID VIEW - Card verticali compatte */
    .grid-view .card {
        background: white;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .grid-view .card-image-wrapper {
        height: 180px;
        position: relative;
    }
    
    .grid-view .card-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .grid-view .card-content {
        padding: 14px;
    }
    
    .grid-view .card-title {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .grid-view .card-info {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-bottom: 12px;
    }
    
    .grid-view .card-info-item {
        font-size: 13px;
        color: #64748b;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .grid-view .card-button {
        width: 100%;
        padding: 11px;
        background: linear-gradient(135deg, #FF6B35 0%, #FF8B35 100%);
        color: white;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        font-size: 14px;
    }
    
    /* LIST VIEW - Card orizzontali espanse */
    .list-view .list-item {
        background: white;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        display: flex;
        margin-bottom: 12px;
    }
    
    .list-view .list-image-wrapper {
        width: 120px;
        height: auto;
        flex-shrink: 0;
    }
    
    .list-view .list-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .list-view .list-content {
        flex: 1;
        padding: 14px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .list-view .list-title {
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .list-view .list-meta {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 10px;
    }
    
    .list-view .list-meta-item {
        font-size: 12px;
        color: #64748b;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .list-view .list-button {
        align-self: flex-start;
        padding: 8px 16px;
        background: #FF6B35;
        color: white;
        border: none;
        border-radius: 6px;
        font-weight: 600;
        font-size: 13px;
    }
}

/* ============================================
   FILTRI INLINE COMPATTI
   ============================================ */

.filtri-wrapper-compact {
    background: white;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.filtri-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    gap: 10px;
    align-items: center;
}

.filter-item {
    position: relative;
}

.filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: #FF6B35;
}

.filter-select:disabled {
    background: #F5F5F5;
    cursor: not-allowed;
}

.filter-month-year {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #F8F8F8;
    border-radius: 8px;
}

.month-arrow {
    background: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.month-arrow:hover {
    background: #FF6B35;
    color: white;
}

.month-display {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.filter-reset-btn {
    background: #64748b;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
}

.filter-reset-btn:hover {
    background: #475569;
    transform: rotate(180deg);
}

/* ============================================
   MOBILE - GRID VS LIST BEN DISTINTE
   ============================================ */

@media (max-width: 768px) {
    /* Filtri mobile - 2 colonne */
    .filtri-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .filter-month-year {
        grid-column: 1 / -1;
    }
    
    .filter-reset-btn {
        grid-column: 1 / -1;
        width: 100%;
        height: 42px;
    }
    
    /* GRID VIEW - Card verticali ben definite */
    .grid-view {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .grid-view .card {
        background: white;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .grid-view .card-image-wrapper {
        position: relative;
        width: 100%;
        padding-bottom: 75%; /* ratio 4:3 */
        overflow: hidden;
    }
    
    .grid-view .card-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .grid-view .card-content {
        padding: 12px;
    }
    
    .grid-view .card-title {
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 8px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .grid-view .card-info {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 10px;
    }
    
    .grid-view .card-info-item {
        font-size: 12px;
        color: #64748b;
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .grid-view .card-button {
        width: 100%;
        padding: 8px;
        background: linear-gradient(135deg, #FF6B35 0%, #FF8B35 100%);
        color: white;
        border: none;
        border-radius: 6px;
        font-weight: 600;
        font-size: 13px;
    }
    
    /* LIST VIEW - Card orizzontali ben diverse */
    .list-view {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .list-view .list-item {
        background: white;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        display: flex;
        flex-direction: row;
        height: 120px;
    }
    
    .list-view .list-image-wrapper {
        width: 120px;
        flex-shrink: 0;
    }
    
    .list-view .list-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .list-view .list-content {
        flex: 1;
        padding: 12px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-width: 0; /* Fix overflow */
    }
    
    .list-view .list-title {
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 6px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .list-view .list-meta {
        display: flex;
        flex-direction: column;
        gap: 3px;
        margin-bottom: 8px;
        flex: 1;
    }
    
    .list-view .list-meta-item {
        font-size: 11px;
        color: #64748b;
        display: flex;
        align-items: center;
        gap: 4px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .list-view .list-button {
        align-self: flex-start;
        padding: 6px 12px;
        background: #FF6B35;
        color: white;
        border: none;
        border-radius: 6px;
        font-weight: 600;
        font-size: 12px;
    }
}
/* ===================================
   FILTRI MOBILE COMPATTI v4
   =================================== */

.filtri-wrapper-mobile {
    background: white;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.filtri-row-1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 6px;
}

.filtri-row-2 {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 0;
}

.filter-select-mobile {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.filter-month-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #F8F8F8;
    border-radius: 8px;
}

.month-arrow-compact {
    background: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-display-compact {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.filter-reset-compact {
    background: #64748b;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.filter-advanced-trigger {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8B35 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-advanced-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.filter-advanced-popup {
    background: white;
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
}

.filter-advanced-header {
    padding: 20px;
    border-bottom: 2px solid #F0F0F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-advanced-close {
    background: #F5F5F5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-advanced-content {
    padding: 20px;
}

.filter-advanced-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: #F8F8F8;
    border-radius: 8px;
    cursor: pointer;
}

.filter-advanced-item input {
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

.filter-advanced-apply {
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    padding: 14px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8B35 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
}

/* ===================================
   POPUP SCHEDA COMPATTA
   =================================== */

.popup-header-compact {
    padding: 16px;
    background: white;
}

.popup-title-compact {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.popup-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.popup-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #64748b;
}

.popup-address-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.popup-address-text {
    flex: 1;
    font-size: 13px;
    color: #64748b;
}

.popup-nav-btn {
    padding: 8px 16px;
    background: #FF6B35;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.popup-next-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    padding: 8px 12px;
    background: #F8F8F8;
    border-radius: 6px;
}

.popup-section-compact {
    padding: 12px 16px;
    border-top: 1px solid #F0F0F0;
}

.popup-section-title-compact {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popup-dates-mini {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.popup-date-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #F8F8F8;
    border-radius: 6px;
    font-size: 13px;
}

.popup-dates-more {
    margin-top: 8px;
    padding: 8px;
    background: transparent;
    border: 2px solid #E0E0E0;
    border-radius: 6px;
    color: #64748b;
    font-weight: 600;
    font-size: 13px;
    width: 100%;
}

/* ===================================
   GRID VS LIST - ULTRA DIVERSI
   =================================== */

@media (max-width: 768px) {
    /* GRID - 2 colonne strette */
    .grid-view {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .grid-view .card {
        background: white;
        border-radius: 10px;
        overflow: hidden;
    }
    
    .grid-view .card-image-wrapper {
        position: relative;
        padding-bottom: 100%; /* 1:1 square */
    }
    
    .grid-view .card-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .grid-view .card-content {
        padding: 10px;
    }
    
    .grid-view .card-title {
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 6px;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .grid-view .card-info {
        display: flex;
        flex-direction: column;
        gap: 3px;
        margin-bottom: 8px;
    }
    
    .grid-view .card-info-item {
        font-size: 11px;
        color: #64748b;
    }
    
    .grid-view .card-button {
        width: 100%;
        padding: 7px;
        background: #FF6B35;
        color: white;
        border: none;
        border-radius: 5px;
        font-size: 12px;
        font-weight: 600;
    }
    
    /* LIST - 1 colonna larga */
    .list-view {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .list-view .list-item {
        background: white;
        border-radius: 12px;
        overflow: hidden;
        display: flex;
        height: 110px;
    }
    
    .list-view .list-image-wrapper {
        width: 110px;
        flex-shrink: 0;
    }
    
    .list-view .list-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .list-view .list-content {
        flex: 1;
        padding: 10px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .list-view .list-title {
        font-size: 14px;
        font-weight: 700;
        line-height: 1.2;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .list-view .list-meta {
        display: flex;
        flex-direction: column;
        gap: 3px;
        flex: 1;
    }
    
    .list-view .list-meta-item {
        font-size: 11px;
        color: #64748b;
    }
    
    .list-view .list-button {
        align-self: flex-start;
        padding: 6px 12px;
        background: #FF6B35;
        color: white;
        border: none;
        border-radius: 5px;
        font-size: 11px;
        font-weight: 600;
    }
}
/* ===================================
   POPUP COMPATTO - LAYOUT OTTIMIZZATO
   =================================== */

.popup-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 16px;
}

.popup-overlay-stats {
    display: flex;
    gap: 20px;
    align-items: center;
}

.popup-stat {
    display: flex;
    align-items: center;
    color: white;
    font-size: 14px;
}

.popup-stat-value {
    font-size: 24px;
    font-weight: 700;
    margin: 0 4px;
}

.popup-stat-label {
    font-size: 12px;
    opacity: 0.9;
}

.popup-title-compact {
    font-size: 22px;
    font-weight: 700;
    margin: 16px;
    margin-bottom: 12px;
}

.popup-address-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    margin-bottom: 12px;
}

.popup-address-text {
    flex: 1;
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
}

.popup-nav-btn-compact {
    padding: 6px 12px;
    background: #FF6B35;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.popup-section-compact {
    padding: 12px 16px;
    border-top: 1px solid #F0F0F0;
}

.popup-description-compact {
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
}

.popup-next-date-highlight {
    background: #FFF3E0;
    padding: 12px 16px;
    margin: 0;
    border-left: 4px solid #FF6B35;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.popup-section-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.popup-link {
    color: #FF6B35;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: block;
    padding: 8px 12px;
    background: #fff5f2;
    border-radius: 8px;
    border: 1px solid #ffe4dc;
    transition: all 0.2s;
}

.popup-link:hover {
    background: #FFE4DC;
    border-color: #FF6B35;
    transform: translateX(2px);
}

/* Bottone Sito Organizzatore */
.popup-organizer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.popup-organizer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
}

.popup-organizer-btn svg {
    flex-shrink: 0;
}

.popup-dates-mini {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.popup-date-mini-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #F8F8F8;
    border-radius: 6px;
    font-size: 13px;
}

.popup-date-mini-day {
    font-weight: 700;
    color: #FF6B35;
    min-width: 30px;
}

.popup-date-mini-date {
    flex: 1;
    color: #334155;
}

.popup-date-mini-time {
    color: #64748b;
    font-size: 12px;
}

.popup-dates-show-more {
    margin-top: 8px;
    padding: 8px;
    background: transparent;
    border: 2px solid #E0E0E0;
    border-radius: 6px;
    color: #64748b;
    font-weight: 600;
    font-size: 13px;
    width: 100%;
    cursor: pointer;
}

.popup-dates-show-more:hover {
    border-color: #FF6B35;
    color: #FF6B35;
}

/* ===================================
   MOBILE LIST FIX - PIÙ STRETTO
   =================================== */

@media (max-width: 480px) {
    /* LIST VIEW - Vera differenza */
    .list-view .mercatino-card-list {
        display: flex !important;
        flex-direction: row !important;
        height: 100px !important;
    }
    
    .list-view .list-image-wrapper {
        width: 100px !important;
        height: 100px !important;
        flex-shrink: 0 !important;
    }
    
    .list-view .list-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .list-view .list-content {
        flex: 1 !important;
        padding: 8px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
    
    .list-view .list-title {
        font-size: 13px !important;
        font-weight: 700 !important;
        margin-bottom: 4px !important;
        line-height: 1.2 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .list-view .list-meta {
        display: none !important; /* Nascondi meta su mobile list */
    }
    
    .list-view .list-badges {
        margin-bottom: 4px;
    }
    
    .list-view .list-actions {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .list-view .list-exhibitors {
        font-size: 11px;
    }
    
    .list-view .list-button {
        padding: 5px 10px !important;
        font-size: 11px !important;
    }
    
    /* GRID VIEW - Card verticali compatte */
    .grid-view {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .grid-view .card {
        background: white;
        border-radius: 10px;
        overflow: hidden;
    }
    
    .grid-view .card-image-wrapper {
        position: relative;
        padding-bottom: 100%;
    }
    
    .grid-view .card-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .grid-view .card-content {
        padding: 10px;
    }
    
    .grid-view .card-title {
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}
/* ===================================
   FIX OVERLAY - PIÙ LEGGIBILE
   =================================== */

.popup-image-slider {
    position: relative;
}

.popup-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 60%, transparent 100%);
    padding: 20px 16px;
    z-index: 10;
}

.popup-overlay-stats {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: flex-start;
}

.popup-stat {
    display: flex;
    align-items: center;
    color: white;
    background: rgba(0,0,0,0.4);
    padding: 8px 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.popup-stat svg {
    flex-shrink: 0;
}

.popup-stat-value {
    font-size: 20px;
    font-weight: 700;
    margin: 0 6px 0 4px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.popup-stat-label {
    font-size: 11px;
    opacity: 0.95;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* ===================================
   FIX MOBILE LIST - FORZA LAYOUT
   =================================== */

/* Rimuovo tutti gli stili list precedenti e ricreo da zero */

.mercatini-list {
    display: block;
    width: 100%;
}

.mercatino-card-list {
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.2s;
}

/* Desktop/Tablet - Layout compatto ottimizzato */
@media (min-width: 481px) {
    .mercatino-card-list {
        display: flex;
        flex-direction: row;
        height: 140px;
        overflow: hidden;
    }
    
    .mercatino-card-list .list-image-wrapper {
        width: 180px;
        height: 140px;
        flex-shrink: 0;
        position: relative;
        overflow: hidden;
    }
    
    .mercatino-card-list .list-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* DATA OVERLAY sulla foto - anche desktop */
    .mercatino-card-list .list-date-overlay {
        position: absolute;
        top: 8px;
        left: 8px;
        background: rgba(255, 107, 53, 0.95);
        color: white;
        padding: 5px 10px;
        border-radius: 6px;
        font-size: 11px;
        font-weight: 700;
        z-index: 2;
        backdrop-filter: blur(4px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    
    .mercatino-card-list .list-content {
        flex: 1;
        padding: 16px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-width: 0;
    }
    
    /* Titolo in alto */
    .mercatino-card-list .list-title {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 12px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Container per meta e actions */
    .mercatino-card-list .list-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
    }
    
    /* Meta a sinistra (luogo + ora + espositori in colonna) */
    .mercatino-card-list .list-meta {
        display: flex;
        flex-direction: column;
        gap: 6px;
        font-size: 13px;
        color: #64748b;
        flex: 1;
    }
    
    .mercatino-card-list .list-meta-item {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .mercatino-card-list .list-meta-item svg {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }
    
    /* Espositori dentro meta */
    .mercatino-card-list .list-exhibitors {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        color: #64748b;
    }
    
    .mercatino-card-list .list-exhibitors strong {
        font-size: 20px;
        font-weight: 700;
        color: #FF6B35;
    }
    
    /* Actions a destra - solo chevron */
    .mercatino-card-list .list-actions {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    
    /* Espositori in actions - nascondere su desktop */
    .mercatino-card-list .list-actions .list-exhibitors {
        display: none !important;
    }
    
    .mercatino-card-list .list-button {
        display: none;
    }
    
    /* Chevron centrato verticalmente */
    .mercatino-card-list .list-chevron {
        color: #94a3b8;
        font-size: 32px;
        line-height: 1;
        flex-shrink: 0;
    }
}

/* Mobile - Layout ORIZZONTALE NUOVO */
@media (max-width: 480px) {
    .mercatino-card-list {
        display: flex !important;
        flex-direction: row !important;
        min-height: auto !important;
        position: relative;
        margin-bottom: 8px !important;
    }
    
    /* Bordo evidenza più sottile mobile */
    .mercatino-card-list.list-featured {
        border: 2px solid var(--featured-color, #FFD700) !important;
    }
    
    /* Immagine RETTANGOLARE 100x90px */
    .mercatino-card-list .list-image-wrapper {
        width: 100px !important;
        height: 90px !important;
        flex-shrink: 0 !important;
        position: relative;
        overflow: hidden;
        border-radius: 8px;
    }
    
    .mercatino-card-list .list-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* DATA OVER FOTO - PIÙ PICCOLA */
    .mercatino-card-list .list-date-overlay {
        position: absolute;
        top: 4px;
        left: 4px;
        background: rgba(255, 107, 53, 0.95);
        color: white;
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 9px;
        font-weight: 700;
        z-index: 2;
        backdrop-filter: blur(4px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    
    /* Contenuto a destra - COMPATTO SMART */
    .mercatino-card-list .list-content {
        flex: 1 !important;
        padding: 8px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        gap: 3px !important;
        min-width: 0;
        min-height: 90px;
    }
    
    /* Titolo - 1 RIGA SOLO */
    .mercatino-card-list .list-header {
        gap: 6px !important;
    }
    
    .mercatino-card-list .list-title {
        font-size: 13px !important;
        font-weight: 700 !important;
        margin-bottom: 0 !important;
        line-height: 1.2 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #1e293b;
    }
    
    .badge-live-list-inline {
        font-size: 8px !important;
        padding: 3px 6px !important;
    }
    
    .badge-live-list-inline::before {
        width: 5px !important;
        height: 5px !important;
    }
    
    /* Meta info - STESSA RIGA */
    .mercatino-card-list .list-meta {
        display: flex !important;
        flex-direction: row !important;
        gap: 0 !important;
        font-size: 9px !important;
        color: #64748b !important;
        margin-bottom: 4px !important;
        flex: 1 !important;
    }
    
    .mercatino-card-list .list-meta-item {
        display: flex;
        align-items: center;
        gap: 2px;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .mercatino-card-list .list-meta-item svg {
        width: 11px;
        height: 11px;
        flex-shrink: 0;
    }
    
    .mercatino-card-list .list-meta-item span {
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* MOBILE: Nascondi wrapper list-bottom */
    .mercatino-card-list .list-bottom {
        display: contents !important;
    }
    
    /* Espositori dentro meta - nascondere */
    .mercatino-card-list .list-meta .list-exhibitors {
        display: none !important;
    }
    
    /* Actions - Bottom row */
    .mercatino-card-list .list-actions {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 6px;
        flex-shrink: 0;
    }
    
    /* Espositori - SOLO NUMERO */
    .mercatino-card-list .list-actions .list-exhibitors {
        display: flex !important;
    }
    
    .mercatino-card-list .list-exhibitors {
        display: flex;
        align-items: center;
        gap: 2px;
        font-size: 9px;
        color: #64748b;
    }
    
    .mercatino-card-list .list-exhibitors strong {
        font-size: 16px;
        font-weight: 700;
        color: #FF6B35;
    }
    
    /* Chevron PIÙ PICCOLO */
    .mercatino-card-list .list-chevron {
        color: #94a3b8;
        font-size: 22px;
        line-height: 1;
        flex-shrink: 0;
        font-weight: 300;
    }
}

/* Grid View - Invariato */
.mercatini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

@media (max-width: 768px) {
    .mercatini-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .mercatini-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ==========================================
   POPUP - PROSSIMA DATA BOX ARANCIONE
   ========================================== */
.popup-next-date-box {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8B35 100%);
    color: white;
    padding: 16px;
    border-radius: 12px;
    margin: 16px 0;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.popup-next-date-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.popup-next-date-value {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.popup-next-date-time {
    font-size: 14px;
    display: flex;
    align-items: center;
    opacity: 0.95;
}

/* ==========================================
   POPUP - PROSSIME DATE ESPANDI
   ========================================== */
.popup-dates-expand-btn {
    width: 100%;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}

.popup-dates-expand-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

/* ==========================================
   POPUP - BOTTONE CONDIVIDI
   ========================================== */
/* Sezione azioni: Condividi + Calendario */
.popup-actions-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.popup-action-button {
    padding: 14px 12px;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Bottone Condividi - Arancione */
.popup-share-button {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8B35 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.popup-share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.popup-share-button:active {
    transform: translateY(0) scale(0.98);
}

/* Bottone Calendario - Verde */
.popup-calendar-button {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.popup-calendar-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.popup-calendar-button:active {
    transform: translateY(0) scale(0.98);
}

/* Mobile - Bottoni in colonna */
@media (max-width: 480px) {
    .popup-actions-section {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .popup-action-button {
        font-size: 13px;
        padding: 12px;
    }
}

/* ==========================================
   LISTA - BADGE IN EVIDENZA
   ========================================== */
.list-badge-featured {
    position: absolute;
    top: 6px;
    right: 6px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a1a;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    text-transform: uppercase;
}

/* Desktop - badge più grande */
@media (min-width: 481px) {
    .list-badge-featured {
        top: 8px;
        right: 8px;
        padding: 5px 12px;
        font-size: 10px;
    }
}


/* ==========================================
   BANNER PUBBLICITARI
   ========================================== */
.banner-container {
    width: 100%;
    max-width: 1200px;
    margin: 12px auto;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.banner-link {
    display: block;
    width: 100%;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.banner-link:hover .banner-image {
    transform: scale(1.02);
}

.banner-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.banner-dot.active {
    background: white;
    transform: scale(1.3);
}

.banner-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .banner-container {
        margin: 12px 0;
        border-radius: 8px;
    }
    
    .banner-dots {
        bottom: 8px;
        gap: 6px;
    }
    
    .banner-dot {
        width: 8px;
        height: 8px;
    }
}


/* Bottone Leggi tutto descrizione */
.popup-read-more-btn {
    background: none;
    border: none;
    color: #FF6B35;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.popup-read-more-btn:hover {
    color: #e55a2b;
    transform: translateX(2px);
}


/* ==========================================
   TOOLBAR CONTROLS (Filtri Avanzati + View Toggle)
   ========================================== */
.toolbar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.toolbar-controls .filter-advanced-trigger {
    flex: 1;
    min-width: 140px;
}

.toolbar-controls .view-toggle {
    flex-shrink: 0;
}

/* Results count inline */
.results-count-inline {
    font-size: 15px;
    color: #64748b;
    font-weight: 500;
    flex: 1;
}

.results-count-inline strong {
    color: #FF6B35;
    font-weight: 700;
    font-size: 16px;
}

@media (max-width: 480px) {
    .toolbar-controls {
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .toolbar-controls .filter-advanced-trigger {
        flex: 1;
        min-width: 0;
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .results-count-inline {
        font-size: 13px;
    }
    
    .results-count-inline strong {
        font-size: 14px;
    }
}


/* ==========================================
   LIGHTBOX FULLSCREEN
   ========================================== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: lightboxFadeIn 0.25s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        background: rgba(0, 0, 0, 0);
    }
    to {
        opacity: 1;
        background: rgba(0, 0, 0, 0.95);
    }
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 32px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
}

.lightbox-image {
    max-width: 95%;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    animation: lightboxZoom 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 48px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100001;
    pointer-events: auto;
    touch-action: manipulation;
}

.lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.15);
}

.lightbox-arrow:active {
    transform: translateY(-50%) scale(0.9);
    transition: all 0.1s;
}

.lightbox-arrow-left {
    left: 20px;
}

.lightbox-arrow-right {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 100001;
    animation: counterFadeIn 0.4s ease 0.2s both;
}

@keyframes counterFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes lightboxZoom {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
        font-size: 24px;
    }
    
    .lightbox-arrow {
        width: 50px;
        height: 50px;
        font-size: 36px;
    }
    
    .lightbox-arrow-left {
        left: 10px;
    }
    
    .lightbox-arrow-right {
        right: 10px;
    }
    
    .lightbox-counter {
        bottom: 20px;
        font-size: 12px;
        padding: 6px 12px;
    }
}


/* ==========================================
   LOAD MORE BUTTON
   ========================================== */
.load-more-container {
    text-align: center;
    padding: 40px 20px;
    margin-top: 20px;
}

.load-more-btn {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.load-more-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.load-more-btn:active:not(:disabled) {
    transform: translateY(0);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.load-more-btn.loading {
    background: #94a3b8;
    animation: pulse 1.5s infinite;
}

.load-more-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 400;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Mobile */
@media (max-width: 480px) {
    .load-more-container {
        padding: 30px 16px;
    }
    
    .load-more-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 14px;
    }
    
    .load-more-count {
        font-size: 13px;
    }
}

/* ==========================================
   GOOGLE ADSENSE STYLES
   ========================================== */

/* Wrapper generale ads */
.adsense-wrapper {
    margin: 8px 0;
    text-align: center;
    position: relative;
    min-height: 120px;
}

/* Label "Pubblicità" */
.adsense-wrapper::before {
    content: 'Pubblicità';
    display: block;
    font-size: 9px;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 1px;
    font-weight: 600;
}

/* GRID VIEW - Native Ad (sembra una card) */
.adsense-grid-native {
    grid-column: 1 / -1; /* Span tutte le colonne */
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin: 10px 0;
    transition: all 0.3s ease;
}

.adsense-grid-native:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* LIST VIEW - In-Feed Ad (sembra un list item) */
.adsense-list-infeed {
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid #f1f5f9;
    transition: all 0.3s ease;
    min-height: 100px;
}

.adsense-list-infeed:hover {
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* AdSense ins element - responsivo */
.adsense-wrapper ins {
    display: block !important;
    text-align: center;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .adsense-grid-native,
    .adsense-list-infeed {
        padding: 10px;
        margin: 8px 0;
    }
    
    .adsense-wrapper {
        margin: 8px 0;
        min-height: 100px;
    }
}

@media (max-width: 480px) {
    .adsense-wrapper::before {
        font-size: 8px;
        margin-bottom: 4px;
    }
    
    .adsense-grid-native,
    .adsense-list-infeed {
        padding: 8px;
        min-height: 80px;
    }
}

/* Loading state */
.adsense-wrapper:empty {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 12px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
