/* PyLoHerb — Store System page
   Type scale aligned with brand-story / content pages (17px body, serif titles). */
.pylo-store-page {
    background: var(--pylo-cream, #f7f4ef);
}

.pylo-store-page > .pylo-hero {
    margin-bottom: 0;
}

/* Hero copy — HOME banner type tokens */
.pylo-store-page .pylo-hero__eyebrow {
    font-size: var(--pylo-banner-d-eyebrow-size, 11px);
    letter-spacing: var(--pylo-banner-d-eyebrow-ls, 0.2em);
    margin-bottom: var(--pylo-banner-d-eyebrow-mb, 16px);
}

.pylo-store-page .pylo-hero__h1 {
    font-size: var(--pylo-banner-d-title-size, clamp(36px, 5vw, 52px));
    font-weight: 700;
    line-height: var(--pylo-banner-d-title-lh, 1.15);
    letter-spacing: normal;
}

.pylo-store-page .pylo-hero__subtitle {
    margin-top: 0;
    font-size: var(--pylo-banner-d-desc-size, 15px);
    line-height: var(--pylo-banner-d-desc-lh, 1.65);
    max-width: var(--pylo-banner-d-desc-max, 480px);
}

.pylo-store-page__body {
    padding-top: var(--pylo-space-lg, clamp(24px, 2vw, 32px));
    padding-bottom: var(--pylo-space-lg, clamp(24px, 2vw, 32px));
}

.pylo-store-page__hero-wrap {
    padding: var(--pylo-space-lg, clamp(24px, 2vw, 32px)) 0 var(--pylo-space-md, 24px);
    max-width: 720px;
}

.pylo-store-page__title {
    font-family: var(--pylo-serif, "Playfair Display", Georgia, serif);
    font-size: var(--pylo-fs-h1, clamp(1.75rem, 3.5vw, 2.35rem));
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--pylo-green-dark, #0f261c);
    margin-bottom: 12px;
}

.pylo-store-page__subtitle {
    font-family: var(--pylo-sans, "Public Sans", sans-serif);
    font-size: var(--pylo-section-desc-size, 15px);
    line-height: var(--pylo-section-desc-lh, 1.7);
    color: var(--pylo-muted, #5c5c5c);
    margin: 0;
    text-align: left;
}

.pylo-store-page__layout {
    padding: 32px 0;
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 24px;
    align-items: start;
}

.pylo-store-page__list-panel {
    background: #fff;
    border-radius: var(--pylo-radius, 14px);
    padding: 16px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.pylo-store-page__search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f3ee;
    border-radius: 999px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.pylo-store-page__search-wrap svg {
    color: #888;
    flex-shrink: 0;
}

.pylo-store-page__search {
    border: 0;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 15px;
    line-height: 1.45;
    color: var(--pylo-text, #1c1c1c);
}

.pylo-store-page__cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 620px;
    overflow-y: auto;
}

.pylo-store-card {
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px 16px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    background: #fff;
}

.pylo-store-card.is-active {
    border-color: var(--pylo-green, #1a3d2e);
    background: #f8faf8;
    box-shadow: 0 0 0 1px rgba(26, 61, 46, 0.08);
}

.pylo-store-card__name {
    font-family: var(--pylo-serif, "Playfair Display", Georgia, serif);
    font-size: clamp(1.15rem, 1.6vw, 1.35rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--pylo-green-dark, #0f261c);
    margin-bottom: 10px;
}

.pylo-store-card__line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--pylo-muted, #5c5c5c);
    margin-bottom: 6px;
}

.pylo-store-card__line svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--pylo-brown, #9a7b4f);
}

.pylo-store-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.pylo-store-card__directions {
    flex: 1;
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: var(--primary, var(--pylo-green, #1a3d2e));
    color: #fff;
    transition: background 0.2s;
}

.pylo-store-card:not(.is-active) .pylo-store-card__directions {
    background: #e8e4dc;
    color: var(--pylo-text, #1c1c1c);
}

.pylo-store-card__directions:hover {
    background: var(--hov-primary, var(--pylo-green-dark, #0f261c));
    color: #fff;
}

.pylo-store-card__share {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e0dcd4;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pylo-muted, #5c5c5c);
    flex-shrink: 0;
}

.pylo-store-page__map-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pylo-store-page__map-frame {
    position: relative;
    border: 3px solid var(--pylo-green-dark, #0f261c);
    border-radius: var(--pylo-radius, 14px);
    overflow: hidden;
    background: #dce8e0;
}

.pylo-store-page__map-frame .leaflet-container {
    width: 100%;
    height: 100%;
    min-height: 700px;
    background: #dce8e0;
}

.pylo-store-page__map {
    height: 700px;
    width: 100%;
    z-index: 1;
}

.pylo-store-page__map-label {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    background: #1c1c1c;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    white-space: nowrap;
    max-width: calc(100% - 32px);
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.pylo-store-page__map-label.is-visible {
    opacity: 1;
}

.pylo-store-page__map-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pylo-store-page__map-controls button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    font-size: 18px;
    line-height: 1;
    color: var(--pylo-text, #1c1c1c);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.pylo-store-page__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.pylo-store-page__gallery.is-empty {
    display: none;
}

.pylo-store-page__gallery-item {
    border: 0;
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e8e4dc;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pylo-store-page__gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 38, 28, 0.15);
}

.pylo-store-page__gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    pointer-events: none;
}

/* Lightbox */
body.pylo-store-lightbox-open {
    overflow: hidden;
}

.pylo-store-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.pylo-store-lightbox[hidden] {
    display: none !important;
}

.pylo-store-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 38, 28, 0.82);
    backdrop-filter: blur(4px);
}

.pylo-store-lightbox__dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.pylo-store-lightbox__stage {
    width: 100%;
    max-height: calc(100vh - 120px);
    border-radius: 14px;
    overflow: hidden;
    background: #0f261c;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.pylo-store-lightbox__img {
    display: block;
    width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    margin: 0 auto;
}

.pylo-store-lightbox__close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #1c1c1c;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.pylo-store-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #1c1c1c;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.pylo-store-lightbox__prev {
    left: -56px;
}

.pylo-store-lightbox__next {
    right: -56px;
}

.pylo-store-lightbox__counter {
    margin: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* Newsletter */
.pylo-store-newsletter {
    background: var(--pylo-beige-light, #f0ece6);
    border-top: 1px solid #e0dcd4;
    padding: var(--pylo-space-lg, clamp(24px, 2vw, 32px)) 0;
    margin-top: var(--pylo-space-md, 24px);
}

.pylo-store-newsletter__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.pylo-store-newsletter__title {
    font-family: var(--pylo-serif, "Playfair Display", Georgia, serif);
    font-size: var(--pylo-fs-h3, clamp(1.2rem, 2.2vw, 1.4rem));
    font-weight: 600;
    line-height: 1.25;
    color: var(--section-title-color, var(--pylo-green-dark, #0f261c));
    margin-bottom: 8px;
}

.pylo-store-newsletter__desc {
    font-size: var(--pylo-section-desc-size, 15px);
    line-height: var(--pylo-section-desc-lh, 1.7);
    color: var(--section-desc-color, var(--pylo-muted, #5c5c5c));
    margin: 0;
    max-width: 480px;
    text-align: left;
}

.pylo-store-newsletter__form {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex: 1;
    min-width: 280px;
    max-width: 480px;
}

.pylo-store-newsletter__input {
    flex: 1;
    border: 1px solid #ddd;
    border-right: 0;
    border-radius: 999px 0 0 999px;
    padding: 13px 18px;
    font-size: 15px;
    outline: none;
    background: #fff;
}

.pylo-store-newsletter__btn {
    border: 0;
    border-radius: 0 999px 999px 0;
    padding: 13px 24px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: var(--primary, var(--pylo-green, #1a3d2e));
    color: #fff;
    white-space: nowrap;
    transition: background 0.2s;
}

.pylo-store-newsletter__btn:hover {
    background: var(--hov-primary, var(--pylo-green-dark, #0f261c));
}

.leaflet-container {
    font-family: var(--pylo-sans, "Public Sans", sans-serif);
}

.pylo-store-marker-wrap {
    background: transparent !important;
    border: none !important;
}

.pylo-store-pin {
    display: block;
    line-height: 0;
    transform-origin: center bottom;
    transition: transform 0.2s ease;
}

.pylo-store-pin__body {
    fill: #e53935;
    stroke: #ffffff;
    stroke-width: 1.5;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}

.pylo-store-pin__dot {
    fill: #ffffff;
}

.pylo-store-pin.is-active {
    transform: scale(1.18);
    z-index: 1000 !important;
}

.pylo-store-pin.is-active .pylo-store-pin__body {
    fill: #c62828;
    stroke-width: 2;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
}

@media (max-width: 991.98px) {
    .pylo-store-page__layout {
        grid-template-columns: 1fr;
    }

    .pylo-store-page__cards {
        max-height: none;
    }

    .pylo-store-page__map {
        height: 320px;
    }

    .pylo-store-newsletter__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .pylo-store-newsletter__form {
        max-width: none;
    }
}

@media (max-width: 575.98px) {
    .pylo-store-page .pylo-hero__eyebrow {
        font-size: var(--pylo-banner-eyebrow-size, 10px);
    }

    .pylo-store-page .pylo-hero__h1 {
        font-size: var(--pylo-banner-title-size, clamp(1.1rem, 4.6vw, 1.35rem));
        line-height: var(--pylo-banner-title-lh, 1.25);
    }

    .pylo-store-page .pylo-hero__subtitle {
        font-size: var(--pylo-banner-desc-size, 12px);
        line-height: var(--pylo-banner-desc-lh, 1.4);
    }

    .pylo-store-page__gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .pylo-store-lightbox {
        padding: 16px;
    }

    .pylo-store-lightbox__prev {
        left: 8px;
    }

    .pylo-store-lightbox__next {
        right: 8px;
    }

    .pylo-store-lightbox__close {
        top: 8px;
        right: 8px;
    }
}

/* Section mô tả — align with home type scale */
.pylo-store-page__subtitle,
.pylo-store-newsletter__desc {
    font-size: var(--pylo-section-desc-size, 15px);
    line-height: var(--pylo-section-desc-lh, 1.7);
    text-align: left;
}

@media (min-width: 768px) {
    .pylo-store-page__subtitle,
    .pylo-store-newsletter__desc {
        text-align: justify;
        text-justify: inter-word;
    }
}

@media (max-width: 767.98px) {
    .pylo-store-page,
    .pylo-store-page p,
    .pylo-store-page li,
    .pylo-store-page__intro,
    .pylo-store-page__body,
    .pylo-store-page__card p {
        font-size: var(--pylo-fs-base, 14px) !important;
        line-height: var(--pylo-lh-body, 1.55) !important;
    }

    .pylo-store-page h2,
    .pylo-store-page__title,
    .pylo-store-page__section-title {
        font-size: var(--pylo-fs-h2, clamp(1.25rem, 4.8vw, 1.5rem)) !important;
        line-height: var(--pylo-lh-tight, 1.25) !important;
    }

    .pylo-store-page h3 {
        font-size: var(--pylo-fs-h3, clamp(1.1rem, 4.2vw, 1.3rem)) !important;
    }

    .pylo-store-page .btn,
    .pylo-store-newsletter__form .btn {
        font-size: var(--pylo-fs-sm, 12px) !important;
    }
}
