/**
 * Store detail — Swiper gallery + RWD utilities (Hyvä).
 * slick-* class hooks retained for storelocator-detail.css arrow styling.
 */

/* Hyvä .page-main { margin-block: --spacing(8) } — flush CMS content to header */
body.store-detail-body #maincontent {
    display: block !important;
    min-height: unset;
    flex-grow: 0 !important;
}

body.store-detail-body .page-main,
body.store-detail-body #maincontent.page-main,
body.store-detail-body #maincontent.page-main-full-width,
body.store-detail-body.page-layout-1column #maincontent {
    margin: 0 !important;
    margin-block: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    max-width: none;
    padding-inline: 0;
    flex-grow: 0 !important;
    min-height: unset !important;
}

@media only screen and (max-width: 767px) {
    body.store-detail-body .hide-mobile {
        display: none !important;
    }
}

@media only screen and (min-width: 768px) and (max-width: 1023px) {
    body.store-detail-body .hide-tablet {
        display: none !important;
    }
}

@media only screen and (min-width: 1024px) {
    body.store-detail-body .hide-desktop {
        display: none !important;
    }
}

/* Gallery shell — gold frame sits outside Swiper overflow clip */
body.store-detail-body .ewc-storelocator-storeGallery-slider-shell {
    position: relative;
    margin-left: 10px;
}

body.store-detail-body .ewc-storelocator-storeGallery-slider-frame {
    position: absolute;
    width: calc(100% - 2px);
    height: calc(100% - 2px);
    left: -20px;
    top: 20px;
    border: 1px solid #99785c;
    z-index: 1;
    pointer-events: none;
}

body.store-detail-body .ewc-storelocator-storeGallery-slider.ewcSwiper.swiper {
    position: relative;
    overflow: hidden;
    z-index: 2;
    margin-left: 0;
}

/* Legacy storelocator-detail.css ::before on slider — replaced by shell frame */
body.store-detail-body .ewc-storelocator-storeGallery .ewc-storelocator-storeGallery-slider::before,
body.store-detail-body .ewc-storelocator-storeGallery-slider.ewcSwiper.swiper::before {
    content: none !important;
    display: none !important;
}

body.store-detail-body .ewc-storelocator-storeGallery-slider .swiper-wrapper {
    display: flex;
    position: relative;
    z-index: 2;
}

body.store-detail-body .ewc-storelocator-storeGallery-slider .swiper-slide {
    flex-shrink: 0;
    width: 100%;
}

body.store-detail-body .ewc-storelocator-storeGallery-slider .slick-arrow {
    position: absolute;
    top: 50%;
    margin-top: 0;
    cursor: pointer;
    z-index: 5;
}

body.store-detail-body .ewc-storelocator-storeGallery-slider .slick-arrow.slick-prev {
    left: 20px;
}

body.store-detail-body .ewc-storelocator-storeGallery-slider .slick-arrow.slick-next {
    right: 20px;
}

body.store-detail-body .ewc-storelocator-storeGallery-slider .slick-arrow.swiper-button-disabled {
    opacity: 0;
    pointer-events: none;
}

@media only screen and (max-width: 767px) {
    body.store-detail-body .ewc-storelocator-storeGallery-slider-frame {
        left: -10px;
        top: 10px;
    }
}

/* Map canvas — padding-top on #storelocatorMap breaks Google Maps height; use aspect wrapper */
body.store-detail-body .ewc-storelocator-storeDetails-mapWrapper .ewc-storelocator-mapAspect {
    position: relative;
    width: 100%;
}

body.store-detail-body .ewc-storelocator-storeDetails-mapWrapper .ewc-storelocator-mapAspect::before {
    content: '';
    display: block;
    padding-top: 100%;
}

body.store-detail-body .ewc-storelocator-storeDetails-mapWrapper #storelocatorMap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    padding-top: 0 !important;
}

@media only screen and (max-width: 767px) {
    body.store-detail-body .ewc-storelocator-storeDetails-mapWrapper .ewc-storelocator-mapAspect::before {
        display: none;
    }

    body.store-detail-body .ewc-storelocator-storeDetails-mapWrapper .ewc-storelocator-mapAspect {
        height: 215px;
    }
}
