/* صيدليات د. ياسر أبوعميرة — pharmacy design system */
:root {
  --brand: #0B4F9C;        /* logo blue */
  --brand-2: #1565C0;
  --brand-dark: #08386F;
  --brand-50: #EAF2FC;
  --green: #0E7C5A;        /* action green */
  --green-50: #E4F4EE;
  --red: #D23B3B;          /* logo heart red */
  --red-50: #FCEBEB;
  --bg: #F4F7FB;
  --card: #FFFFFF;
  --ink: #13243A;
  --muted: #5D6D82;
  --line: #E1E8F0;
  --amber-50: #FFF6E5; --amber: #9A6200;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 40, 80, .06), 0 4px 14px rgba(16, 40, 80, .06);
  --shadow-lg: 0 18px 50px rgba(16, 40, 80, .18);
  /* aliases used by staff.js */
  --cream: var(--bg); --white: var(--card); --plum: var(--brand-dark); --rose-deep: var(--brand); --wa: var(--green); --head: "Cairo", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 150px; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; font-family: "Cairo", "Segoe UI", Tahoma, sans-serif; font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); overflow-x: clip; -webkit-font-smoothing: antialiased; }
body.lock { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.3; }
p { margin: 0 0 .8em; }
.container { width: min(1240px, 100% - 32px); margin-inline: auto; }
.ic { width: 1.2em; height: 1.2em; flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 200; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid #7FB2F0; outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: 1.5px solid transparent; border-radius: 10px; padding: .62em 1.15em; font-weight: 700; cursor: pointer; line-height: 1.2; transition: background .15s, border-color .15s, color .15s, transform .1s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: #0B6A4D; }
.btn--blue { background: var(--brand); color: #fff; }
.btn--blue:hover { background: var(--brand-dark); }
.btn--outline { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn--outline:hover { border-color: var(--brand); color: var(--brand); }
.btn--light { background: #fff; color: var(--brand); border-color: rgba(255, 255, 255, .6); }
.btn--light:hover { background: var(--brand-50); }
.btn--wa { background: #1FAF5A; color: #fff; }
.btn--soft { background: var(--brand-50); color: var(--brand); }
.btn--dark { background: var(--brand); color: #fff; }
.btn--sm { padding: .45em .85em; font-size: .92rem; }
.btn--lg { padding: .8em 1.4em; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.icon-btn:hover { background: var(--brand-50); color: var(--brand); }

/* Topbar & header */
.topbar { background: var(--brand-dark); color: #DCE8F7; font-size: .85rem; }
.topbar__in { display: flex; gap: 22px; align-items: center; justify-content: center; min-height: 36px; flex-wrap: wrap; }
.topbar__in > * { display: inline-flex; align-items: center; gap: 6px; }
.topbar a { color: #fff; font-weight: 700; }
.header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; gap: 22px; min-height: 76px; }
.brand img { height: 58px; width: auto; }
.search { position: relative; flex: 1; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 0 6px 0 14px; transition: border-color .15s, background .15s; }
[dir="rtl"] .search { padding: 0 14px 0 6px; }
.search:focus-within { border-color: var(--brand); background: #fff; }
.search > .ic { color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: .78em 0; font-size: 1rem; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search__btn { border: 0; background: var(--brand); color: #fff; font-weight: 700; padding: .55em 1.2em; border-radius: 9px; cursor: pointer; }
.search__btn:hover { background: var(--brand-dark); }
.suggest { position: absolute; top: calc(100% + 6px); inset-inline: 0; z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; }
.sug { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 8px 12px; cursor: pointer; }
.sug[aria-selected="true"], .sug:hover { background: var(--brand-50); }
.sug img, .sug .ph { width: 46px; height: 46px; object-fit: contain; border-radius: 8px; background: #fff; }
.sug b { font-weight: 600; font-size: .92rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sug small { color: var(--muted); }
.sug strong { color: var(--brand); white-space: nowrap; font-size: .92rem; }
.sug--all { display: block; text-align: center; color: var(--brand); font-weight: 700; padding: 10px; border-top: 1px solid var(--line); }
.header__actions { display: flex; gap: 8px; }
.hbtn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 46px; min-width: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; justify-content: center; }
.hbtn:hover { border-color: var(--brand); color: var(--brand); }
.hbtn--cart { background: var(--brand); color: #fff; border-color: var(--brand); }
.hbtn--cart:hover { background: var(--brand-dark); color: #fff; }
.badge-count { position: absolute; top: -7px; inset-inline-end: -7px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.badge-count.bump { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.3); } }
.catnav { border-top: 1px solid var(--line); background: #fff; }
.catnav__in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.catnav__in::-webkit-scrollbar { display: none; }
.catnav a { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; font-weight: 600; font-size: .93rem; color: var(--muted); border-bottom: 2.5px solid transparent; }
.catnav a:hover { color: var(--brand); }
.catnav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.catnav .ic { color: var(--brand); }

/* Hero */
.hero { position: relative; overflow: hidden; color: #fff; background:
  radial-gradient(900px 500px at 85% -10%, rgba(64, 160, 255, .45), transparent 60%),
  radial-gradient(700px 420px at -5% 110%, rgba(14, 124, 90, .55), transparent 60%),
  linear-gradient(135deg, #062D5E, #0B4F9C 55%, #1565C0); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .22) 1.2px, transparent 1.3px); background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.hero__glow { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.hero__glow--1 { width: 340px; height: 340px; background: rgba(210, 59, 59, .28); top: -120px; inset-inline-start: 30%; animation: drift 12s ease-in-out infinite; }
.hero__glow--2 { width: 300px; height: 300px; background: rgba(46, 204, 145, .25); bottom: -140px; inset-inline-end: 10%; animation: drift 14s ease-in-out infinite reverse; }
@keyframes drift { 50% { transform: translate(40px, 30px); } }
.hero__in { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center; padding: 48px 0 78px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: .35em 1em; border-radius: 99px; font-weight: 700; font-size: .9rem; }
.pill--live { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); color: #E6F6EF; backdrop-filter: blur(6px); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #3BE39B; box-shadow: 0 0 0 0 rgba(59, 227, 155, .7); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(59, 227, 155, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 227, 155, 0); } }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 800; line-height: 1.2; margin: 16px 0 12px; letter-spacing: -.01em; }
.hero h1 .hl { display: inline-block; background: linear-gradient(90deg, #7CF2C0, #FFFFFF 55%, #FFB3B3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #D6E5F7; font-size: 1.1rem; max-width: 34em; margin-bottom: 18px; }
.hero-search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 16px; padding: 6px; padding-inline-start: 16px; max-width: 560px; box-shadow: 0 16px 40px rgba(3, 20, 50, .35); }
.hero-search .ic { color: var(--muted); width: 1.3em; height: 1.3em; }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 1.05rem; padding: .7em 0; color: var(--ink); background: transparent; }
.hero-search .btn { padding: .75em 1.4em; border-radius: 12px; }
.hero__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 22px; font-size: .88rem; color: #BFD3EC; }
.tag { padding: .3em .85em; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #fff; font-weight: 600; transition: background .15s; }
.tag:hover { background: rgba(255, 255, 255, .22); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn--glass { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); backdrop-filter: blur(6px); }
.btn--glass:hover { background: rgba(255, 255, 255, .22); }
.hero__art { position: relative; height: 380px; }
.htile { position: absolute; display: block; background: #fff; border-radius: 22px; box-shadow: 0 22px 50px rgba(3, 20, 50, .35); overflow: hidden; animation: float 6s ease-in-out infinite; }
.htile img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.htile--1 { width: 46%; aspect-ratio: 1; top: 4%; inset-inline-start: 28%; z-index: 3; }
.htile--2 { width: 32%; aspect-ratio: 1; top: 0; inset-inline-end: 0; animation-delay: -1.5s; transform: rotate(6deg); }
.htile--3 { width: 30%; aspect-ratio: 1; bottom: 6%; inset-inline-end: 6%; animation-delay: -3s; z-index: 2; }
.htile--4 { width: 30%; aspect-ratio: 1; top: 8%; inset-inline-start: 0; animation-delay: -2s; }
.htile--5 { width: 34%; aspect-ratio: 1; bottom: 0; inset-inline-start: 22%; animation-delay: -4s; z-index: 4; }
@keyframes float { 50% { translate: 0 -12px; } }
.hstat { position: absolute; z-index: 5; display: grid; background: rgba(255, 255, 255, .95); color: var(--ink); border-radius: 14px; padding: 8px 14px; box-shadow: 0 12px 30px rgba(3, 20, 50, .3); text-align: center; line-height: 1.2; }
.hstat b { font-size: 1.25rem; color: var(--brand); }
.hstat span { font-size: .78rem; color: var(--muted); font-weight: 700; }
.hstat--1 { top: 48%; inset-inline-start: -4%; }
.hstat--2 { top: 36%; inset-inline-end: -3%; }
.hstat--2 b { color: var(--green); }
.hstat--3 { bottom: 26%; inset-inline-start: 64%; }
.hstat--3 b { color: var(--red); }
.hero__wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 60px; fill: var(--bg); }

/* Services */
.services { margin-top: -40px; position: relative; z-index: 2; }
.services__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 14px; }
.svc { display: flex; align-items: center; gap: 12px; padding: 6px; }
.svc b { display: block; font-size: .98rem; }
.svc small { color: var(--muted); font-size: .84rem; }
.svc__ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.svc__ic .ic { width: 1.45em; height: 1.45em; }
.svc__ic--blue { background: var(--brand-50); color: var(--brand); }
.svc__ic--green { background: var(--green-50); color: var(--green); }
.svc__ic--red { background: var(--red-50); color: var(--red); }

/* Sections */
.section { padding: 44px 0; }
.section--alt { background: #fff; border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.sec-head h2 { font-size: 1.5rem; font-weight: 800; margin: 0; }
.sec-head p { margin: 0; flex-basis: 100%; }
.sec-head a { color: var(--brand); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
[dir="rtl"] .sec-head a .ic, [dir="rtl"] .crumbs .ic { transform: scaleX(-1); }

/* Categories */
.cat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }   /* 16 sections = 2 full rows */
.cat { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 8px 14px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.cat:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat__ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.cat__ic .ic { width: 1.7em; height: 1.7em; }
.cat b { font-size: .92rem; font-weight: 700; line-height: 1.35; }
.cat small { color: var(--muted); font-size: .8rem; }

/* Rails */
.rail { padding: 26px 0; }
.rail__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 14px) / 6); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; scrollbar-width: thin; }
.rail__track > * { scroll-snap-align: start; }

/* Product card */
.card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.card:hover { box-shadow: var(--shadow); border-color: #CDD8E5; }
.card__img { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); cursor: pointer; }
.card__img > img, .card__img > .ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.card__img > img { object-fit: contain; padding: 14px; transition: transform .25s; }
.card:hover .card__img > img { transform: scale(1.04); }
.ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(160deg, #F7FAFD, #EDF3FA); color: #9FB4CD; }
.ph .ic { width: 38%; height: 38%; }
.card__tag { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--amber-50); color: var(--amber); font-size: .72rem; font-weight: 800; padding: .15em .6em; border-radius: 6px; }
.card__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card__cat { font-size: .74rem; color: var(--muted); }
.card__name { font-size: .92rem; font-weight: 600; line-height: 1.45; margin: 0; min-height: 2.9em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.card__name:hover { color: var(--brand); }
.card__pack { font-size: .78rem; color: var(--muted); }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.price { font-weight: 800; color: var(--ink); font-size: 1.05rem; white-space: nowrap; }
.price small { font-weight: 600; font-size: .75em; color: var(--muted); }
.add { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 36px; min-width: 36px; padding: 0 12px; border-radius: 9px; border: 0; background: var(--green); color: #fff; font-weight: 700; cursor: pointer; }
.add:hover { background: #0B6A4D; }
.oos { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 10px; border-radius: 9px; background: #EEF1F5; color: var(--muted); font-weight: 700; font-size: .82rem; white-space: nowrap; }
.oos--lg { height: 48px; padding: 0 22px; font-size: 1rem; }
.card--oos .card__img { opacity: .55; filter: grayscale(.6); }
.card--oos .price { color: var(--muted); }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--green); border-radius: 9px; overflow: hidden; height: 36px; }
.stepper button { width: 34px; height: 100%; border: 0; background: var(--green-50); color: var(--green); cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { background: #CDEBDF; }
.stepper span { min-width: 30px; text-align: center; font-weight: 800; }

/* Shop */
.shop { padding: 18px 0 50px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .86rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a:hover { color: var(--brand); }
.crumbs .ic { width: 1em; height: 1em; }
.shop__head { display: flex; justify-content: space-between; align-items: end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.shop__head h1 { font-size: 1.6rem; font-weight: 800; margin: 0; }
.shop__head p { margin: 2px 0 0; }
.shop__tools { display: flex; gap: 10px; align-items: center; }
.select select { height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; padding: 0 12px; font-weight: 600; cursor: pointer; }
.filter-btn { display: none; }
.shop__body { display: grid; grid-template-columns: 250px 1fr; gap: 22px; align-items: start; }
.filters { position: sticky; top: 140px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; max-height: calc(100vh - 160px); overflow-y: auto; }
.filters__head { display: flex; align-items: center; justify-content: space-between; }
.filters__head h2 { font-size: 1.1rem; margin: 0; }
.filters__close { display: none; }
.filters h3 { font-size: .9rem; color: var(--muted); margin: 16px 0 8px; }
.fcats { display: grid; gap: 2px; }
.fcat { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 7px 10px; border-radius: 8px; border: 0; background: none; text-align: start; cursor: pointer; font-size: .92rem; }
.fcat:hover { background: var(--bg); }
.fcat[aria-pressed="true"] { background: var(--brand-50); color: var(--brand); font-weight: 700; }
.fcat small { color: var(--muted); font-size: .78rem; }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input { width: 100%; min-width: 0; height: 40px; border: 1.5px solid var(--line); border-radius: 9px; padding: 0 10px; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 14px; cursor: pointer; font-size: .92rem; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.filters__foot { display: flex; gap: 8px; margin-top: 16px; }
.filters__apply { display: none; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.more { text-align: center; padding: 24px 0 0; }
.more p { margin-bottom: 8px; font-size: .9rem; }
.empty { text-align: center; padding: 50px 16px; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty > .ic { width: 46px; height: 46px; color: #A9BBD0; }
.empty p { color: var(--muted); }
.rx-note { display: flex; gap: 10px; align-items: flex-start; background: var(--amber-50); color: #6B4700; border: 1px solid #F4DDAE; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: .92rem; }
.rx-note .ic { color: var(--amber); margin-top: 2px; }
.rx-note--sm { font-size: .85rem; margin: 4px 0 0; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal__back { position: absolute; inset: 0; background: rgba(10, 25, 45, .55); animation: fade .2s; }
.modal__box { position: relative; width: min(920px, 100%); max-height: calc(100vh - 32px); overflow: hidden; display: flex; flex-direction: column; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); outline: 0; animation: rise .25s cubic-bezier(.2, .8, .2, 1); }
.modal__box--sm { width: min(560px, 100%); }
.modal__body { overflow-y: auto; padding: 24px; }
.modal__x { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.pd { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; }
.pd__gallery { display: grid; gap: 10px; }
.pd__main { position: relative; aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.pd__main > img, .pd__main > .ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.pd__main > img { object-fit: contain; padding: 18px; }
.pd__thumbs { display: flex; gap: 8px; }
.pd__thumbs button { width: 64px; height: 64px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; padding: 4px; cursor: pointer; }
.pd__thumbs button[aria-pressed="true"] { border-color: var(--brand); }
.pd__thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd__info h2 { font-size: 1.35rem; font-weight: 800; margin: 6px 44px 6px 0; }
[dir="rtl"] .pd__info h2 { margin: 6px 0 6px 44px; }
.pd__alt { color: var(--muted); font-size: .92rem; margin: 0 0 10px; }
.pd__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip-s { display: inline-flex; align-items: center; gap: 4px; background: var(--bg); border: 1px solid var(--line); padding: .15em .7em; border-radius: 99px; font-size: .82rem; color: var(--muted); }
.pd__price { font-size: 1.7rem; font-weight: 800; color: var(--brand-dark); margin-bottom: 14px; }
.pd__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.pd__actions .stepper { height: 44px; }
.pd__actions .stepper button { width: 42px; }
.pd__desc h3 { font-size: 1rem; margin: 18px 0 6px; }
.pd__desc .txt { white-space: pre-line; color: #31455E; font-size: .95rem; max-height: 14em; overflow: hidden; position: relative; }
.pd__desc .txt.open { max-height: none; }
.pd__desc .txt:not(.open)::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3em; background: linear-gradient(transparent, #fff); }
.linkbtn { border: 0; background: none; color: var(--brand); font-weight: 700; cursor: pointer; padding: 4px 0; }
.pd__rel { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.pd__rel h3 { font-size: 1.05rem; }
.pd__rel .rail__track { grid-auto-columns: calc((100% - 3 * 12px) / 4); gap: 12px; }
.policy h2 { font-size: 1.3rem; margin-inline-end: 44px; }
.policy p { color: #31455E; }

/* Drawer */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(10, 25, 45, .5); animation: fade .2s; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 70; width: min(440px, 100%); background: #fff; display: none; flex-direction: column; box-shadow: var(--shadow-lg); }
.drawer.is-open { display: flex; animation: slideL .28s ease; }
[dir="ltr"] .drawer.is-open { animation-name: slideR; }
@keyframes slideL { from { transform: translateX(-100%); } }
@keyframes slideR { from { transform: translateX(100%); } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 1.2rem; margin: 0; }
.drawer__body { flex: 1; overflow-y: auto; padding: 14px 18px; }
.cart-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ci { display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.ci__img { position: relative; width: 62px; height: 62px; border-radius: 8px; overflow: hidden; background: #fff; }
.ci__img > img, .ci__img > .ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.ci__img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.ci b { display: block; font-size: .88rem; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci small { color: var(--muted); font-size: .8rem; }
.ci .stepper { height: 30px; margin-top: 4px; }
.ci .stepper button { width: 28px; }
.ci__rm { border: 0; background: none; color: var(--muted); cursor: pointer; align-self: start; padding: 4px; }
.ci__rm:hover { color: var(--red); }
.cart-empty { text-align: center; padding: 50px 0; color: var(--muted); }
.cart-empty > .ic { width: 50px; height: 50px; color: #B8C7D9; }
.checkout { display: grid; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.checkout h3 { font-size: 1.02rem; margin: 0; }
.checkout label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.checkout input, .checkout select, .checkout textarea { width: 100%; padding: .65em .85em; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 1rem; font-weight: 500; }
.checkout input:focus, .checkout select:focus, .checkout textarea:focus { outline: 0; border-color: var(--brand); }
.checkout .invalid { border-color: var(--red); background: #FFF8F8; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-err { color: var(--red); font-weight: 700; font-size: .9rem; margin: 0; }
.form-err a { color: var(--green); text-decoration: underline; }
.drawer__foot { padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 8px; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.total strong { font-size: 1.4rem; color: var(--brand-dark); }
.total--line { font-weight: 600; font-size: .92rem; color: var(--muted); }
.area-info { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 4px; }
.area-info span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9px; background: var(--brand-50); color: var(--brand-dark); font-size: .84rem; font-weight: 700; }
.area-info .ic { width: 1em; height: 1em; color: var(--brand); }
.min-warn { margin: 4px 0; padding: 8px 12px; border-radius: 10px; background: #FFF4E0; color: #8A5A00; font-weight: 700; font-size: .88rem; }
.order-done { text-align: center; padding: 30px 6px; }
.order-done__act { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.topbar__track { display: inline-flex; align-items: center; gap: 6px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-weight: 700; padding: 3px 10px; border-radius: 99px; cursor: pointer; }
.topbar__track:hover { background: rgba(255, 255, 255, .22); }
/* tracking */
.track { display: grid; gap: 12px; }
.track__ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.track__ic .ic { width: 26px; height: 26px; }
.track h2 { margin: 0; color: var(--brand-dark); }
.track > p { margin: -6px 0 0; }
.track label { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
.track input { padding: .75em 1em; border-radius: 11px; border: 1.5px solid var(--line); background: var(--bg); font: inherit; font-size: 1rem; }
.track input:focus { outline: 0; border-color: var(--brand); background: #fff; }
.track__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.track__head strong { font-size: 1.25rem; color: var(--brand); letter-spacing: .04em; }
.track__head small { color: var(--muted); }
.tsteps { list-style: none; margin: 0; padding: 0; display: grid; }
.tsteps li { position: relative; display: flex; gap: 12px; padding-bottom: 18px; color: var(--muted); }
.tsteps li:last-child { padding-bottom: 0; }
.tsteps li:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: 15px; top: 32px; bottom: 2px; width: 2px; background: var(--line); }
.tsteps li.done:not(:last-child)::before { background: var(--green); }
.tsteps i { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; background: var(--bg); border: 2px solid var(--line); }
.tsteps .ic { width: 16px; height: 16px; }
.tsteps li.done i { background: var(--green); border-color: var(--green); color: #fff; }
.tsteps li.now i { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 5px rgba(11, 79, 156, .15); }
.tsteps li.done, .tsteps li.now { color: var(--ink); }
.tsteps div { display: grid; padding-top: 4px; }
.tsteps small { color: var(--muted); font-size: .82rem; }
.track__cancel { display: flex; gap: 8px; padding: 12px; border-radius: 12px; background: #FDEEEE; color: #9B2C2C; font-weight: 700; margin: 0; }
.track__box { background: var(--bg); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.track__box p { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .92rem; }
.track__box p .ic { color: var(--brand); }
.track__box h3 { margin: 6px 0 0; font-size: .95rem; }
.track__box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; }
.track__box li { display: flex; justify-content: space-between; gap: 12px; }
.track__box li span:last-child { white-space: nowrap; font-weight: 700; }
.track__act { display: flex; gap: 8px; flex-wrap: wrap; }
/* prescription upload */
.rx-up { display: grid; gap: 8px; }
.rx-up__label { font-weight: 700; font-size: .92rem; }
.rx-up__row { display: flex; gap: 8px; flex-wrap: wrap; }
.rx-up__row:empty { display: none; }
.rx-up__thumb { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.rx-up__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rx-up__thumb button { position: absolute; top: 4px; inset-inline-end: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.rx-up__thumb .ic { width: 14px; height: 14px; }
.rx-up__btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: .8em 1em; border: 1.5px dashed var(--brand); border-radius: 12px; background: var(--brand-50); color: var(--brand); font-weight: 700; cursor: pointer; }
.rx-up__btn:hover { background: #DCEAFB; }
.rx-up small { font-size: .8rem; line-height: 1.5; }
.order-done__ok { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); }
.order-done__ok .ic { width: 2em; height: 2em; }
@keyframes pop { from { transform: scale(0); } }
.order-done h3 { font-size: 1.35rem; margin: 12px 0 4px; }
.order-done strong { display: block; font-size: 1.4rem; letter-spacing: .05em; color: var(--brand); margin: 4px 0 10px; }
.order-done p { color: var(--muted); margin: 4px 0; }

/* Branches */
.branches { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.branch { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.branch iframe { width: 100%; height: 100%; min-height: 220px; border: 0; display: block; }
.branch__b { padding: 18px; display: grid; gap: 8px; align-content: start; }
.branch__b h3 { font-size: 1.15rem; margin: 0; color: var(--brand-dark); }
.branch__b p { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; }
.branch__b .ic { color: var(--brand); margin-top: 3px; }
.branch__b a:not(.btn) { font-weight: 700; color: var(--brand); }
.branch__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* Footer */
.footer { background: var(--brand-dark); color: #C9D8EB; padding: 44px 0 18px; margin-top: 10px; }
.footer__in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 30px; }
.footer__brand img { background: #fff; border-radius: 14px; padding: 8px 12px; width: 160px; height: auto; margin-bottom: 12px; }
.footer h4 { color: #fff; font-size: 1.02rem; margin-bottom: 10px; }
.footer a, .footer button { display: flex; align-items: center; gap: 8px; padding: 4px 0; background: none; border: 0; color: inherit; cursor: pointer; text-align: start; font-size: .93rem; }
.footer a:hover, .footer button:hover { color: #fff; }
.footer__bottom { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 28px; padding-top: 16px; font-size: .85rem; color: #9FB3CC; }
.wa-float { position: fixed; bottom: 20px; left: 20px; z-index: 30; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #1FAF5A; color: #fff; box-shadow: 0 10px 24px rgba(31, 175, 90, .4); }
.wa-float .ic { width: 1.6em; height: 1.6em; }
.cart-bar { display: none; }
.toast { position: fixed; bottom: 26px; left: 50%; z-index: 95; transform: translate(-50%, 30px); opacity: 0; visibility: hidden; background: var(--ink); color: #fff; padding: .7em 1.3em; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow-lg); transition: .25s; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* Staff screen (staff.js) */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chip { flex: none; border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: .4em 1em; font-weight: 700; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
/* ───────── Staff screen (sign-in, dashboard, orders) ───────── */
.staff { position: fixed; inset: 0; z-index: 100; background: #F2F5FA; overflow-y: auto; color: var(--ink); }
.staff .ic { width: 1.15em; height: 1.15em; flex: none; }
.m-only { display: none !important; }
.sbtn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.sbtn:hover { border-color: var(--brand); color: var(--brand); }
.sbtn--icon { width: 40px; padding: 0; }
.sbtn--ghost { background: transparent; border-color: transparent; color: var(--muted); }
.sbtn--ghost:hover { background: #fff; }
.sbtn--primary { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); border: 0; color: #fff; box-shadow: 0 8px 20px rgba(11, 79, 156, .28); }
.sbtn--primary:hover { color: #fff; filter: brightness(1.08); }
.sbtn--primary:disabled { opacity: .75; cursor: progress; }
.sbtn--lg { height: 52px; font-size: 1.02rem; border-radius: 13px; width: 100%; }
.sbtn--wa { color: #0E7C5A; } .sbtn--wa:hover { border-color: #0E7C5A; color: #0E7C5A; background: #EAF7F1; }
[dir="ltr"] .slogin__top .sbtn:first-child .ic { transform: scaleX(-1); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* sign-in */
.slogin { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.slogin__brand { position: relative; overflow: hidden; padding: 56px 48px; color: #fff; display: flex; flex-direction: column; justify-content: center;
  background: radial-gradient(900px 500px at 110% -10%, rgba(14, 124, 90, .55), transparent 60%), radial-gradient(700px 500px at -20% 120%, rgba(56, 140, 230, .45), transparent 60%), linear-gradient(160deg, #0B4F9C, #062C57); }
.slogin__dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .13) 1.2px, transparent 1.2px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, #000, transparent 85%); pointer-events: none; }
.slogin__brand > * { position: relative; }
.slogin__mark { width: 190px; padding: 14px 18px; background: #fff; border-radius: 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, .2); margin-bottom: 28px; }
.slogin__mark img { display: block; width: 100%; }
.slogin__brand h2 { margin: 0 0 4px; font-size: 2rem; line-height: 1.3; }
.slogin__brand > p { margin: 0 0 28px; color: #CFE0F5; font-size: 1.05rem; }
.slogin__brand ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 420px; }
.slogin__brand li { display: flex; align-items: flex-start; gap: 12px; color: #E8F1FB; }
.slogin__brand li .ic { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #7FE0BC; }
.slogin__side { display: flex; flex-direction: column; padding: 20px 24px 32px; }
.slogin__top { display: flex; justify-content: space-between; gap: 8px; }
.slogin__card { width: 100%; max-width: 410px; margin: auto; padding: 36px 32px; background: #fff; border-radius: 22px; box-shadow: 0 1px 2px rgba(16, 40, 80, .06), 0 24px 60px rgba(16, 40, 80, .12); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.slogin__card h1 { margin: 0; font-size: 1.6rem; color: var(--brand-dark); }
.slogin__card > p { margin: -6px 0 6px; }
.slogin__mlogo { display: none; }
.slogin__lock { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.slogin__lock .ic { width: 26px; height: 26px; }
.sfield { display: grid; gap: 7px; font-weight: 700; font-size: .92rem; }
.sfield__box { display: flex; align-items: center; gap: 10px; height: 52px; padding-inline: 14px 6px; border: 1.5px solid var(--line); border-radius: 13px; background: #F8FAFD; color: var(--muted); transition: border-color .15s, box-shadow .15s, background .15s; }
.sfield__box:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(11, 79, 156, .12); }
.sfield__box input { flex: 1; width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: 1.05rem; font-weight: 600; color: var(--ink); letter-spacing: .04em; }
.sfield__box:has(input[aria-invalid="true"]) { border-color: var(--red); }
.sfield__eye { width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.sfield__eye:hover { background: var(--brand-50); color: var(--brand); }
.sfield__err { min-height: 1.3em; margin: -6px 0 0; color: var(--red); font-weight: 700; font-size: .9rem; display: flex; align-items: center; gap: 6px; }
.slogin__note { margin: 4px 0 0; display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: .84rem; }
.slogin__note .ic { color: var(--green); margin-top: 3px; }

/* app shell */
.sapp { min-height: 100%; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sside { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; display: flex; flex-direction: column; gap: 22px; padding: 22px 16px; background: #fff; border-inline-end: 1px solid var(--line); }
.sside__logo { display: grid; gap: 10px; padding: 0 6px 18px; border-bottom: 1px solid var(--line); }
.sside__logo img { width: 150px; }
.sside__logo b { display: block; color: var(--brand-dark); font-size: 1.05rem; }
.sside__logo small { color: var(--muted); font-size: .8rem; }
.sside nav { display: grid; gap: 6px; }
.snav { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 0; border-radius: 12px; background: none; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; text-align: start; }
.snav:hover { background: #F2F5FA; color: var(--ink); }
.snav[aria-current="page"] { background: var(--brand-50); color: var(--brand); }
.snav[aria-current="page"]::before { content: ""; position: absolute; inset-inline-start: -16px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
[dir="rtl"] .snav[aria-current="page"]::before { border-radius: 4px 0 0 4px; }
.snav span { flex: 1; }
.sbadge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: #E0A21B; color: #fff; font-size: .75rem; display: inline-grid; place-items: center; }
.sside__foot { margin-top: auto; display: grid; gap: 2px; padding-top: 14px; border-top: 1px solid var(--line); }
.sside__link { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border: 0; border-radius: 10px; background: none; font: inherit; font-weight: 600; font-size: .92rem; color: var(--muted); cursor: pointer; text-align: start; }
.sside__link:hover { background: #F2F5FA; color: var(--ink); }
.sside__link[data-logout]:hover { color: var(--red); background: #FDEEEE; }
.sbody { min-width: 0; padding: 0 28px 40px; }
.stop { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 14px; margin: 0 -28px 18px; padding: 16px 28px; background: rgba(242, 245, 250, .9); backdrop-filter: blur(10px); }
.stop__logo { display: none; }
.stop__title { flex: 1; min-width: 0; }
.stop__title h1 { margin: 0; font-size: 1.45rem; color: var(--brand-dark); line-height: 1.3; }
.stop__title p { margin: 0; color: var(--muted); font-size: .9rem; }
.stop__act { display: flex; gap: 8px; }
.sbottom { display: none; }

/* dashboard */
.dfilters, .ofilters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg button { flex: none; border: 0; background: none; padding: 7px 14px; border-radius: 9px; font: inherit; font-weight: 700; font-size: .88rem; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; box-shadow: 0 4px 10px rgba(11, 79, 156, .25); }
.dfilters select, .ofilters select, .sselect { height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; font-size: .9rem; color: var(--ink); cursor: pointer; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { position: relative; display: grid; gap: 2px; align-content: start; padding: 18px; background: #fff; border-radius: 16px; border: 1px solid transparent; box-shadow: var(--shadow); text-align: start; font: inherit; color: inherit; }
.kpi__ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 10px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.kpi__ic .ic { width: 22px; height: 22px; }
.kpi__l { color: var(--muted); font-weight: 700; font-size: .88rem; }
.kpi b { font-size: 1.6rem; color: var(--ink); line-height: 1.25; }
.kpi__d { font-size: .8rem; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.kpi .kpi__d b { font-size: .82rem; line-height: 1.4; color: inherit; }
.kpi__d.up { color: var(--green); } .kpi__d.down { color: var(--red); }
.kpi--alert { cursor: pointer; background: linear-gradient(160deg, #FFF8E8, #fff); border-color: #F2D693; transition: transform .15s, box-shadow .15s; }
.kpi--alert:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi--alert b { color: #A86E00; }
.kpi--alert .kpi__d { color: #A86E00; }
[dir="rtl"] .kpi--alert .kpi__d .ic { transform: scaleX(-1); }
.kpi--alert[data-zero] { background: #fff; border-color: transparent; cursor: default; }
.kpi--alert[data-zero]:hover { transform: none; box-shadow: var(--shadow); }
.kpi--alert[data-zero] b, .kpi--alert[data-zero] .kpi__d { color: var(--green); }
.dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dcard { background: #fff; border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.dcard__h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dcard__h h3 { margin: 0; font-size: 1rem; color: var(--ink); }
.dcard__h > b { color: var(--brand); font-size: .95rem; }
.dsub { margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line); }
.dwide { grid-column: 1 / -1; }
.dempty { text-align: center; padding: 48px 20px; }
.dempty__ic { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.dempty__ic .ic { width: 28px; height: 28px; }
.dempty h3 { margin: 0 0 4px; color: var(--ink); }
.dempty p { margin: 0; }
.dnote { display: flex; align-items: flex-start; gap: 6px; margin: 10px 0 0; color: var(--muted); font-size: .82rem; }
.dnote .ic { margin-top: 2px; }
.dchart { width: 100%; height: auto; display: block; }
.dchart rect { fill: var(--brand); transition: fill .15s; } .dchart g:hover rect { fill: var(--green); }
.dchart .grid { stroke: #EDF1F6; stroke-width: 1; }
.dchart text { font-size: 11px; fill: var(--muted); text-anchor: middle; font-family: inherit; }
.hb { margin-bottom: 12px; }
.hb__top { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; margin-bottom: 5px; }
.hb__top > span { display: inline-flex; align-items: center; gap: 7px; }
.hb__top small { color: var(--muted); font-weight: 600; }
.hb__track { height: 8px; background: #EEF2F7; border-radius: 99px; overflow: hidden; }
.hb__track i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.stack { display: flex; gap: 3px; height: 12px; margin-bottom: 18px; }
.stack i { border-radius: 99px; }
.dtable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.dtable th { text-align: start; color: var(--muted); font-weight: 700; font-size: .8rem; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.dtable td { padding: 9px 0; border-bottom: 1px solid #F0F3F7; vertical-align: top; }
.dtable tr:last-child td { border-bottom: 0; }
.dtable td:not(:first-child), .dtable th:not(:first-child) { text-align: end; white-space: nowrap; padding-inline-start: 12px; }
.pn { display: flex; align-items: flex-start; gap: 10px; }
.pn > span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--brand-50); color: var(--brand); font-size: .78rem; font-weight: 800; }
tr:nth-child(1) .rank { background: #FFF1CC; color: #A86E00; }

/* orders */
.osearch { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.osearch:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 79, 156, .1); }
.osearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: var(--ink); }
#ordersView .chips { margin-bottom: 16px; }
#ordersView .chip { display: inline-flex; align-items: center; gap: 7px; }
#ordersView .chip span { min-width: 22px; padding: 0 6px; border-radius: 99px; background: #F0F3F7; color: var(--muted); font-size: .78rem; text-align: center; }
#ordersView .chip[aria-pressed="true"] span { background: rgba(255, 255, 255, .22); color: #fff; }
.olist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.sorder { display: grid; gap: 10px; padding: 0 18px 16px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); border-top: 4px solid var(--sc); }
.sorder__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; padding: 14px 0 10px; border-bottom: 1px solid #F0F3F7; }
.sorder__head > div { display: flex; align-items: center; gap: 8px; }
.sorder__num { font-size: 1.02rem; letter-spacing: .02em; }
.sorder__head small { color: var(--muted); font-size: .82rem; }
.sorder__head small b { color: var(--ink); }
.spill { padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 800; color: var(--sc); background: color-mix(in srgb, var(--sc) 12%, #fff); }
.sorder__cust { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sorder__cust .ic { color: var(--muted); }
.sorder__cust a { margin-inline-start: auto; font-weight: 800; color: var(--brand); text-decoration: none; }
.sorder__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.sorder__meta span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 9px; background: #F4F7FB; font-size: .84rem; font-weight: 600; color: var(--muted); }
.sorder__addr { margin: 0; font-size: .92rem; color: var(--ink); }
.sorder__items { list-style: none; margin: 0; padding: 10px 12px; background: #F8FAFD; border-radius: 12px; display: grid; gap: 6px; font-size: .9rem; }
.sorder__items li { display: flex; justify-content: space-between; gap: 12px; }
.sorder__items li > span:last-child { white-space: nowrap; font-weight: 700; }
.sorder__items small { color: var(--muted); }
.sorder__notes { margin: 0; display: flex; gap: 6px; padding: 8px 12px; border-radius: 10px; background: #FFF8E8; color: #7A5300; font-size: .88rem; }
.sorder__notes .ic { margin-top: 3px; }
.sorder__foot { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
.sorder__total { display: grid; line-height: 1.3; }
.sorder__total small { color: var(--muted); font-size: .8rem; }
.sorder__total b { font-size: 1.25rem; color: var(--brand-dark); }
.sorder__act { display: flex; flex-wrap: wrap; gap: 6px; }
.sorder__act .sbtn { height: 38px; padding: 0 11px; }
.sselect { height: 38px; border-color: var(--sc, var(--line)); }
.oexport { display: flex; gap: 6px; }
.oexport select { height: 44px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; font-size: .88rem; }
.oexport .sbtn { height: 44px; color: #0E7C5A; border-color: #BFE3D3; background: #EEF8F3; }
.sorder__rx { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--brand); background: var(--brand-50); color: var(--brand); font: inherit; font-weight: 800; cursor: pointer; }
.rxview { position: fixed; inset: 0; z-index: 200; background: rgba(10, 20, 40, .6); display: grid; place-items: center; padding: 16px; }
.rxview__box { width: min(760px, 100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 18px; padding: 14px; }
.rxview__box header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--brand-dark); }
.rxview__imgs { display: grid; gap: 10px; }
.rxview__imgs img { width: 100%; border-radius: 12px; display: block; border: 1px solid var(--line); }
@media (max-width: 640px) { .oexport { width: 100%; } .oexport select { flex: 1; } }
.sorder__area { color: var(--brand-dark) !important; background: var(--brand-50) !important; }
.sorder__fee { display: grid; gap: 2px; font-size: .84rem; color: var(--muted); }

/* delivery areas */
.anote { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; margin-bottom: 14px; border-radius: 14px; background: #EAF7F1; color: #0B5E44; font-weight: 700; font-size: .92rem; }
.anote .ic { margin-top: 3px; }
.anote--warn { background: #FFF6E3; color: #7A5300; }
.afilters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.afilters select { height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; font-size: .9rem; }
.abulk { background: #fff; border-radius: 16px; padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--shadow); border: 1px solid transparent; }
.abulk.is-on { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(11, 79, 156, .08), var(--shadow); position: sticky; top: 76px; z-index: 2; }
.abulk__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.abulk__top > div { display: flex; gap: 6px; }
.abulk__top b { color: var(--brand-dark); }
.abulk__form { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 10px; align-items: end; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.abulk__form .sbtn { height: 42px; }
.abulk__msg { margin: 8px 0 0; color: var(--red); font-weight: 700; font-size: .88rem; }
.abulk__msg:empty { display: none; }
.acity { margin-bottom: 18px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.acity h3 { margin: 0; padding: 14px 18px; font-size: 1rem; color: var(--brand-dark); border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 8px; }
.acity h3 small { color: var(--muted); font-weight: 600; }
.ahead, .arow { display: grid; grid-template-columns: 34px minmax(150px, 1.6fr) 130px repeat(3, minmax(110px, 1fr)) 120px; gap: 10px; align-items: center; padding: 8px 18px; }
.ahead { background: #F8FAFD; color: var(--muted); font-size: .76rem; font-weight: 700; }
.ahead small { font-weight: 600; }
.arow { border-top: 1px solid #F0F3F7; transition: background .15s; }
.arow:hover { background: #FAFCFF; }
.arow.is-unset { background: linear-gradient(90deg, rgba(224, 162, 27, .07), transparent 60%); }
[dir="rtl"] .arow.is-unset { background: linear-gradient(270deg, rgba(224, 162, 27, .07), transparent 60%); }
.arow.is-off .aname, .arow.is-off .afield { opacity: .45; }
.acheck input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.aname { min-width: 0; display: grid; }
.aname b { font-size: .94rem; }
.aname small { color: var(--muted); font-size: .78rem; }
.afield { display: grid; gap: 4px; min-width: 0; }
.afield > span:first-child { display: none; font-size: .76rem; font-weight: 700; color: var(--muted); }
.abulk .afield > span:first-child { display: block; }
.afield select, .anum { width: 100%; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: #F8FAFD; font: inherit; font-weight: 700; font-size: .9rem; color: var(--ink); }
.afield select:focus, .anum:focus { outline: 0; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(11, 79, 156, .1); }
.anum.invalid { border-color: var(--red); background: #FDEEEE; }
.anum::placeholder { color: #A9B4C2; font-weight: 600; }
.aunit { position: relative; display: block; }
.aunit .anum { padding-inline-end: 42px; }
.aunit i { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .74rem; color: var(--muted); pointer-events: none; }
.arow.is-unset .afield:nth-of-type(2) .anum { border-color: #F2D693; background: #FFFBF1; }
.aend { display: grid; justify-items: start; gap: 2px; }
.aswitch { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; font: inherit; font-weight: 700; font-size: .84rem; color: var(--muted); cursor: pointer; }
.aswitch i { position: relative; width: 38px; height: 22px; border-radius: 99px; background: #CBD5E1; transition: background .15s; flex: none; }
.aswitch i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: inset-inline-start .15s; }
.aswitch[aria-checked="true"] { color: var(--green); }
.aswitch[aria-checked="true"] i { background: var(--green); }
.aswitch[aria-checked="true"] i::after { inset-inline-start: 19px; }
.astate { min-height: 1.1em; font-size: .74rem; font-weight: 700; color: var(--muted); }
.astate.ok { color: var(--green); } .astate.bad { color: var(--red); }
@media (max-width: 1100px) {
  .ahead { display: none; }
  .arow { grid-template-columns: 28px repeat(3, minmax(0, 1fr)); padding: 12px 14px; gap: 8px; row-gap: 10px; }
  .arow .aname { grid-column: 2 / -1; }
  .arow .afield { grid-column: span 1; }
  .arow .afield:first-of-type { grid-column: 2 / -1; }
  .arow .afield:nth-of-type(2) { grid-column: 2; }
  .arow .aend { grid-column: 2 / -1; display: flex; align-items: center; justify-content: space-between; }
  .afield > span:first-child { display: block; }
  .abulk__form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .abulk__form .sbtn { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .abulk.is-on { top: 62px; }
  .arow { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr); }
  .arow .afield:nth-of-type(2) { grid-column: 2; }
  .arow .afield:nth-of-type(4) { grid-column: 2; }
  .arow .aend { grid-column: 3; align-self: end; display: grid; justify-items: start; }
  .arow .afield > span:first-child { font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .aunit .anum { padding-inline: 8px 30px; }
  .aunit i { inset-inline-end: 6px; font-size: .68rem; }
}

/* tablet / phone */
@media (max-width: 1100px) { .olist { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .slogin { grid-template-columns: minmax(0, 1fr); }
  .slogin__brand { display: none; }
  .slogin__side { min-height: 100vh; background: radial-gradient(600px 300px at 50% -10%, rgba(11, 79, 156, .12), transparent 70%); }
  .slogin__mlogo { display: block; width: 150px; margin: 0 auto 6px; }
  .slogin__lock { display: none; }
  .slogin__card { text-align: center; }
  .slogin__card .sfield, .slogin__note { text-align: start; }
  .sapp { grid-template-columns: minmax(0, 1fr); }
  .sside { display: none; }
  .m-only { display: inline-flex !important; }
  .sbody { padding: 0 16px 96px; }
  .stop { margin: 0 -16px 14px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); }
  .stop__logo { display: block; } .stop__logo img { width: 92px; display: block; }
  .stop__title h1 { font-size: 1.1rem; } .stop__title p { display: none; }
  .stop__act { gap: 6px; }
  .stop__act [data-refresh] span { display: none; }
  .stop__act [data-refresh] { width: 40px; padding: 0; }
  .stop__act [data-lang] { width: auto; padding: 0 10px; }
  .sbottom { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: fixed; inset-inline: 0; bottom: 0; z-index: 4; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16, 40, 80, .06); }
  .sbottom .snav { flex-direction: column; gap: 2px; padding: 6px; font-size: .78rem; justify-content: center; text-align: center; }
  .sbottom .snav .ic { width: 22px; height: 22px; }
  .sbottom .snav span { flex: none; }
  .sbottom .snav::before { display: none; }
  .sbottom .sbadge { position: absolute; top: 2px; inset-inline-start: calc(50% + 6px); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dgrid { grid-template-columns: minmax(0, 1fr); }
  .dfilters select { flex: 1; }
}
@media (max-width: 480px) {
  .stop__logo { display: none; }
  .slogin__side { padding: 14px 14px 24px; }
  .slogin__card { padding: 28px 20px; border-radius: 20px; }
  .kpi { padding: 14px; } .kpi b { font-size: 1.2rem; } .kpi__ic { width: 36px; height: 36px; margin-bottom: 8px; }
  .dcard { padding: 16px; }
  .sorder { padding: 0 14px 14px; }
  .sorder__act { width: 100%; } .sorder__act .sbtn { flex: 1; } .sorder__act .sselect { flex-basis: 100%; }
}

/* Responsive */
@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .rail__track { grid-auto-columns: calc((100% - 3 * 14px) / 4); }
  .branch { grid-template-columns: 1fr; }
  .branch iframe { min-height: 180px; }
}
@media (max-width: 900px) {
  .hero__in { grid-template-columns: minmax(0, 1fr); padding: 30px 0 70px; }
  .hero__text { min-width: 0; }
  .hero h1 .hl { display: inline; }
  .hero__art { display: none; }
  .hero-search { max-width: none; }
  .services__grid { grid-template-columns: 1fr 1fr; }
  .shop__body { grid-template-columns: 1fr; }
  .filter-btn { display: inline-flex; }
  .filters { position: fixed; inset: 0; z-index: 80; top: 0; max-height: none; border-radius: 0; border: 0; padding: 18px; display: none; overflow-y: auto; }
  .filters.is-open { display: block; animation: fade .2s; }
  .filters__close { display: grid; }
  .filters__apply { display: inline-flex; flex: 1; }
  .filters.is-open { padding-bottom: 96px; }
  .filters__foot { position: fixed; bottom: 0; inset-inline: 0; margin: 0; background: #fff; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); z-index: 2; }
  .footer__in { grid-template-columns: 1fr 1fr; }
  .branches { grid-template-columns: 1fr; }
  .pd { grid-template-columns: 1fr; gap: 16px; }
  .pd__main { aspect-ratio: 4 / 3; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 24px); }
  .topbar__hide-sm { display: none !important; }
  .topbar__in { gap: 14px; font-size: .8rem; }
  .header__in { flex-wrap: wrap; gap: 8px; min-height: 0; padding: 6px 0 8px; }
  .search input { padding: .6em 0; }
  .catnav a { padding: 8px 10px; font-size: .88rem; }
  .sec-head a { padding: 8px 4px; }
  .branch__b p a { display: inline-block; padding: 6px 2px; }
  .topbar a { padding: 6px 0; }
  .brand img { height: 44px; }
  .header__actions { margin-inline-start: auto; }
  .hbtn { height: 42px; min-width: 42px; padding: 0 10px; }
  .hbtn__label { display: none; }
  .search { order: 3; flex-basis: 100%; }
  .search__btn { display: none; }
  html { scroll-padding-top: 170px; }
  .hero h1 { font-size: 1.85rem; }
  .hero p { font-size: .98rem; }
  .hero__cta .btn { flex: 1 1 100%; white-space: normal; text-align: center; }
  .hero-search { padding-inline-start: 12px; }
  .hero-search .btn { padding: .7em 1em; }
  .hero__tags { margin: 12px 0 16px; }
  .services { margin-top: -34px; }
  .services { margin-top: -20px; }
  .services__grid { gap: 6px; padding: 10px; }
  .svc { gap: 8px; padding: 4px; }
  .svc__ic { width: 38px; height: 38px; }
  .svc b { font-size: .86rem; }
  .svc small { font-size: .74rem; line-height: 1.35; display: block; }
  .section { padding: 30px 0; }
  .sec-head h2 { font-size: 1.25rem; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat { padding: 12px 4px 10px; }
  .cat:last-child:nth-child(3n+1) { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 12px; }   /* lone last tile fills its row */
  .cat:last-child:nth-child(3n+1) .cat__ic { width: 44px; height: 44px; }
  .cat__ic { width: 46px; height: 46px; }
  .cat b { font-size: .8rem; }
  .cat small { display: none; }
  .rail { padding: 16px 0; }
  .rail__track { grid-auto-columns: 44%; gap: 10px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card__body { padding: 8px 10px 10px; }
  .card__name { font-size: .86rem; }
  .card__foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .card__foot > [data-ctl] { display: block; width: 100%; }
  .card__foot .add { width: 100%; height: 40px; }
  .card__foot .stepper { width: 100%; height: 40px; justify-content: space-between; }
  .card__foot .stepper button { width: 44px; }
  .price { font-size: .98rem; }
  .shop__head h1 { font-size: 1.3rem; }
  .shop__tools { width: 100%; }
  .shop__tools .select { flex: 1; } .shop__tools select { width: 100%; }
  .modal { padding: 0; place-items: end center; }
  .modal__box { max-height: 92vh; border-radius: 20px 20px 0 0; animation-name: up; }
  @keyframes up { from { transform: translateY(100%); } }
  .modal__body { padding: 18px 16px 24px; }
  .pd__rel .rail__track { grid-auto-columns: 44%; }
  .pd__actions .btn { flex: 1; }
  .footer__in { grid-template-columns: 1fr; gap: 20px; }
  .footer { padding-bottom: 90px; }
  .wa-float { width: 50px; height: 50px; bottom: 14px; left: 14px; }
  body.has-cart .wa-float { bottom: 82px; }
  body.has-cart .cart-bar { position: fixed; bottom: 12px; inset-inline: 12px; z-index: 35; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border: 0; border-radius: 14px; background: var(--brand); color: #fff; font-weight: 800; box-shadow: 0 10px 30px rgba(11, 79, 156, .35); cursor: pointer; }
  body.lock .cart-bar { display: none !important; }
  .cart-bar > span { display: flex; align-items: center; gap: 8px; }
  .cart-bar__n { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; background: #fff; color: var(--brand); display: inline-grid; place-items: center; font-size: .82rem; }
  .toast { bottom: 90px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

@media (max-width: 360px) {
  .btn--lg { white-space: normal; text-align: center; }
  .hero h1 { font-size: 1.6rem; }
  .hero-search .btn { padding: .7em .8em; }
  .topbar__in { gap: 8px 12px; }
}

/* coupon */
.coupon { display: grid; gap: 6px; }
.coupon__label { font-weight: 700; font-size: .92rem; }
.coupon__row { display: flex; gap: 8px; }
.coupon__row input { flex: 1; min-width: 0; padding: .7em 1em; border-radius: 11px; border: 1.5px solid var(--line); background: var(--bg); font: inherit; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.coupon__row input:focus { outline: 0; border-color: var(--brand); background: #fff; }
.coupon__row input[readonly] { border-color: var(--green); background: #EEF8F3; color: #0B5E44; }
.coupon__row .btn { flex: none; }
.coupon__msg { margin: 0; font-size: .86rem; font-weight: 700; }
.coupon__msg.ok { color: var(--green); } .coupon__msg.bad { color: var(--red); }
.total--disc { color: var(--green); }

/* staff: coupons */
.sdisc { color: var(--green) !important; font-weight: 700; }
.cgrid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.cform { display: grid; gap: 12px; position: sticky; top: 84px; }
.cform .afield > span:first-child { display: block; }
.cform .afield small { font-weight: 600; }
.cform__code { display: flex; gap: 6px; }
.cform__code .anum { flex: 1; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cform__code .sbtn { height: 38px; flex: none; }
.cform__two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cform__msg { margin: 0; min-height: 1.2em; font-weight: 700; font-size: .88rem; }
.cform__msg.ok { color: var(--green); } .cform__msg.bad { color: var(--red); }
.cform__act { display: flex; gap: 8px; }
.cform__act .sbtn--primary { flex: 1; height: 44px; }
.clist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ccard { display: grid; gap: 10px; padding: 16px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); border-top: 4px solid var(--green); }
.ccard.is-off { border-top-color: #CBD5E1; }
.ccard.is-off .ccard__code, .ccard.is-off .ccard__val { opacity: .5; }
.ccard__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ccard__code { font-size: 1.1rem; letter-spacing: .06em; padding: 4px 10px; border: 1.5px dashed var(--brand); border-radius: 9px; color: var(--brand-dark); background: var(--brand-50); }
.ccard__val { font-size: 1.3rem; font-weight: 800; color: var(--green); }
.ccard__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.ccard__meta:empty { display: none; }
.ccard__meta span { padding: 3px 9px; border-radius: 8px; background: #F4F7FB; font-size: .8rem; font-weight: 600; color: var(--muted); }
.ccard__use { display: grid; gap: 5px; font-size: .84rem; color: var(--muted); font-weight: 600; }
.ccard__use i { display: block; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--brand) var(--w), #EEF2F7 var(--w)); }
[dir="rtl"] .ccard__use i { background: linear-gradient(270deg, var(--brand) var(--w), #EEF2F7 var(--w)); }
.ccard__act { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px solid #F0F3F7; }
.ccard__act .sbtn { height: 34px; }
/* staff: products */
.pcount { margin: 0 0 8px; font-size: .84rem; }
.plist { display: grid; gap: 8px; }
.prow { display: grid; grid-template-columns: 56px minmax(0, 1.8fr) minmax(140px, 1fr) auto 110px; gap: 14px; align-items: center; padding: 10px 14px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); border-inline-start: 4px solid transparent; }
.prow.is-changed { border-inline-start-color: var(--brand); }
.prow.is-hidden { opacity: .6; border-inline-start-color: var(--red); }
.prow__img { width: 56px; height: 56px; border-radius: 10px; background: #F4F7FB; display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.prow__img img { width: 100%; height: 100%; object-fit: contain; }
.prow__name { display: grid; min-width: 0; }
.prow__name b { font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prow__name small { color: var(--muted); font-size: .78rem; }
.prow__price > span:first-child { display: block !important; }
.prow__sw { display: grid; gap: 8px; }
.prow__end { display: grid; justify-items: end; gap: 2px; }
.aswitch--warn[aria-checked="true"] { color: var(--red); }
.aswitch--warn[aria-checked="true"] i { background: var(--red); }
.pmore { margin: 14px auto 0; display: flex; }
.prow__stock { display: grid; gap: 4px; font-size: .78rem; color: var(--muted); font-weight: 700; }
.prow__stock > div { display: flex; gap: 8px; }
.prow__stock label { display: grid; gap: 2px; font-size: .72rem; }
.pstk { width: 72px; padding: 6px 8px; }
.pstk.invalid { border-color: var(--red); }
.prow.is-out { border-inline-start-color: #C07F00; }
.ptags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.ptags:empty { display: none; }
.ptag { font-style: normal; font-size: .68rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: #EEF2F7; color: var(--muted); }
.ptag--new { background: #E6F0FB; color: var(--brand); }
.ptag--out { background: #FDF2E0; color: #9A6500; }
.pkpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.pseg { margin: 10px 0 6px; flex-wrap: wrap; }
.pedit__box { display: grid; gap: 12px; width: min(680px, 100%); padding: 18px; }
.pedit__photo { display: flex; gap: 14px; align-items: center; }
.pedit__photo > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pedit__photo small { flex-basis: 100%; }
.pedit__img { width: 96px; height: 96px; flex: none; }
.pedit__img .ic { width: 32px; height: 32px; }
.pedit .afield { display: grid; gap: 4px; }
.pedit .afield > span { display: block !important; font-size: .8rem; font-weight: 700; color: var(--muted); }
.pedit .anum, .pedit select { width: 100%; }
.ptext { resize: vertical; min-height: 70px; height: auto; padding: 8px 10px; font: inherit; font-weight: 500; line-height: 1.6; }
.pedit__sw { display: flex; gap: 22px; flex-wrap: wrap; }
.pdel { color: var(--red); }
@media (max-width: 700px) { .pkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .cgrid { grid-template-columns: minmax(0, 1fr); } .cform { position: static; } }
@media (max-width: 900px) {
  .prow { grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .prow__img { width: 48px; height: 48px; }
  .prow__name { grid-column: 2 / -1; }
  .prow__price { grid-column: 1 / 3; }
  .prow__stock { grid-column: 3; }
  .pstk { width: 100%; }
  .prow__end { grid-column: 1 / -1; display: flex; justify-content: space-between; }
  .sbottom .snav { font-size: .66rem; padding: 6px 2px; }
  .sbottom { grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)) !important; padding-inline: 2px; }
  .sbottom .snav span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .sdrv { max-width: 150px; }
}
@media (max-width: 480px) { .cform__two { grid-template-columns: 1fr; } .clist { grid-template-columns: minmax(0, 1fr); } }

/* customer accounts */
.hbtn--acc.is-in { color: var(--brand); background: var(--brand-50); }
.acc { display: grid; gap: 12px; }
.acc h2 { margin: 0; color: var(--brand-dark); }
.acc > p.muted { margin: -6px 0 0; }
.acc label { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
.acc input, .acc select { padding: .75em 1em; border-radius: 11px; border: 1.5px solid var(--line); background: var(--bg); font: inherit; font-size: 1rem; }
.acc input:focus, .acc select:focus { outline: 0; border-color: var(--brand); background: #fff; }
.acc__switch { margin: 0; text-align: center; font-size: .92rem; }
.acc__switch button { border: 0; background: none; color: var(--brand); font: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; }
.acc__forgot { margin: 0; text-align: center; font-size: .84rem; }
.acc__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.acc__tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg); border-radius: 12px; }
.acc__tabs button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 9px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.acc__tabs button[aria-selected="true"] { background: #fff; color: var(--brand); box-shadow: var(--shadow); }
.acc__orders, .acc__addrs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.acc__orders li { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); border-inline-start: 4px solid var(--sc); display: grid; gap: 4px; }
.acc__otop { display: flex; justify-content: space-between; align-items: center; }
.acc__st { padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 800; color: var(--sc); background: color-mix(in srgb, var(--sc) 12%, #fff); }
.acc__names { margin: 2px 0; font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.acc__oact { display: flex; gap: 6px; margin-top: 4px; }
.acc__empty { display: grid; justify-items: center; gap: 6px; padding: 30px 10px; text-align: center; }
.acc__empty .ic { width: 36px; height: 36px; color: var(--brand); }
.acc__addrs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.acc__addrs li div { display: grid; }
.acc__addrs li span { color: var(--muted); font-size: .88rem; }
.acc__addform { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.acc__addform h3 { margin: 0; font-size: 1rem; }
.acc__ok { margin: 0; color: var(--green); font-weight: 700; }
.acc-addr { display: grid; gap: 8px; }
.acc-addr:empty { display: none; }
.acc-save { display: flex !important; align-items: center; gap: 8px; font-weight: 600 !important; font-size: .9rem; }
.acc-save input { width: 18px; height: 18px; accent-color: var(--brand); }
@media (max-width: 640px) { .hbtn--acc .hbtn__label { display: none; } }

/* staff accounts */
.stabs { display: flex; gap: 4px; padding: 4px; background: #F2F5FA; border-radius: 12px; }
.stabs button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 9px; font: inherit; font-weight: 800; color: var(--muted); cursor: pointer; }
.stabs button[aria-selected="true"] { background: #fff; color: var(--brand); box-shadow: var(--shadow); }
.slogin__back { justify-self: start; padding-inline: 6px; }
[dir="ltr"] .slogin__back .ic { transform: scaleX(-1); }
.slogin__links { display: grid; gap: 4px; justify-items: center; }
.slogin__links button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--brand); font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; padding: 4px; }
.slogin__links button:hover { text-decoration: underline; }
.sfield__box select { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-weight: 600; color: var(--ink); }
.sfield__err.is-ok { color: var(--green); }
.sside__me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: #F4F7FB; }
.sside__me div { display: grid; min-width: 0; }
.sside__me b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sside__me small { color: var(--muted); font-size: .78rem; }
.wav { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 1.05rem; }
.viewas { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 12px; background: #FFF4E0; color: #7A5300; font-weight: 700; font-size: .86rem; }
.viewas .sbtn { height: 34px; }
.wsec { margin-bottom: 22px; }
.wsec > h3, .wact__head h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1.05rem; color: var(--ink); }
.wact__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.wcard { display: grid; gap: 12px; padding: 16px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); border-top: 4px solid var(--brand); }
.wcard--mgr { border-top-color: #A86E00; }
.wcard--mgr .wav { background: #A86E00; }
.wcard--pending { border-top-color: #E0A21B; background: linear-gradient(180deg, #FFFBF1, #fff 40%); }
.wcard.is-off { border-top-color: #CBD5E1; }
.wcard.is-off .wcard__top, .wcard.is-off .wcard__two, .wcard.is-off .wperms { opacity: .5; }
.wcard__top { display: flex; align-items: center; gap: 10px; }
.wcard__top > div { display: grid; flex: 1; min-width: 0; }
.wcard__top small { color: var(--muted); }
.wyou { color: var(--brand) !important; font-weight: 700; }
.wrole { padding: 3px 10px; border-radius: 99px; background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: .78rem; white-space: nowrap; }
.wcard--mgr .wrole { background: #FFF1CC; color: #A86E00; }
.wcard__job { margin: 0; display: flex; gap: 6px; font-size: .86rem; color: var(--muted); }
.wcard__two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wcard .afield > span:first-child { display: block; }
.wperms { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.wperms legend { padding: 0 6px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.wperms label { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 600; cursor: pointer; }
.wperms input { width: 16px; height: 16px; accent-color: var(--brand); }
.wperms:disabled label { cursor: default; }
.wcard__meta { margin: 0; font-size: .8rem; }
.wcard__act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid #F0F3F7; }
.wcard__act .sbtn { height: 34px; padding: 0 10px; font-size: .84rem; }
.wlog { list-style: none; margin: 0; padding: 0; display: grid; }
.wlog li { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid #F0F3F7; font-size: .9rem; }
.wlog li:last-child { border-bottom: 0; }
.wlog__who { font-weight: 800; color: var(--brand-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wlog__what small { color: var(--muted); display: block; }
.wlog time { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.wpass { max-width: 420px; }
@media (max-width: 640px) {
  .wgrid { grid-template-columns: minmax(0, 1fr); }
  .wlog li { grid-template-columns: minmax(0, 1fr) auto; }
  .wlog__what { grid-column: 1 / -1; grid-row: 2; }
  .viewas { order: 5; flex-basis: 100%; justify-content: space-between; }
  .stop { flex-wrap: wrap; }
}
.wcode { display: grid; gap: 12px; border-top: 4px solid #A86E00; }
.wcode h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; color: var(--ink); }
.wcode p.muted { margin: 0; font-size: .88rem; }
.wcode__row { display: flex; gap: 8px; flex-wrap: wrap; }
.wcode__row .anum { flex: 1; min-width: 180px; height: 44px; font-size: 1.1rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.wcode__row .sbtn { height: 44px; }
.wcode .cform__act { max-width: 360px; }

/* short screens (or zoomed-in browsers): keep the whole sidebar reachable */
@media (min-width: 901px) and (max-height: 820px) {
  .sside { gap: 12px; padding: 14px 14px; }
  .sside__logo { gap: 6px; padding-bottom: 12px; }
  .sside__logo img { width: 110px; }
  .snav { padding: 8px 12px; }
  .sside__me { padding: 8px; }
}

/* footer: manager / staff buttons */
.footer__staff { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.footer .fbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 190px; height: 48px; padding: 0 22px; border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; transition: background .15s, border-color .15s; }
.footer .fbtn:hover { background: rgba(255, 255, 255, .18); border-color: #fff; }
.footer .fbtn--mgr { background: #fff; color: var(--brand-dark); border-color: #fff; }
.footer .fbtn--mgr:hover { background: #EAF2FC; color: var(--brand-dark); }
.footer .fbtn .ic { width: 1.2em; height: 1.2em; }
.slogin__lock--mgr { background: #FFF1CC; color: #A86E00; }
@media (max-width: 480px) { .footer .fbtn { flex: 1; min-width: 0; padding: 0 12px; font-size: .92rem; } }
.wnoemail { color: #A86E00; font-weight: 700; }
