﻿/* Myymäläsivujen tyylit. Kaikki säännöt rajattu .store-page-kääreen sisään,
   jotta main.css:n yhteiset luokat (h3, .m-col, .link ...) eivät muutu muilla sivuilla. */

/* Värit tulevat yhteisestä teemasta (theme.css). Varaväri pitää ulkoasun ennallaan,
   vaikka theme.css puuttuisi sivulta. */
.store-page {
    --store-accent: var(--fy-accent, #FFD300);
    --store-accent-soft: var(--fy-accent-soft, #FFF8D6);
    --store-text: var(--fy-text, #1f1f1f);
    --store-muted: var(--fy-muted, #5c5c5c);
    --store-border: var(--fy-border, #e4e4e4);
    --store-surface: var(--fy-surface, #f7f7f5);
    --store-link: var(--fy-link, #1f63b5);
    --store-link-hover: var(--fy-link-hover, #0f4a8f);
    --store-radius: var(--fy-radius, 10px);
    color: var(--store-text);
}

/* Otsikko */
.store-page .headline {
    padding: 0 10px;
}

    .store-page .headline h1 {
        margin: 0 0 4px 0;
        color: var(--store-text);
        font-weight: 700;
        line-height: 1.2;
    }

/* Yläosa: yhteystiedot + kartta */
.store-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin: 16px 10px 28px 10px;
}

/* Jos myymälällä ei ole kartta- tai myymäläkuvaa, yhteystietokortti levenee koko leveydelle.
   :only-child kattaa tilanteen, jossa kuvalohko puuttuu kokonaan,
   :has tilanteen, jossa lohko on mutta kuva on kommentoitu pois. */
.store-hero > .store-card:only-child {
    grid-column: 1 / -1;
}

.store-hero:not(:has(.store-map img)) {
    grid-template-columns: minmax(0, 1fr);
}

.store-map:not(:has(img)) {
    display: none;
}

.store-card {
    background: var(--store-surface);
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    padding: 18px 20px;
}

/* Yhteystietolista: otsikko omaan sarakkeeseen */
.store-contact {
    list-style: none;
    margin: 0;
    padding: 0;
    line-height: 1.45;
}

    .store-contact li {
        padding: 7px 0;
        border-bottom: 1px solid var(--store-border);
    }

        .store-contact li:last-child {
            border-bottom: 0;
        }

        .store-contact li.row {
            display: grid;
            grid-template-columns: 9em minmax(0, 1fr);
            gap: 12px;
        }

            .store-contact li.row > strong {
                color: var(--store-muted);
                font-weight: 700;
            }

    .store-contact a {
        color: var(--store-link);
    }

    .store-contact .tel {
        font-weight: 700;
        white-space: nowrap;
    }

.store-muted,
.store-contact .small {
    display: block;
    color: var(--store-muted);
    font-size: 0.85em;
}

/* Tarjouslinkki: hillitty tekstilinkki */
.store-page .store-offers {
    display: inline-block;
    margin-top: 12px;
    color: var(--store-link);
    font-size: 0.95em;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

    .store-page .store-offers:hover {
        color: var(--store-link-hover);
    }

.store-access {
    margin: 12px 0 0 0;
    padding: 0;
    color: var(--store-muted);
    font-size: 0.9em;
}

.store-map {
    margin: 0;
    text-align: center;
}

    /* Pystymalliset kartat (esim. Itis, Dixi) rajataan, ettei yläosasta tule liian korkea */
    .store-map img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 440px;
        border: 1px solid var(--store-border);
        border-radius: var(--store-radius);
    }

/* Karttakuvan suurennus (js/myymala.js) */
.store-map img.store-zoomable {
    cursor: zoom-in;
    transition: box-shadow 0.2s;
}

    .store-map img.store-zoomable:hover,
    .store-map img.store-zoomable:focus-visible {
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
        outline: none;
    }

.store-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    cursor: zoom-out;
}

    .store-lightbox img {
        max-width: 95vw;
        max-height: 90vh;
        width: auto;
        height: auto;
        background: #fff;
        border-radius: 6px;
    }

.store-lightbox-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #1f1f1f;
    font-size: 30px;
    line-height: 44px;
    cursor: pointer;
}

/* Banneri */
.store-banner {
    margin: 0 10px 28px 10px;
}

    .store-banner img {
        border-radius: var(--store-radius);
    }

/* Kampanjalaatikko (kampanja.css:n .campaign-card) */
.store-campaign {
    margin: 0 10px 28px 10px;
}

    .store-campaign .campaign-card {
        padding-bottom: 20px;
    }

/* Sisältöosiot */
.store-section {
    margin: 0 10px 28px 10px;
    padding: 22px 24px 12px 24px;
    background: #fff;
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
}

    .store-section h3 {
        margin: 0 0 14px 0;
        padding-left: 12px;
        border-left: 5px solid var(--store-accent);
        color: var(--store-text);
        font-weight: 700;
        font-size: 1.45em;
        line-height: 1.25;
    }

    .store-section h4 {
        margin: 0 0 12px 0;
        color: var(--store-text);
        font-weight: 700;
        font-size: 1.25em;
        line-height: 1.3;
    }

    .store-section p {
        line-height: 1.6;
        padding-bottom: 14px;
    }

    .store-section .store-lead {
        font-size: 1.1em;
        font-weight: 700;
    }

/* Yhtenäinen linkkityyli */
.store-page .link,
.store-section a {
    color: var(--store-link);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

    .store-page .link:hover,
    .store-section a:hover {
        color: var(--store-link-hover);
    }

/* Hinta */
.price-badge {
    display: inline-block;
    padding: 1px 9px;
    background: var(--store-accent);
    color: var(--store-text);
    border-radius: 6px;
    font-weight: 700;
    white-space: nowrap;
}

/* Lasten passikuva-alennus alleviivattuna */
.store-discount {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Huomautus (esim. pankkitunnukset) */
.store-section .store-notice {
    margin: 0 0 16px 0;
    padding: 12px 16px;
    background: #EEF4FB;
    border-left: 4px solid var(--store-link);
    border-radius: 6px;
    font-weight: 700;
}

/* Tietolaatikko (esim. noutoaikataulu) */
.store-section .store-infobox {
    margin: 0 0 16px 0;
    padding: 14px 16px;
    background: var(--store-surface);
    border-radius: 6px;
}

/* Korostuslaatikko (esim. ajanvaraus) */
.store-page .store-callout {
    margin: 6px 0 18px 0;
    padding: 14px 18px;
    background: var(--store-accent-soft);
    border: 1px solid var(--store-accent);
    border-radius: var(--store-radius);
    font-size: 1.05em;
    line-height: 1.5;
    color: var(--store-text);
}

/* Kuvat sivun lopussa */
/* Myymäläkuvat pidetään pieninä, koska niiden laatu vaihtelee */
.store-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 300px));
    gap: 16px;
    margin: 0 10px 28px 10px;
}

    .store-gallery img {
        width: 100%;
        height: auto;
        border-radius: var(--store-radius);
    }

/* Mobiili */
@media (max-width: 760px) {
    .store-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .store-card,
    .store-section {
        padding: 16px;
    }

    .store-contact li.row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .store-section h3 {
        font-size: 1.3em;
    }
}
