/* PharmaWorks online shop - the pharmacy's own storefront. Light, product first, built for phones.
   The shop's CSP forbids inline styles, so every style lives here. Colours are tokens: a pharmacy's
   brand is set here once (Healthcare: teal buttons, red top bar, as on its own site). */
:root {
    --shop-primary: #0e8f8a;
    --shop-primary-strong: #0a6f6b;
    --shop-primary-soft: #e3f4f3;
    --shop-accent: #e3262c;
    --shop-ink: #16231f;
    --shop-muted: #5f6b76;
    --shop-bg: #f5f7f7;
    --shop-card: #ffffff;
    --shop-line: #e2e8e7;
    --shop-radius: 14px;
    --shop-wa: #1fa855;
}
body.shop { background: var(--shop-bg); color: var(--shop-ink); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
.shop-wide { max-width: 1240px; margin: 0 auto; padding: 0 1rem; }
.shop-main { max-width: 1240px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

/* Top bar and header */
.shop-topbar { background: var(--shop-accent); color: #fff; font-size: .8rem; padding: .35rem 0; }
.shop-topbar a { color: #fff; text-decoration: none; }
.shop-topbar a:hover { text-decoration: underline; }
.shop-header { background: var(--shop-card); border-bottom: 1px solid var(--shop-line); position: sticky; top: 0; z-index: 20; }
.shop-header-row { display: flex; align-items: center; gap: 1rem; padding-top: .7rem; padding-bottom: .7rem; }
.shop-header .brand { font-weight: 800; font-size: 1.05rem; color: var(--shop-ink); text-decoration: none; display: flex; align-items: center; gap: .6rem; flex: none; }
.shop-header .brand img { height: 42px; width: auto; }
.shop-search { flex: 1; display: flex; min-width: 0; border: 2px solid var(--shop-primary); border-radius: 999px; overflow: hidden; background: #fff; }
.shop-search input { flex: 1; min-width: 0; border: 0; padding: .55rem 1rem; outline: none; font-size: .95rem; }
.shop-search button { border: 0; background: var(--shop-primary); color: #fff; padding: 0 1.1rem; }
.shop-search button svg { width: 20px; height: 20px; }
.shop-actions { display: flex; align-items: center; gap: .5rem; flex: none; }

/* Branch picker and category menu: <details> drop-downs, so they work without script */
.shop-pick, .shop-catmenu { position: relative; }
.shop-pick summary, .shop-catmenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .4rem; }
.shop-pick summary::-webkit-details-marker, .shop-catmenu summary::-webkit-details-marker { display: none; }
.shop-pick summary { border: 1px solid var(--shop-line); border-radius: 999px; padding: .25rem .8rem .25rem .6rem; font-size: .88rem; font-weight: 600; }
.shop-pick summary:hover { border-color: var(--shop-primary); }
.shop-pick summary svg { width: 20px; height: 20px; color: var(--shop-primary); }
.shop-pick summary small { display: block; font-weight: 400; color: var(--shop-muted); font-size: .7rem; line-height: 1; }
.shop-pick .menu, .shop-catmenu .menu { position: absolute; z-index: 30; background: #fff; border: 1px solid var(--shop-line); border-radius: 12px; box-shadow: 0 12px 30px rgba(16, 24, 40, .14); padding: .4rem; }
.shop-pick .menu { right: 0; top: calc(100% + .4rem); width: 300px; }
.shop-pick .menu .hint { font-size: .78rem; color: var(--shop-muted); padding: .3rem .6rem .5rem; }
.shop-pick .menu a { display: block; padding: .5rem .6rem; border-radius: 8px; color: var(--shop-ink); text-decoration: none; }
.shop-pick .menu a span { display: block; color: var(--shop-muted); font-size: .78rem; }
.shop-pick .menu a:hover, .shop-pick .menu a.active { background: var(--shop-primary-soft); }
.shop-nav { border-top: 1px solid var(--shop-line); }
.shop-nav a, .shop-catmenu summary { color: var(--shop-ink); text-decoration: none; font-size: .9rem; font-weight: 600; padding: .55rem .75rem; border-radius: 8px; }
.shop-nav a:hover, .shop-catmenu summary:hover { color: var(--shop-primary-strong); background: var(--shop-primary-soft); }
.shop-nav a.wa { color: var(--shop-wa); margin-left: auto; }
.shop-nav a.rx { margin-left: auto; background: var(--shop-primary); color: #fff; }
.shop-nav a.rx:hover { background: var(--shop-primary-strong); color: #fff; }
.shop-catmenu summary { background: var(--shop-primary); color: #fff; }
.shop-catmenu summary:hover { background: var(--shop-primary-strong); color: #fff; }
.shop-catmenu summary svg { width: 18px; height: 18px; }
.shop-catmenu .menu { left: 0; top: calc(100% + .2rem); width: min(560px, 92vw); max-height: 70vh; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 0 .5rem; }
.shop-catmenu .menu a { display: flex; justify-content: space-between; font-weight: 500; padding: .4rem .6rem; }
.shop-catmenu .menu a span { color: var(--shop-muted); font-size: .8rem; }

/* Basket link */
.shop-basket-link { position: relative; display: inline-flex; align-items: center; gap: .35rem; color: var(--shop-ink); text-decoration: none; font-size: .9rem; font-weight: 600; border: 1px solid var(--shop-line); border-radius: 999px; padding: .4rem .9rem; background: var(--shop-card); }
.shop-basket-link:hover { border-color: var(--shop-primary); color: var(--shop-primary-strong); }
.shop-basket-link svg { width: 20px; height: 20px; }
.shop-basket-link .count { background: var(--shop-accent); color: #fff; border-radius: 999px; min-width: 1.4rem; padding: 0 .4rem; font-size: .75rem; text-align: center; line-height: 1.4rem; }

/* Hero */
/* Home-page banners: a scroll-snap strip, so it works with no script at all; shop.js adds the turning. */
.shop-slider { position: relative; margin-bottom: 2rem; border-radius: 20px; overflow: hidden; border: 1px solid var(--shop-line); background: var(--shop-primary-soft); }
.shop-slider .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.shop-slider .track::-webkit-scrollbar { display: none; }
.shop-slider .slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 8 / 3; display: block; color: #fff; text-decoration: none; }
.shop-slider .slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
/* Words sit bottom-left over a fade from the bottom: photos of people keep their faces in the top half clear. */
.shop-slider .cap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: .5rem; padding: 2rem 3.5rem 2.6rem; background: linear-gradient(0deg, rgba(5, 30, 29, .82), rgba(5, 30, 29, .35) 45%, rgba(5, 30, 29, 0) 75%); }
.shop-slider .cap > * { max-width: 46rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.shop-slider .cap .go { text-shadow: none; }
.shop-slider .cap strong { font-size: clamp(1.25rem, 3vw, 2.3rem); font-weight: 800; line-height: 1.15; }
.shop-slider .cap .txt { font-size: 1rem; opacity: .92; }
.shop-slider .cap .go { background: var(--shop-accent); color: #fff; border-radius: 999px; padding: .45rem 1.1rem; font-weight: 700; font-size: .92rem; margin-top: .3rem; }
.shop-slider .slide:hover .go, .shop-slider .slide:focus-visible .go { filter: brightness(1.08); }
.shop-slider .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; padding: 0 0 .2rem; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .9); color: var(--shop-ink, #0f172a); font-size: 1.6rem; line-height: 1; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
.shop-slider .prev { left: .7rem; }
.shop-slider .next { right: .7rem; }
.shop-slider .dots { position: absolute; bottom: .7rem; left: 0; right: 0; display: flex; justify-content: center; gap: .4rem; }
.shop-slider .dots button { width: .6rem; height: .6rem; border-radius: 999px; border: 0; padding: 0; background: rgba(255, 255, 255, .6); }
.shop-slider .dots button.on { width: 1.5rem; background: #fff; }
.shop-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; background: linear-gradient(120deg, var(--shop-primary-soft), #fff 70%); border: 1px solid var(--shop-line); border-radius: 20px; padding: 2.5rem; margin-bottom: 2rem; }
.shop-hero .eyebrow { display: inline-block; background: #fff; border: 1px solid var(--shop-line); color: var(--shop-primary-strong); border-radius: 999px; font-size: .8rem; font-weight: 600; padding: .2rem .75rem; margin-bottom: .9rem; }
.shop-hero h1 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); font-weight: 800; line-height: 1.12; margin-bottom: .8rem; }
.shop-hero p { color: var(--shop-muted); font-size: 1.02rem; max-width: 34rem; margin-bottom: 1.3rem; }
.shop-hero .collage { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.shop-hero .collage span { background: #fff; border: 1px solid var(--shop-line); border-radius: 16px; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 22px rgba(16, 24, 40, .06); }
.shop-hero .collage img { max-width: 80%; max-height: 80%; object-fit: contain; }
.btn-outline-shop { border: 2px solid var(--shop-primary); color: var(--shop-primary-strong); background: #fff; }
.btn-outline-shop:hover { background: var(--shop-primary-soft); color: var(--shop-primary-strong); border-color: var(--shop-primary); }

/* Sections, tiles */
.shop-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .9rem; }
.shop-section-head h2 { font-size: 1.3rem; font-weight: 800; margin: 0; }
.shop-section-head a { color: var(--shop-primary-strong); font-weight: 600; text-decoration: none; font-size: .9rem; white-space: nowrap; }
.shop-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.shop-tile { background: #fff; border: 1px solid var(--shop-line); border-radius: var(--shop-radius); padding: .9rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .25rem; color: var(--shop-ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.shop-tile:hover { border-color: var(--shop-primary); box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
.shop-tile .pic { width: 84px; height: 84px; border-radius: 50%; background: var(--shop-primary-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: .3rem; }
.shop-tile .pic img { max-width: 78%; max-height: 78%; object-fit: contain; }
.shop-tile .name { font-weight: 700; font-size: .9rem; line-height: 1.2; }
.shop-tile .count { color: var(--shop-muted); font-size: .78rem; }
.shop-crumbs { font-size: .82rem; color: var(--shop-muted); margin-bottom: .8rem; }
.shop-crumbs a { color: var(--shop-primary-strong); text-decoration: none; }
.shop-crumbs span { margin: 0 .2rem; }

/* Cards */
.shop-card { background: var(--shop-card); border: 1px solid var(--shop-line); border-radius: var(--shop-radius); }
.shop-branch { padding: 1.1rem 1.2rem; height: 100%; display: flex; flex-direction: column; gap: .35rem; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.shop-branch:hover, .shop-branch.current { border-color: var(--shop-primary); box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
.shop-branch .name { font-weight: 700; font-size: 1.1rem; }
.shop-branch .meta { color: var(--shop-muted); font-size: .88rem; }
.shop-branch .count { margin-top: auto; color: var(--shop-primary-strong); font-weight: 600; font-size: .9rem; }
.shop-cats { display: flex; flex-wrap: wrap; gap: .4rem; }
.shop-cats a { border: 1px solid var(--shop-line); background: var(--shop-card); color: var(--shop-ink); border-radius: 999px; padding: .25rem .8rem; font-size: .85rem; text-decoration: none; }
.shop-cats a.active, .shop-cats a:hover { border-color: var(--shop-primary); color: var(--shop-primary-strong); background: var(--shop-primary-soft); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .9rem; }
.shop-product { display: flex; flex-direction: column; overflow: hidden; color: inherit; text-decoration: none; height: 100%; transition: border-color .15s, box-shadow .15s; }
.shop-product:hover { border-color: var(--shop-primary); box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
.shop-product .img { aspect-ratio: 1 / 1; background: #fff; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--shop-line); color: inherit; text-decoration: none; }
.shop-product .img img { max-width: 84%; max-height: 84%; object-fit: contain; }
.shop-product .img .none, .shop-detail .img .none { color: var(--shop-muted); font-size: .8rem; }
.shop-product .body { padding: .65rem .75rem .8rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.shop-product .pcat { color: var(--shop-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; }
.shop-product .pname { font-size: .9rem; line-height: 1.25; font-weight: 600; color: inherit; text-decoration: none; }
.shop-product a.pname:hover { color: var(--shop-primary-strong); }
.shop-product .price, .shop-detail .price { font-weight: 800; color: var(--shop-ink); margin-top: auto; font-size: 1.05rem; }
.shop-product form { margin-top: .35rem; }
.shop-stock { font-size: .76rem; color: var(--shop-primary-strong); }
.shop-stock.low { color: #b45309; }
.shop-detail .img { background: #fff; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }
.shop-detail .img img { max-width: 90%; max-height: 90%; object-fit: contain; }
.shop-detail .price { font-size: 1.8rem; }
.shop-promise { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .4rem; font-size: .92rem; }
.shop-promise li { padding-left: 1.4rem; position: relative; }
.shop-promise li::before { content: ""; position: absolute; left: 0; top: .45rem; width: .65rem; height: .35rem; border-left: 2px solid var(--shop-primary); border-bottom: 2px solid var(--shop-primary); transform: rotate(-45deg); }
.shop-note { background: var(--shop-primary-soft); color: var(--shop-primary-strong); border-radius: 10px; padding: .7rem .9rem; font-size: .9rem; }
.btn-shop { background: var(--shop-primary); border-color: var(--shop-primary); color: #fff; font-weight: 600; }
.btn-shop:hover { background: var(--shop-primary-strong); border-color: var(--shop-primary-strong); color: #fff; }
.btn-shop.added { background: var(--shop-primary-strong); }

/* Basket and order (phase 2) */
.shop-qty { width: 5.5rem; text-align: center; }
.shop-line { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--shop-line); }
.shop-line:last-child { border-bottom: 0; }
.shop-line .thumb { width: 52px; height: 52px; flex: none; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--shop-line); border-radius: 8px; }
.shop-line .thumb img { max-width: 90%; max-height: 90%; object-fit: contain; }
.shop-line .pname { color: var(--shop-ink); text-decoration: none; font-weight: 500; font-size: .92rem; }
.shop-line.removed { opacity: .45; }
.shop-line.total { background: var(--shop-bg); border-radius: 0 0 var(--shop-radius) var(--shop-radius); }
.checkout .address { display: none; }
.checkout:has(#f-delivery:checked) .address { display: block; }
.checkout fieldset legend { font-size: 1rem; }
.shop-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; counter-reset: step; }
.shop-steps li { position: relative; padding-top: .9rem; border-top: 4px solid var(--shop-line); font-size: .82rem; color: var(--shop-muted); }
.shop-steps li.done { border-top-color: var(--shop-primary); color: var(--shop-ink); }
.shop-steps li.now { border-top-color: var(--shop-primary); color: var(--shop-primary-strong); font-weight: 700; }

/* Trust strip and footer */
.shop-trust { background: var(--shop-card); border-top: 1px solid var(--shop-line); }
.shop-trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; padding-top: 1.2rem; padding-bottom: 1.2rem; }
.shop-trust strong { display: block; font-size: .92rem; }
.shop-trust span { color: var(--shop-muted); font-size: .84rem; }
.shop-footer { color: #cfd8d6; font-size: .86rem; background: #10201d; padding-top: 2rem; }
.shop-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 1.5rem; }
.shop-footer-grid .fw-bold { color: #fff; }
.shop-footer-grid p { margin-bottom: .5rem; max-width: 26rem; }
.shop-footer-grid a { display: block; color: #cfd8d6; text-decoration: none; padding: .12rem 0; }
.shop-footer-grid a:hover { color: #fff; }
.shop-footer-base { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 1rem; padding-bottom: 1.2rem; font-size: .78rem; color: #93a3a0; }

/* Information pages */
.shop-infonav { padding: .4rem; display: flex; flex-direction: column; }
.shop-infonav a { padding: .5rem .7rem; border-radius: 8px; color: var(--shop-ink); text-decoration: none; font-size: .92rem; }
.shop-infonav a:hover, .shop-infonav a.active { background: var(--shop-primary-soft); color: var(--shop-primary-strong); font-weight: 600; }
.shop-info { padding: 1.6rem 1.8rem; line-height: 1.65; }
.shop-info h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 1rem; }
.shop-info h2 { font-size: 1.1rem; font-weight: 700; margin: 1.3rem 0 .4rem; }
.shop-info a { color: var(--shop-primary-strong); }

/* WhatsApp */
.shop-wa-float { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; display: inline-flex; align-items: center; gap: .5rem; background: var(--shop-wa); color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; border-radius: 999px; padding: .6rem 1rem .6rem .7rem; box-shadow: 0 8px 22px rgba(0, 0, 0, .2); }
.shop-wa-float:hover { color: #fff; filter: brightness(.95); }
.shop-wa-float svg { width: 26px; height: 26px; }

@media (max-width: 991px) {
    .shop-header-row { flex-wrap: wrap; }
    .shop-search { order: 3; flex-basis: 100%; }
    .shop-actions { margin-left: auto; }
    .shop-hero { grid-template-columns: 1fr; padding: 1.6rem; }
    .shop-slider .slide { aspect-ratio: 4 / 3; }
    .shop-slider .cap { padding: 1.2rem 1.2rem 2.2rem; }
    .shop-slider .cap .txt { font-size: .9rem; }
    .shop-slider .nav { display: none; }
    .shop-hero .collage { grid-template-columns: repeat(4, 1fr); }
    .shop-footer-grid { grid-template-columns: 1fr 1fr; }
}
/* Offers: the badge on a card, the usual price struck through, and the Offers link in the menu. */
.shop-product { position: relative; }
.shop-offer-badge { position: absolute; top: .55rem; left: .55rem; z-index: 2; background: var(--shop-accent); color: #fff; border-radius: 999px; padding: .12rem .55rem; font-size: .72rem; font-weight: 700; max-width: calc(100% - 3.5rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-offer-badge.inline { position: static; display: inline-block; vertical-align: middle; margin-left: .4rem; font-size: .8rem; }
.price s.was { color: var(--shop-muted); font-weight: 500; font-size: .82em; margin-left: .35rem; white-space: nowrap; }
.shop-product .price s.was { display: block; margin-left: 0; font-size: .78rem; }
.shop-nav a.offers { color: var(--shop-accent); }
/* Save for later: the heart on a card and the button on a product page. */
.shop-save { position: absolute; top: .45rem; right: .45rem; z-index: 2; width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 1px solid var(--shop-line); background: rgba(255, 255, 255, .92); color: var(--shop-muted); display: flex; align-items: center; justify-content: center; padding: 0; }
.shop-save:hover { color: var(--shop-accent); border-color: var(--shop-accent); }
.shop-save[aria-pressed="true"] { color: var(--shop-accent); border-color: var(--shop-accent); }
.shop-save[aria-pressed="true"] svg { fill: currentColor; }
.shop-save-big[aria-pressed="true"] { background: var(--shop-primary-soft); }
/* Home: department shortcuts and the pharmacist strip. */
.shop-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.shop-shortcuts a { display: flex; align-items: center; gap: .7rem; background: #fff; border: 1px solid var(--shop-line); border-radius: var(--shop-radius); padding: .7rem .9rem; color: var(--shop-ink); text-decoration: none; font-weight: 700; font-size: .95rem; transition: border-color .15s, box-shadow .15s; }
.shop-shortcuts a:hover { border-color: var(--shop-primary); box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
.shop-shortcuts .pic { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--shop-primary-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.shop-shortcuts .pic img { max-width: 78%; max-height: 78%; object-fit: contain; }
.shop-pharmacist { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; background: var(--shop-primary-soft); border: 1px solid #c7e7e4; border-radius: 18px; padding: 1.4rem 1.6rem; }
.shop-pharmacist h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: .3rem; }
.shop-pharmacist p { margin: 0; color: var(--shop-muted); max-width: 40rem; }
/* The department menu: departments with their categories under them. */
.shop-catmenu .menu.grouped { display: block; columns: 2; column-gap: .8rem; }
.shop-catmenu .menu.grouped a { break-inside: avoid; }
.shop-catmenu .menu a.dept { font-weight: 800; color: var(--shop-primary-strong); margin-top: .3rem; }
.shop-catmenu .menu a.sub { padding-left: 1.2rem; }
.shop-catmenu .menu .dept-head { font-weight: 800; color: var(--shop-muted); padding: .5rem .6rem .2rem; font-size: .85rem; }
@media (max-width: 991px) {
    .shop-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Money off on the basket: when quantities change after the discount was worked out, grey the figures until it is worked out again. */
.shop-discount .stale-note { display: none; }
.shop-discount.stale table { opacity: .45; }
.shop-discount.stale .stale-note { display: block; }

/* Brands, guides and reviews. */
.shop-brand-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.shop-brand-chips a { border: 1px solid var(--shop-line); border-radius: 999px; padding: .4rem .9rem; background: var(--shop-card); color: var(--shop-ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.shop-brand-chips a:hover { border-color: var(--shop-primary); color: var(--shop-primary-strong); }
.shop-guides { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.shop-guide-card { display: flex; flex-direction: column; gap: .35rem; background: #fff; border: 1px solid var(--shop-line); border-radius: var(--shop-radius); padding: .9rem; color: var(--shop-ink); text-decoration: none; }
.shop-guide-card:hover { border-color: var(--shop-primary); }
.shop-guide-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--shop-radius) - 4px); }
.shop-guide-card .t { font-weight: 700; }
.shop-guide-card .s { color: var(--shop-muted, #64748b); font-size: .9rem; }
.shop-article { max-width: 48rem; }
.shop-narrow { max-width: 36rem; }
.shop-article .cover { width: 100%; max-height: 22rem; object-fit: cover; border-radius: var(--shop-radius); margin: .5rem 0 1rem; }
.shop-article h2 { font-size: 1.15rem; font-weight: 700; margin-top: 1.4rem; }
.shop-stars { color: #b45309; text-decoration: none; }
.shop-stars-pick { display: inline-flex; flex-direction: row-reverse; gap: .2rem; }
.shop-stars-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.shop-stars-pick label { font-size: 2rem; line-height: 1; color: #cbd5e1; cursor: pointer; }
.shop-stars-pick input:checked ~ label, .shop-stars-pick label:hover, .shop-stars-pick label:hover ~ label { color: #b45309; }
.shop-stars-pick input:focus-visible + label { outline: 2px solid var(--shop-primary); outline-offset: 2px; }

/* On a phone the account link is an icon, like the basket. */
@media (max-width: 575px) { .shop-account-link > span { display: none; } }
/* Branch, account, saved and basket in one row fit a 360px phone only with tighter buttons (it was 3px too wide). */
@media (max-width: 400px) {
    .shop-header .shop-actions { gap: .3rem; }
    .shop-header .shop-basket-link { padding: .4rem .6rem; }
}
/* The smallest phones: the branch name shortens rather than pushing the page sideways. */
@media (max-width: 359px) {
    .shop-header .shop-pick > summary > span { display: block; max-width: 5.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* The cookie and measurement consent bar (only for a pharmacy with analytics switched on). */
.shop-consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--shop-line); box-shadow: 0 -6px 20px rgba(16, 24, 40, .1); padding: .8rem 0; font-size: .88rem; }

@media (max-width: 575px) {
    .shop-topbar .d-flex.gap-3 { display: none !important; }
    /* With a logo the picture is the brand; without one the name stays, in a smaller size. */
    .shop-header .brand.has-logo span { display: none; }
    .shop-header .brand { font-size: .95rem; min-width: 0; flex: 1 1 0; }
    .shop-header .shop-actions { flex: none; }
    .shop-pick summary small { display: none; }
    .shop-header .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    /* Categories scroll sideways on a phone instead of filling the screen before the first product. */
    .shop-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; }
    .shop-cats::-webkit-scrollbar { display: none; }
    .shop-cats a { flex: none; white-space: nowrap; }
    .shop-list-search { width: 100%; }
    .shop-list-search input { flex: 1 1 auto; min-width: 0; }
    .shop-basket-link > span:not(.count) { display: none; }
    .shop-nav a:not(.wa):not(.offers):not(.rx) { display: none; }
    .shop-catmenu .menu.grouped { columns: 1; }
    .shop-shortcuts a { padding: .55rem .6rem; font-size: .85rem; gap: .5rem; }
    .shop-shortcuts .pic { width: 36px; height: 36px; }
    .shop-nav a.wa { display: none; }
    .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .shop-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
    .shop-tile { padding: .6rem .4rem; }
    .shop-tile .pic { width: 56px; height: 56px; }
    .shop-pick .menu { width: 88vw; right: -3.5rem; }
    .shop-footer-grid { grid-template-columns: 1fr; gap: 1.2rem; }
    .shop-wa-float span { display: none; }
    .shop-wa-float { padding: .6rem; }
    .shop-line { flex-wrap: wrap; }
    .shop-line .flex-grow-1 { flex-basis: calc(100% - 70px); }
}

/* "Shop by category" down the side (home page and product list), wide screens only: the top menu covers phones. */
.shop-with-side { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.shop-with-side.home { margin-bottom: 2rem; }
.shop-with-side.home .shop-slider, .shop-with-side.home .shop-hero { margin-bottom: 0; }
.shop-with-side.home .shop-hero { min-height: 100%; }
.shop-side { background: var(--shop-card); border: 1px solid var(--shop-line); border-radius: var(--shop-radius); overflow: hidden; position: sticky; top: 8.5rem; max-height: calc(100vh - 10rem); display: flex; flex-direction: column; }
.shop-side .head { display: flex; align-items: center; gap: .5rem; background: linear-gradient(100deg, var(--shop-primary-strong), var(--shop-primary)); color: #fff; font-weight: 700; padding: .8rem 1rem; flex: none; }
.shop-side .head svg { width: 18px; height: 18px; }
.shop-side .scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.shop-side .list { padding: .35rem; }
.shop-side a, .shop-side summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .65rem; border-radius: 8px; color: var(--shop-ink); text-decoration: none; font-size: .9rem; font-weight: 500; line-height: 1.25; }
.shop-side summary { cursor: pointer; list-style: none; font-weight: 600; }
.shop-side summary::-webkit-details-marker { display: none; }
.shop-side summary::after { content: "›"; color: var(--shop-muted); font-size: 1.1rem; transition: transform .15s; margin-left: .25rem; }
.shop-side details[open] > summary::after { transform: rotate(90deg); }
.shop-side .nm { flex: 1; min-width: 0; }
.shop-side .ct { flex: none; min-width: 1.6rem; text-align: center; font-size: .72rem; font-weight: 600; color: var(--shop-primary-strong); background: var(--shop-primary-soft); border-radius: 999px; padding: .05rem .4rem; }
.shop-side a:hover, .shop-side summary:hover { background: var(--shop-primary-soft); color: var(--shop-primary-strong); }
.shop-side a.active { background: var(--shop-primary-soft); color: var(--shop-primary-strong); font-weight: 700; }
.shop-side a.sub { padding-left: 1.4rem; font-size: .86rem; }
.shop-side details.more > summary { color: var(--shop-primary-strong); font-size: .86rem; }
.shop-side .sub-head { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--shop-muted); padding: .7rem 1rem .2rem; border-top: 1px solid var(--shop-line); flex: none; }
.shop-side .sub-head.inner { padding: .6rem .65rem .2rem; }
.shop-side a.all { flex: none; border-top: 1px solid var(--shop-line); border-radius: 0; color: var(--shop-primary-strong); font-weight: 600; padding: .7rem 1rem; justify-content: flex-start; }
@media (max-width: 991px) {
    .shop-with-side { display: block; }
    .shop-side { display: none; }
    .shop-with-side.home { margin-bottom: 2rem; }
}
/* On the home page the side list sits beside the banner, as tall as the banner, and scrolls inside itself. */
@media (min-width: 992px) {
    /* The banner sets the row's height; the side list fills it and scrolls inside itself. */
    .shop-with-side.home { position: relative; }
    .shop-with-side.home .side-main { grid-column: 2; }
    .shop-with-side.home .shop-side { position: absolute; top: 0; bottom: 0; left: 0; width: 260px; max-height: none; }
}

/* Sort and price range above a product list. */
.shop-sortbar .form-select { min-width: 11rem; }
.shop-sortbar .shop-price-box { width: 7rem; }
@media (max-width: 575.98px) {
    .shop-sortbar > div { flex: 1 1 40%; }
    .shop-sortbar .form-select, .shop-sortbar .shop-price-box { width: 100%; min-width: 0; }
}
