/* aleg.com public site. Mobile first; the product page splits into list + map from 900px. */
:root {
    --green: #1f6f43;
    --green-dark: #17543a;
    --text: #1d2321;
    --muted: #66706b;
    --line: #e2e6e3;
    --bg: #f6f8f7;
    --header-h: 3.25rem;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--green); }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

.site-header {
    position: sticky; top: 0; z-index: 1000;
    height: var(--header-h); padding: 0 1rem;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--green); color: #fff;
}
.logo { color: #fff; font-weight: 700; font-size: 1.25rem; text-decoration: none; letter-spacing: -.02em; }
.logo span { opacity: .7; font-weight: 400; }
.back { color: #fff; text-decoration: none; font-size: .95rem; }

/* Home */
.home { max-width: 44rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.intro h1 { font-size: 1.6rem; line-height: 1.2; margin: .5rem 0; }
.intro p { color: var(--muted); margin: 0 0 1.25rem; }
.search input {
    width: 100%; padding: .85rem 1rem; font-size: 1.05rem;
    border: 2px solid var(--line); border-radius: .75rem; background: #fff;
}
.search input:focus { outline: none; border-color: var(--green); }
.product-list { list-style: none; margin: 1rem 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; }
.product-list li + li { border-top: 1px solid var(--line); }
.product-list a { display: flex; gap: 1rem; justify-content: space-between; align-items: center; padding: .85rem 1rem; color: inherit; text-decoration: none; }
.product-list a:hover, .product-list a:focus { background: #eef5f1; }
.product-list .count { flex: none; font-size: .85rem; color: var(--green); white-space: nowrap; }
.product-list .count.none { color: var(--muted); }
.updated { font-size: .85rem; }

/* "Buy from NaturPharma": first under the search, and on the product page */
.shop-offer {
    display: flex; gap: .85rem; align-items: center;
    margin: .75rem 0; padding: .75rem; color: inherit; text-decoration: none;
    background: #fff; border: 2px solid var(--green); border-radius: .75rem;
}
a.shop-offer:hover, a.shop-offer:focus { background: #eef5f1; }
.shop-image { flex: none; width: 3.5rem; height: 3.5rem; object-fit: contain; }
.shop-text { flex: 1; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.shop-name { font-weight: 600; }
.shop-detail { font-size: .9rem; color: var(--muted); }
.shop-action {
    flex: none; padding: .55rem .85rem; border-radius: .5rem;
    background: var(--green); color: #fff; font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap;
}
a.shop-action:hover, a.shop-offer:hover .shop-action { background: var(--green-dark); }
.shop-offer.unavailable { border-color: var(--line); }
.shop-offer.unavailable .shop-action { background: #fff; color: var(--green); border: 1px solid var(--green); }
.panel .shop-offer { margin: .5rem 0 .75rem; }

/* Product page */
.map { height: 55vh; height: 55dvh; background: #dde3e0; }
.panel { padding: 1rem; }
.panel h1 { font-size: 1.25rem; margin: 0 0 .25rem; }
.summary { margin: 0 0 .75rem; color: var(--muted); }
.locate {
    width: 100%; padding: .75rem 1rem; font-size: 1rem; font-weight: 600;
    color: #fff; background: var(--green); border: 0; border-radius: .6rem; cursor: pointer;
}
.locate:hover { background: var(--green-dark); }
.locate:disabled { opacity: .7; cursor: wait; }
.pharmacy-list { list-style: none; margin: 1rem 0; padding: 0; }
.pharmacy-list li { background: #fff; border: 1px solid var(--line); border-radius: .6rem; margin-bottom: .5rem; }
.pharmacy {
    display: flex; gap: .75rem; align-items: flex-start; width: 100%;
    padding: .75rem; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.pharmacy .dot { flex: none; width: .75rem; height: .75rem; border-radius: 50%; margin-top: .3rem; background: var(--chain); }
.pharmacy .dot-bundle { background: #fff; box-shadow: inset 0 0 0 3px var(--chain); }
.bundle-note { display: block; margin-top: .2rem; font-size: .8rem; color: #8a5a00; }
.pharmacy .info { flex: 1; display: flex; flex-direction: column; gap: .15rem; }
.pharmacy .info .muted { font-size: .9rem; }
.pharmacy .distance { flex: none; font-weight: 600; color: var(--green); white-space: nowrap; }
.pharmacy-list .actions, .popup-actions { display: flex; gap: 1rem; padding: 0 .75rem .75rem 2.25rem; font-size: .9rem; }
.popup-actions { padding: .5rem 0 0; }
.pharmacy-list .actions a, .popup-actions a { text-decoration: none; font-weight: 600; }
.status { display: inline-block; margin-top: .25rem; padding: .1rem .5rem; border-radius: 1rem; font-size: .8rem; background: #e3f3e9; color: var(--green-dark); }
.status-limited, .status-pre_reservation { background: #fff3d6; color: #8a5a00; }

@media (min-width: 900px) {
    .product-page { display: flex; flex-direction: row-reverse; height: calc(100vh - var(--header-h)); }
    .map { flex: 1; height: 100%; }
    .panel { width: 26rem; overflow-y: auto; border-right: 1px solid var(--line); }
}
