
.stores-page {
    padding-top: 145px;
}

.stores-hero {
    padding: 85px 0 50px;
    background: #f7f5ef;
}

.stores-hero h1 {
    margin: 8px 0 16px;
    color: var(--secondaryColor, #121212);
    font-size: clamp(42px, 5vw, 72px);
    line-height: 1.05;
}

.stores-hero p {
    max-width: 760px;
    margin: 0;
    font-size: 20px;
    line-height: 1.55;
}

.stores-locator {
    padding: 55px 0 110px;
    background: #fff;
}

.stores-layout {
    display: grid;
    grid-template-columns: minmax(390px, 520px) minmax(0, 1fr);
    height: clamp(720px, 78vh, 900px);
    min-height: 720px;
    overflow: hidden;
    border: 1px solid rgba(18, 18, 18, .14);
    background: #fff;
}

.stores-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-right: 1px solid rgba(18, 18, 18, .14);
}

.stores-search {
    flex: 0 0 auto;
    padding: 25px 28px 22px;
    border-bottom: 1px solid rgba(18, 18, 18, .14);
}

.stores-search label {
    display: block;
    margin-bottom: 9px;
    color: #205d60;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
}

.stores-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.stores-search input,
.stores-search select {
    width: 100%;
    min-height: 52px;
    padding: 10px 14px;
    border: 1px solid #b8b8b8;
    border-radius: 4px;
    background: #fff;
    color: #121212;
    font-size: 16px;
}

.stores-search input:focus,
.stores-search select:focus {
    border-color: #205d60;
    outline: 3px solid rgba(32, 93, 96, .15);
}

#storesGeolocation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 52px;
    padding: 10px 15px;
    border: 1px solid #205d60;
    border-radius: 4px;
    background: #205d60;
    color: #fff;
    font-weight: 700;
}

#storesGeolocation[disabled] {
    cursor: wait;
    opacity: .65;
}

.stores-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 17px;
}

.stores-search-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 17px;
    font-size: 14px;
}

#storesReset {
    padding: 0;
    border: 0;
    background: transparent;
    color: #205d60;
    font-weight: 700;
    text-decoration: underline;
}

.stores-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.store-card {
    display: block;
    width: 100%;
    padding: 23px 28px;
    border: 0;
    border-bottom: 1px solid rgba(18, 18, 18, .12);
    background: #fff;
    color: inherit;
    text-align: left;
    transition: background-color .2s ease, border-left-color .2s ease;
}

.store-card:hover,
.store-card:focus-visible,
.store-card.is-active {
    background: #f7f5ef;
}

.store-card.is-active {
    border-left: 5px solid #dcbf61;
    padding-left: 23px;
}

.store-card-region {
    display: block;
    margin-bottom: 7px;
    color: #205d60;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.store-card h2 {
    margin: 0 0 9px;
    color: #121212;
    font-size: 21px;
    line-height: 1.25;
}

.store-card-address,
.store-card-contact,
.store-card-hours {
    display: block;
    margin-top: 5px;
    line-height: 1.45;
}

.store-card-hours {
    font-weight: 700;
}

.store-card-distance {
    display: inline-block;
    margin-top: 11px;
    color: #205d60;
    font-weight: 700;
}

.stores-empty,
.stores-alert {
    padding: 28px;
    background: #fff3cd;
    color: #664d03;
}

.stores-map-column {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #edf1ea;
}

.stores-map {
    width: 100%;
    height: 100%;
    min-height: 100%;
    background: #edf1ea;
}

.store-preview {
    position: absolute;
    top: 28px;
    left: 50%;
    z-index: 5;
    width: min(470px, calc(100% - 40px));
    padding: 30px 32px 28px;
    border: 1px solid rgba(18, 18, 18, .12);
    border-radius: 5px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 16px 42px rgba(18, 18, 18, .22);
    transform: translateX(-50%);
}

.store-preview[hidden] {
    display: none;
}

.store-preview-close {
    position: absolute;
    top: 13px;
    right: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #555;
    font-size: 24px;
}

.store-preview-region {
    display: block;
    padding-right: 35px;
    margin-bottom: 8px;
    color: #205d60;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.store-preview h2 {
    padding-right: 35px;
    margin: 0 0 12px;
    color: #121212;
    font-size: 25px;
    line-height: 1.22;
}

.store-preview p {
    margin: 7px 0;
    color: #444;
    line-height: 1.45;
}

.store-preview-hours {
    font-weight: 700;
}

.store-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 22px;
}

.store-preview-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 45px;
    padding: 10px 17px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
}

.store-preview-primary {
    background: #205d60;
    color: #fff !important;
}

.store-preview-secondary {
    border: 1px solid #205d60;
    background: #fff;
    color: #205d60 !important;
}

.stores-map-notice,
.stores-map-error {
    position: absolute;
    right: 15px;
    bottom: 15px;
    left: 15px;
    z-index: 6;
    padding: 12px 15px;
    border-radius: 5px;
    background: rgba(255,255,255,.96);
    color: #555;
    font-size: 13px;
    box-shadow: 0 5px 20px rgba(0,0,0,.12);
}

.stores-map-error {
    top: 50%;
    bottom: auto;
    max-width: 620px;
    margin: 0 auto;
    color: #8a1f1f;
    text-align: center;
    transform: translateY(-50%);
}

.store-google-info {
    max-width: 280px;
    padding: 3px 2px;
}

.store-google-info strong {
    display: block;
    margin-bottom: 5px;
    color: #121212;
    font-size: 16px;
}

.store-google-info span {
    display: block;
    color: #555;
    line-height: 1.4;
}

@media (max-width: 1199px) {
    .stores-layout {
        grid-template-columns: 420px minmax(0, 1fr);
    }
}

@media (max-width: 991px) {
    .stores-page {
        padding-top: 86px;
    }

    .stores-layout {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .stores-panel {
        height: 680px;
        border-right: 0;
        border-bottom: 1px solid rgba(18, 18, 18, .14);
    }

    .stores-map-column {
        height: 620px;
    }

    .stores-map {
        min-height: 620px;
    }
}

@media (max-width: 575px) {
    .stores-hero {
        padding: 55px 0 35px;
    }

    .stores-locator {
        padding: 30px 0 70px;
    }

    .stores-search {
        padding: 20px 16px;
    }

    .stores-search-row,
    .stores-filters {
        grid-template-columns: 1fr;
    }

    .stores-panel {
        height: 650px;
    }

    .store-card {
        padding: 21px 16px;
    }

    .store-card.is-active {
        padding-left: 11px;
    }

    .stores-map-column {
        height: 530px;
    }

    .stores-map {
        min-height: 530px;
    }

    .store-preview {
        top: 15px;
        width: calc(100% - 24px);
        padding: 25px 20px 21px;
    }

    .store-preview h2 {
        font-size: 21px;
    }

    .store-preview-actions {
        flex-direction: column;
    }

    .store-preview-actions a {
        width: 100%;
    }
}


/* Risultati alternativi dopo la geocodifica della località cercata. */
.stores-fallback-message {
    flex: 0 0 auto;
    padding: 16px 28px;
    border-bottom: 1px solid rgba(18, 18, 18, .12);
    background: #f7f5ef;
    color: #205d60;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
}

.stores-fallback-message[hidden] {
    display: none;
}

/*
 * Impedisce alla rotella e ai gesti di propagarsi al documento
 * quando il puntatore si trova nel localizzatore.
 */
.stores-list,
.stores-map,
.stores-map-column {
    overscroll-behavior: contain;
}
