/* SwiftGo DawaPoint storefront. Tokens first, then layout and components.
   Classes are prefixed dp- so they never collide with the older sg-/portal styles. */
/* Design tokens live in static/css/tokens.css */

body.sg, body.dp { background: var(--dp-bg); color: var(--dp-ink); font-family: var(--dp-font); margin: 0; }
body.dp { padding-bottom: 0; }
.dp *, .dp *::before, .dp *::after { box-sizing: border-box; }
.dp a { color: inherit; }
.dp h1, .dp h2, .dp h3, .dp p, .dp ul, .dp ol { margin: 0; }
.dp ul, .dp ol { padding: 0; list-style: none; }

.dp-container { width: 100%; max-width: var(--dp-container); margin: 0 auto; padding: 0 var(--dp-gutter); }
.dp-main { display: grid; gap: 56px; padding: 32px var(--dp-gutter) 72px; }
.dp-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.icon { width: 20px; height: 20px; flex: none; }
.dp :focus-visible, .sg-bottom-nav :focus-visible { outline: 3px solid var(--dp-primary); outline-offset: 2px; border-radius: 6px; }
.dp-band :focus-visible, .dp-footer :focus-visible, .dp-announce :focus-visible { outline-color: #fff; }

/* Buttons */
.dp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 22px; border: 2px solid transparent; border-radius: var(--dp-radius-pill); font: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.dp-btn-primary { background: var(--dp-primary); color: #fff; }
.dp-btn-primary:hover { background: var(--dp-primary-hover); }
.dp-btn-outline { background: var(--dp-surface); border-color: var(--dp-primary); color: var(--dp-primary); }
.dp-btn-outline:hover { background: var(--dp-primary-soft); }
.dp-btn-soft { background: var(--dp-primary-soft); color: var(--dp-primary-hover); }
.dp-btn-white { background: #fff; color: var(--dp-band); }
.dp-btn-white:hover { background: var(--dp-primary-soft); }
.dp-btn-ghost-light { border-color: #fff; color: #fff; background: transparent; }
.dp-btn-ghost-light:hover { background: rgba(255,255,255,.12); }
.dp-btn-dark { background: var(--dp-band); color: #fff; }
.dp-btn-dark:hover { background: var(--dp-ink); }
.dp-btn-block { width: 100%; }
.dp-btn[disabled] { opacity: .6; cursor: not-allowed; }
.dp-btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Announcement bar */
.dp-announce { background: var(--dp-band); color: #fff; font-size: 13px; }
.dp-announce .dp-container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding-top: 8px; padding-bottom: 8px; }

/* Header */
.dp-header { background: var(--dp-surface); border-bottom: 1px solid var(--dp-border); position: relative; z-index: 20; }
.dp-header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 14px; padding-bottom: 14px; }
.dp-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 20px; line-height: 1; }
.dp-logo-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--dp-primary); color: #fff; }
.dp-logo-mark .icon { width: 24px; height: 24px; stroke-width: 2.6; }
.dp-logo-a { font-weight: 600; color: var(--dp-muted); }
.dp-logo-b { font-weight: 800; color: var(--dp-ink); }
.dp-search { flex: 1 1 280px; display: flex; align-items: center; min-width: 0; background: var(--dp-bg); border: 1px solid var(--dp-border); border-radius: var(--dp-radius-pill); padding: 4px 4px 4px 16px; gap: 8px; }
.dp-search:focus-within { border-color: var(--dp-primary); box-shadow: 0 0 0 3px var(--dp-primary-soft); }
.dp-search .icon { color: var(--dp-muted); }
.dp-search input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--dp-ink); }
.dp-search input:focus { outline: none; }
.dp-search input::placeholder { color: var(--dp-muted); opacity: 1; }
.dp-search .dp-btn { min-height: 40px; padding: 8px 20px; }
.dp-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.dp-pill-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: var(--dp-radius-pill); font-size: 15px; font-weight: 600; text-decoration: none; }
.dp-pill-link:hover { background: var(--dp-bg); }
.dp-cart { background: var(--dp-primary-soft); color: var(--dp-primary-hover); font-weight: 700; }
.dp-cart:hover { background: #d3e9de; }
.dp-badge-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--dp-radius-pill); background: var(--dp-primary); color: #fff; font-size: 12px; font-weight: 800; }
.dp-signout { display: inline; margin: 0; }
.dp-signout button { background: none; border: 0; font: inherit; font-weight: 600; color: var(--dp-muted); cursor: pointer; min-height: 44px; padding: 0 8px; text-decoration: underline; }
.dp-cats { border-top: 1px solid var(--dp-border); }
.dp-cats ul { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 6px 0; }
.dp-cats a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border-radius: var(--dp-radius-pill); font-size: 14px; font-weight: 600; color: var(--dp-muted); text-decoration: none; }
.dp-cats a:hover { background: var(--dp-primary-soft); color: var(--dp-primary-hover); }

/* Messages */
.dp-messages { display: grid; gap: 8px; }
.dp-message { padding: 12px 16px; border-radius: 12px; background: var(--dp-primary-soft); color: var(--dp-primary-hover); font-weight: 600; }
.dp-message.is-error { background: var(--dp-rx-bg); color: var(--dp-rx-text); }

/* Hero */
.dp-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.dp-hero-card { background: var(--dp-surface); border: 1px solid var(--dp-border); border-radius: var(--dp-radius-panel); padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.dp-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: var(--dp-radius-pill); background: var(--dp-primary-soft); color: var(--dp-primary-hover); font-size: 13px; font-weight: 700; }
.dp-eyebrow .icon { width: 18px; height: 18px; }
.dp-hero h1 { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; }
.dp-lead { color: var(--dp-muted); font-size: 17px; line-height: 1.6; max-width: 54ch; }
.dp-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dp-pay-label { font-size: 13px; font-weight: 700; color: var(--dp-muted); margin-right: 4px; }
.dp-chip { padding: 5px 12px; border: 1px solid var(--dp-border); border-radius: var(--dp-radius-pill); font-size: 13px; font-weight: 600; color: var(--dp-ink); background: var(--dp-surface); }
.dp-hero-visual { position: relative; min-height: 340px; border-radius: var(--dp-radius-panel); overflow: hidden; background: var(--dp-hero-panel); }
.dp-order-card { position: absolute; left: 16px; bottom: 16px; right: 16px; max-width: 320px; background: #fff; border-radius: var(--dp-radius-card); padding: 14px 16px; box-shadow: 0 10px 30px rgba(15, 42, 36, .15); display: grid; gap: 10px; }
.dp-order-card h2 { font-size: 13px; font-weight: 800; color: var(--dp-muted); text-transform: uppercase; letter-spacing: .06em; }
.dp-order-card li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.dp-order-card li + li { margin-top: 8px; }
.dp-order-card .dp-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--dp-primary-soft); color: var(--dp-primary); flex: none; }

/* Trust strip */
.dp-trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.dp-trust-item { display: flex; gap: 14px; background: var(--dp-surface); border: 1px solid var(--dp-border); border-radius: var(--dp-radius-card); padding: 20px; }
.dp-ico-box { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--dp-primary-soft); color: var(--dp-primary); flex: none; }
.dp-trust-item h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.dp-trust-item p { color: var(--dp-muted); font-size: 14px; line-height: 1.5; }

/* Section heads */
.dp-section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.dp-section-head h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.01em; }
.dp-section-head p { color: var(--dp-muted); margin-top: 4px; }
.dp-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; color: var(--dp-primary); text-decoration: none; }
.dp-link:hover { color: var(--dp-primary-hover); text-decoration: underline; }

/* Categories */
.dp-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.dp-cat-tile { display: flex; align-items: center; gap: 14px; min-height: 44px; background: var(--dp-surface); border: 1px solid var(--dp-border); border-radius: var(--dp-radius-card); padding: 18px; text-decoration: none; transition: border-color .15s, transform .15s; }
.dp-cat-tile:hover { border-color: var(--dp-primary); transform: translateY(-2px); }
.dp-cat-tile strong { display: block; font-size: 16px; font-weight: 800; }
.dp-cat-tile span.dp-sub { display: block; color: var(--dp-muted); font-size: 13px; margin-top: 2px; }
.dp-empty { background: var(--dp-surface); border: 1px dashed var(--dp-border); border-radius: var(--dp-radius-card); padding: 24px; color: var(--dp-muted); }

/* Products */
.dp-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.dp-product { display: flex; flex-direction: column; background: var(--dp-surface); border: 1px solid var(--dp-border); border-radius: var(--dp-radius-card); overflow: hidden; }
.dp-product-img { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--dp-primary-soft); color: var(--dp-primary); }
.dp-product-img img { width: 100%; height: 100%; object-fit: cover; }
.dp-product-img .icon { width: 56px; height: 56px; opacity: .55; stroke-width: 1.5; }
.dp-rx { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: var(--dp-radius-pill); background: var(--dp-rx-bg); color: var(--dp-rx-text); font-size: 12px; font-weight: 800; }
.dp-product-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; flex: 1; }
.dp-product-cat { font-size: 12px; font-weight: 700; color: var(--dp-primary); text-transform: uppercase; letter-spacing: .05em; }
.dp-product h3 { font-size: 17px; font-weight: 800; line-height: 1.3; }
.dp-product h3 a { text-decoration: none; }
.dp-product h3 a:hover { text-decoration: underline; }
.dp-pack { color: var(--dp-muted); font-size: 14px; }
.dp-price { font-size: 20px; font-weight: 800; margin: 8px 0 12px; }
.dp-product form, .dp-product > .dp-product-body > .dp-btn { margin-top: auto; }

/* Prescription band */
.dp-band { background: var(--dp-band); color: #fff; border-radius: var(--dp-radius-panel); padding: clamp(24px, 5vw, 56px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 32px; align-items: center; }
.dp-band .dp-eyebrow { background: rgba(255,255,255,.14); color: #fff; }
.dp-band-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.dp-band h2 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; font-weight: 800; }
.dp-band p { color: var(--dp-on-dark); line-height: 1.6; max-width: 52ch; }
.dp-steps { display: grid; gap: 12px; counter-reset: step; }
.dp-step { display: flex; gap: 16px; align-items: flex-start; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: var(--dp-radius-card); padding: 16px 18px; font-weight: 700; }
.dp-step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--dp-band); font-weight: 800; flex: none; }

/* Help cards */
.dp-help { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 20px; }
.dp-help-card { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; background: var(--dp-surface); border: 1px solid var(--dp-border); border-radius: var(--dp-radius-panel); padding: clamp(24px, 3vw, 36px); }
.dp-help-card.is-soft { background: var(--dp-primary-soft); border-color: transparent; }
.dp-help-card h2 { font-size: 24px; font-weight: 800; }
.dp-help-card p { color: var(--dp-muted); line-height: 1.6; }
.dp-help-card .dp-btn-row { margin-top: auto; }

/* Footer */
.dp-footer { background: var(--dp-footer); color: var(--dp-on-dark); margin-top: 0; font-size: 14px; }
.dp-footer a { color: var(--dp-on-dark); text-decoration: none; }
.dp-footer a:hover { color: #fff; text-decoration: underline; }
.dp-footer-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; padding-top: 48px; padding-bottom: 40px; }
.dp-footer-brand { grid-column: span 2; display: grid; gap: 14px; align-content: start; max-width: 420px; }
.dp-footer .dp-logo-a { color: var(--dp-on-dark); }
.dp-footer .dp-logo-b { color: #fff; }
.dp-footer h2 { color: #fff; font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.dp-footer li a { display: inline-flex; align-items: center; min-height: 32px; }
.dp-contact { display: grid; gap: 4px; }
.dp-footer-bottom { border-top: 1px solid rgba(255,255,255,.14); }
.dp-footer-bottom .dp-container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; padding-bottom: 24px; }
.dp-footer-bottom p { max-width: 70ch; }

/* Mobile bottom navigation (shared by every customer page) */
.sg-bottom-nav a { font-family: var(--dp-font); }
.sg-bottom-nav .icon { width: 22px; height: 22px; margin: 0 auto; }
.sg-bottom-nav a { min-height: 56px; justify-content: center; }
.sg-bottom-nav a[aria-current] { color: var(--dp-primary); }

@media (max-width: 720px) {
  :root { --dp-gutter: 16px; }
  .dp-main { gap: 40px; padding-top: 20px; padding-bottom: 96px; }
  .dp-search { order: 3; flex-basis: 100%; }
  .dp-actions { margin-left: auto; }
  .dp-footer-brand { grid-column: auto; }
  .dp-footer { padding-bottom: 72px; }
  .dp-hero-visual { min-height: 300px; }
  .dp-btn-row .dp-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .dp * { transition: none !important; } }

.dp-sr-only:focus { position: fixed; z-index: 100; top: 8px; left: 8px; width: auto; height: auto; margin: 0; padding: 10px 16px; clip: auto; background: #fff; color: var(--dp-ink); border-radius: 8px; }
.dp-form-status { min-height: 0; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--dp-rx-text); }
.dp-form-status:empty { display: none; }
.dp-ico-white { background: #fff; }
.dp-contact { font-style: normal; }
.dp-main > h1 { font-size: 32px; }
.dp-help-card h1 { font-size: 30px; font-weight: 800; }

/* Prescription page */
.dp-rx-page { display: grid; gap: 20px; max-width: 900px; }
.dp-rx-form, .dp-rx-results { display: grid; gap: 18px; }
.dp-rx-form { background: var(--dp-surface); border: 1px solid var(--dp-border); border-radius: var(--dp-radius-panel); padding: clamp(20px, 3vw, 32px); }
.dp-field { display: grid; gap: 6px; }
.dp-field label { font-weight: 700; font-size: 14px; }
.dp-field input, .dp-field textarea { font: inherit; padding: 10px 14px; min-height: 44px; border: 1px solid var(--dp-border); border-radius: 12px; background: #fff; color: var(--dp-ink); }
.dp-field input:focus, .dp-field textarea:focus { outline: 3px solid var(--dp-primary-soft); border-color: var(--dp-primary); }
.dp-form-error { color: var(--dp-rx-text); font-weight: 600; font-size: 14px; }
.dp-rx-results h2 { font-size: 26px; font-weight: 800; }
.dp-rx-results h3 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }

.dp-setup-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.dp-setup-steps li { padding: 6px 14px; border-radius: var(--dp-radius-pill); background: var(--dp-surface); border: 1px solid var(--dp-border); font-size: 14px; font-weight: 600; color: var(--dp-muted); }
.dp-setup-steps li.is-done { background: var(--dp-primary-soft); color: var(--dp-primary-hover); }
.dp-setup-steps li[aria-current] { border-color: var(--dp-primary); color: var(--dp-ink); }

.sg-empty-icon .icon { width: 48px; height: 48px; color: var(--dp-primary); }
.dp-ph .icon { width: 56px; height: 56px; color: var(--dp-primary); opacity: .55; }
.dp-gallery { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0 0; }
.dp-gallery a { display: block; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 1px solid var(--dp-border); }
.dp-gallery a:focus-visible { outline: 3px solid var(--dp-primary); outline-offset: 2px; }
.dp-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }


/* --- Design fixes (Oct 2026) ------------------------------------------------ */

/* Link-styled buttons: beat the generic ".dp a / .sg a { color: inherit }" rules,
   which made "Shop medicines", "Call …" and "Set up refill reminders" dark-on-dark. */
.dp a.dp-btn-primary, .dp a.dp-btn-dark, .dp a.dp-btn-ghost-light { color: #fff; }
.dp a.dp-btn-outline { color: var(--dp-primary); }
.dp a.dp-btn-soft { color: var(--dp-primary-hover); }
.dp a.dp-btn-white { color: var(--dp-band); }

/* Header: logo, search and actions on one row on wide screens; search drops below on smaller ones. */
.dp-header-row { flex-wrap: nowrap; }
.dp-actions { flex: none; gap: 4px; }
@media (max-width: 1100px) {
  .dp-header-row { flex-wrap: wrap; }
  .dp-search { order: 3; flex-basis: 100%; }
}
@media (max-width: 560px) {
  .dp-actions .dp-label { display: none; }
  .dp-pill-link { padding: 8px 12px; }
}
.dp-cats a.is-all { color: var(--dp-ink); font-weight: 700; }

/* Hero visual: uploaded photo, or a calm illustration until one is uploaded. */
.dp-hero-photo, .dp-hero-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.dp-hero-photo { object-fit: cover; }
.dp-order-card { z-index: 1; }

/* Prescription band steps: title + one line of detail. */
.dp-step-text { display: grid; gap: 4px; padding-top: 6px; }
.dp-step-text small { font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--dp-on-dark); }

/* Prescription upload page */
.dp-field select { font: inherit; padding: 10px 14px; min-height: 44px; border: 1px solid var(--dp-border); border-radius: 12px; background: #fff; color: var(--dp-ink); }
.dp-field select:focus { outline: 3px solid var(--dp-primary-soft); border-color: var(--dp-primary); }
.dp-field input[type=file] { padding: 10px; background: var(--dp-bg); }
.dp-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500 !important; line-height: 1.5; }
.dp-check input { width: 20px; height: 20px; min-height: 0; margin-top: 2px; accent-color: var(--dp-primary); flex: none; }
.dp-rx-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; align-items: start; }
.dp-rx-side { display: grid; gap: 16px; }
.dp-rx-side .dp-band { grid-template-columns: 1fr; padding: 28px; gap: 20px; }
.dp-rx-side .dp-band h2 { font-size: 22px; }
.dp-rx-note { background: var(--dp-surface); border: 1px solid var(--dp-border); border-radius: var(--dp-radius-card); padding: 18px 20px; color: var(--dp-muted); font-size: 14px; line-height: 1.6; }
.dp-rx-note strong { color: var(--dp-ink); }
.dp-done { display: grid; gap: 16px; justify-items: start; background: var(--dp-surface); border: 1px solid var(--dp-border); border-radius: var(--dp-radius-panel); padding: clamp(24px, 4vw, 44px); max-width: 720px; }
.dp-done .dp-ico-box { width: 56px; height: 56px; border-radius: 16px; }
.dp-done h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; }
.dp-done p { color: var(--dp-muted); line-height: 1.6; }
.dp-ref { font-weight: 800; color: var(--dp-ink); }

/* Category row: one line that scrolls sideways instead of wrapping onto a second line. */
.dp-cats ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; white-space: nowrap; }
.dp-cats li { flex: none; }

/* Mobile bottom bar: the cart label is wrapped in spans (for the live count), so keep it the
   same size as the other labels (an older rule set every span to 20px). */
.sg-bottom-nav a > span, .sg-bottom-nav a > span span { font-size: inherit; }
.sg-bottom-nav [data-cart-count-wrap][hidden] { display: none; }

/* Category pages */
.dp-cat-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.dp-cat-tools select { font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 8px 36px 8px 14px; border: 1px solid var(--dp-border); border-radius: var(--dp-radius-pill); background: var(--dp-surface); color: var(--dp-ink); }
.dp-seller { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dp-muted); }
.dp-seller .icon { width: 15px; height: 15px; }
.dp-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 8px; }
.dp-main nav[aria-label="Breadcrumb"] a { color: var(--dp-primary); font-weight: 600; }
