:root {
    --bg-overlay: rgba(4, 14, 10, 0.48);
    --panel-bg: rgba(4, 18, 14, 0.74);
    --panel-border: rgba(96, 248, 190, 0.34);
    --text: #effff7;
    --muted: #b9e8d4;
    --accent: #62ffc7;
    --accent-strong: #2dde9f;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    position: relative;
    background: #06090b;
    min-height: 100vh;
    /* Spazio riservato al footer fisso in basso (desktop/tablet) */
    padding-bottom: 108px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(145deg, var(--bg-overlay), rgba(6, 9, 11, 0.72)),
        url('../banner.jpg') center center / cover no-repeat;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    inset: -20% -10%;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 24%, rgba(72, 255, 177, 0.28), transparent 42%),
        radial-gradient(circle at 78% 16%, rgba(55, 196, 134, 0.2), transparent 40%),
        radial-gradient(circle at 48% 84%, rgba(43, 227, 149, 0.14), transparent 48%);
    filter: blur(10px);
    animation: smokeFlow 14s ease-in-out infinite alternate;
    pointer-events: none;
}

.page {
    width: min(1120px, 100% - 24px);
    margin: 0;
    padding: 24px;
    border-radius: 24px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.page::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(117, 255, 201, 0.12), transparent 34%),
        linear-gradient(300deg, rgba(82, 212, 152, 0.1), transparent 38%);
    pointer-events: none;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.brand {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.4rem, 3.4vw, 2.4rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 16px rgba(98, 255, 199, 0.32);
}

.subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    background: rgba(7, 32, 21, 0.72);
    border: 1px solid rgba(118, 244, 195, 0.28);
    border-radius: 999px;
    padding: 7px 12px;
}

.layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(260px, 340px) 1fr;
    align-items: center;
    position: relative;
    z-index: 1;
}

.stores {
    display: grid;
    gap: 12px;
    align-content: center;
    justify-items: center;
}

.store-card {
    width: 100%;
    max-width: 320px;
    text-align: left;
    border: 1px solid rgba(114, 233, 181, 0.35);
    background: linear-gradient(160deg, rgba(8, 33, 24, 0.82), rgba(5, 17, 13, 0.72));
    color: var(--text);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(180, 255, 223, 0.08);
}

.store-card:hover,
.store-card:focus-visible,
.store-card.active {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: linear-gradient(160deg, rgba(13, 45, 33, 0.9), rgba(6, 19, 14, 0.84));
    box-shadow: 0 10px 20px rgba(23, 115, 82, 0.34);
    outline: none;
}

.store-name {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
}

.store-address {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
    font-size: 0.93rem;
}

.store-phone {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
}

.store-phone:hover,
.store-phone:focus-visible {
    color: #9effe3;
    outline: none;
}

.map-wrap {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(110, 255, 201, 0.38);
    min-height: 540px;
    box-shadow: 0 0 0 1px rgba(115, 255, 201, 0.08), 0 14px 28px rgba(2, 20, 14, 0.46);
}

/* Footer social con pulsanti icona */
.social-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(114, 233, 181, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(114, 233, 181, 0.35);
    background: linear-gradient(160deg, rgba(8, 33, 24, 0.82), rgba(5, 17, 13, 0.72));
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.social-link:hover,
.social-link:focus-visible {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(23, 115, 82, 0.34);
    outline: none;
}

.social-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
}

/* Footer legale fisso a fondo pagina */
.legal-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9100;
    border-top: 1px solid rgba(114, 233, 181, 0.2);
    background: rgba(7, 13, 19, 0.94);
    backdrop-filter: blur(6px);
    padding: 12px 14px;
    color: #d9e7de;
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.45;
}

.legal-footer strong {
    color: var(--text);
    font-weight: 700;
}

.legal-footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.legal-footer-line {
    display: block;
    /* Evita il taglio del testo: consente andare a capo su viewport stretti */
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#shop-map {
    width: 100%;
    height: 100%;
    min-height: 540px;
}

.hidden-staff-link {
    position: fixed;
    right: 10px;
    /* Mantiene il bottone nascosto sopra la barra footer */
    bottom: 86px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.03;
    z-index: 9999;
    display: inline-block;
    text-indent: -9999px;
    overflow: hidden;
}

.hidden-staff-link:hover,
.hidden-staff-link:focus-visible {
    opacity: 0.12;
}

@keyframes smokeFlow {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(1.5%, -1.2%, 0) scale(1.05);
    }

    100% {
        transform: translate3d(-1.2%, 1.4%, 0) scale(1.03);
    }
}

@media (max-width: 900px) {
    .page {
        padding: 16px;
        border-radius: 18px;
    }

    .subtitle {
        font-size: 0.88rem;
        padding: 6px 10px;
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .map-wrap,
    #shop-map {
        min-height: 56vh;
    }
}

@media (max-width: 520px) {
    .page {
        width: calc(100% - 12px);
        padding: 12px;
    }

    .header {
        display: block;
        margin-bottom: 14px;
    }

    .subtitle {
        margin-top: 6px;
        display: inline-block;
    }

    .map-wrap,
    #shop-map {
        min-height: 52vh;
    }

    body {
        box-sizing: border-box;
        padding-top: 15px;
        padding-bottom: 15px;
        height: auto;
        min-height: 100vh;
        /* Su mobile il footer e multi-riga: aumenta lo spazio di sicurezza */
        padding-bottom: calc(170px + env(safe-area-inset-bottom));
    }

    .page {
        margin: 0 auto;
        max-height: calc(100vh - 116px);
        /* 116 = spazio top/bottom + footer fisso */
        overflow: auto;
    }

    .legal-footer {
        font-size: 0.76rem;
        /* Padding con safe-area per dispositivi con gesture bar/notch */
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    }
}