/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --rosso: #e31e24;
    --fontTesto: 'Arial', sans-serif;
    --fontMain: 'Arial', sans-serif;
}

body {
    font-family: var(--fontTesto);
    color: #333;
    line-height: 1.6;
}

.wrapper {
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-12 {
    width: 100%;
    padding: 0 15px;
}

.col-lg-6 {
    width: 100%;
    padding: 0 15px;
}

@media (min-width: 992px) {
    .col-lg-6 {
        width: 50%;
    }
}

/* Hero Section */
.hero {
    position: relative;
    padding: 0;
}

.hero-background {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.slide_image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.abs-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 2;
}

.cont-hero h1 {
    color: white;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin: 0;
}

/* Sezione Mappa */
#mappa {
    padding: 40px 0;
}

.section-start {
    padding-top: 40px;
}

.section-end {
    padding-bottom: 40px;
}

/* Colonna Negozi */
.col-negozi {
    padding-right: 30px;
}

.col-negozi h4 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

/* Campo ricerca */
#src_negozio {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 15px;
    position: relative;
}

#src_negozio:focus {
    outline: none;
    border-color: var(--rosso);
}

#remove-filtri {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: none;
}

#remove-filtri.rimuovi_on_src:after {
    content: '×';
    font-size: 24px;
    color: #999;
}

/* Filtri Container */
.filtri_container {
    margin-bottom: 20px;
}

.filtri_container .inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.ris p,
.filtri p {
    margin: 0;
    font-size: 14px;
}

.filtri #open_filtri {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--rosso);
}

.filtri #open_filtri:hover {
    text-decoration: underline;
}

.icon_filtri {
    width: 16px;
    height: 16px;
}

/* Popup Filtri */
#popup_filtri {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#popup_filtri.load {
    /* Altezza calcolata dinamicamente via JS */
}

#popup_filtri.open {
    max-height: 300px;
}

.popup_inner {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-top: 10px;
}

.check_apertura {
    margin-bottom: 15px;
}

.check_apertura label,
.label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.check_apertura input[type="checkbox"] {
    margin-right: 8px;
}

.btn-invio {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    background: var(--rosso);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.btn:hover {
    background: #c01a1f;
}

.piccolo {
    font-size: 14px;
}

.piccolo a {
    color: var(--rosso);
    text-decoration: none;
}

.piccolo a:hover {
    text-decoration: underline;
}

/* Lista Negozi */
.negozi {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
}

.negozio {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.negozio:hover {
    background: #f9f9f9;
}

.negozio:last-child {
    border-bottom: none;
}

.negozio .left {
    flex: 1;
}

.negozio .nome {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.negozio .indirizzo {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.negozio .right {
    display: flex;
    align-items: center;
}

.negozio .indicazioni {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--rosso);
    text-decoration: none;
    font-size: 14px;
}

.negozio .indicazioni:hover {
    text-decoration: underline;
}

.img_pointer {
    width: 16px;
    height: 16px;
}

/* Loading e Error */
.loading,
.error {
    padding: 20px;
    text-align: center;
    color: #666;
}

.error {
    color: var(--rosso);
}

/* Colonna Mappa */
.col-mappa {
    position: sticky;
    top: 20px;
}

#map {
    width: 100%;
    height: 600px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

#infowindow-content {
    display: none;
}

#map #infowindow-content {
    display: inline;
}

/* InfoWindow Content */
.balloon_content {
    padding: 15px;
    min-width: 250px;
}

.balloon_content .titolo {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.balloon_content .indirizzo {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.balloon_content .orari {
    font-weight: 600;
    margin: 15px 0 10px;
    color: #333;
}

.balloon_content .orario {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.balloon_content .orario.ultimo {
    border-bottom: none;
}

.balloon_content .giorno {
    font-weight: 500;
    margin: 0;
}

.balloon_content .contatti {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.balloon_content .contatti a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: var(--rosso);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background 0.3s;
    outline: none;
}

.balloon_content .contatti a:hover {
    background: #c01a1f;
}

.balloon_content .contatti img {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1);
}

/* Utility */
.mb-0 {
    margin-bottom: 0 !important;
}

.fw-600 {
    font-weight: 600;
}

.font-main {
    font-family: var(--fontMain);
}

.text-center {
    text-align: center;
}

/* Responsive */
@media (max-width: 991px) {
    .col-negozi {
        padding-right: 15px;
        margin-bottom: 30px;
    }
    
    .col-mappa {
        position: relative;
        top: 0;
    }
    
    #map {
        height: 400px;
    }
    
    .cont-hero h1 {
        font-size: 1.8rem;
    }
    
    .negozi {
        max-height: 400px;
    }
}

@media (max-width: 576px) {
    .cont-hero h1 {
        font-size: 1.5rem;
    }
    
    .filtri_container .inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .balloon_content .contatti {
        flex-direction: column;
    }
    
    .balloon_content .contatti a {
        justify-content: center;
    }
}

/* Google Maps Autocomplete styling */
.pac-container {
    z-index: 10000;
    font-family: var(--fontTesto);
}

.pac-item {
    padding: 8px 12px;
    cursor: pointer;
}

.pac-item:hover {
    background: #f5f5f5;
}