:root {
  --brand: #7FA99E; --brand-50: #EEF5F2; --brand-100: #DCEAE5; --brand-300: #A9C8BF; --brand-700: #4E7D71; --brand-800: #3D6359; --brand-900: #2C4A42;
  --cream: #F4F2EC; --ink: #1F2E2A; --ink-2: #44554F; --muted: #7D8C88; --line: rgba(61, 99, 89, .12); --sale: #C4605A; --warn: #C99A3B; --ok: #4F9A6D;
  /* glass */
  --glass: rgba(255, 255, 255, .58); --glass-strong: rgba(255, 255, 255, .78); --glass-tint: rgba(238, 245, 242, .62);
  --glass-border: rgba(255, 255, 255, .7); --blur: blur(18px) saturate(170%);
  --shadow: 0 8px 30px rgba(44, 74, 66, .08), 0 1px 2px rgba(44, 74, 66, .06);
  --shadow-lg: 0 24px 60px rgba(44, 74, 66, .16), 0 2px 6px rgba(44, 74, 66, .08);
  --r: 20px; --ease: cubic-bezier(.2, .8, .2, 1);
  --wrap: 1600px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif; color: var(--ink); font-size: 15.5px; line-height: 1.6;
  background: linear-gradient(180deg, #EAF3EF 0%, var(--cream) 420px, var(--cream) 100%); min-height: 100vh; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-700) 45%, transparent); outline-offset: 2px; border-radius: 10px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.muted { color: var(--muted); } .small { font-size: 13px; }
.h1, h1 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.35; margin: 0; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(19px, 1.8vw, 24px); margin: 0; font-weight: 800; }

/* soft brand-coloured light behind the glass */
.orbs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.orbs i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: drift 26s ease-in-out infinite alternate; }
.orbs i:nth-child(1) { width: 46vw; height: 46vw; background: #A9C8BF; top: -16vw; inset-inline-start: -10vw; }
.orbs i:nth-child(2) { width: 34vw; height: 34vw; background: #CFE3DB; top: 30vh; inset-inline-end: -12vw; animation-delay: -8s; }
.orbs i:nth-child(3) { width: 30vw; height: 30vw; background: #E9DFC9; bottom: -12vw; inset-inline-start: 30vw; opacity: .45; animation-delay: -16s; }
@keyframes drift { to { transform: translate(4vw, 3vh) scale(1.08); } }

.glass, .card, .box, .trust > div, .cat, .facts, .desc, .pdp-img, .tile, .filters-bar {
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .card, .box, .trust > div, .cat, .facts, .desc, .pdp-img, .tile, .top, .drawer, .modal-card, .suggest { background: rgba(255, 255, 255, .95) !important; }
}

/* announcement ticker */
.ann { background: linear-gradient(90deg, var(--brand-900), var(--brand-800), var(--brand-900)); color: #fff; overflow: hidden; white-space: nowrap; font-size: 13.5px; }
.ann-track { display: inline-flex; gap: 70px; padding: 7px 0; animation: tick 45s linear infinite; }
[dir=rtl] .ann-track { animation-name: tick-rtl; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes tick-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* header */
.top {
  position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .62); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-border); transition: box-shadow .3s, background .3s;
}
.top.scrolled { background: rgba(255, 255, 255, .78); box-shadow: 0 10px 30px rgba(44, 74, 66, .1); }
.top-in { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); height: 76px; transition: height .3s var(--ease); }
.top.scrolled .top-in { height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo span { display: grid; line-height: 1.2; } .logo b { font-size: 18px; color: var(--brand-800); } .logo small { color: var(--muted); font-size: 12px; }
.search { position: relative; flex: 1; max-width: 760px; margin-inline: auto; display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .7); border: 1.5px solid var(--glass-border); border-radius: 16px; padding: 0 16px; height: 50px; color: var(--muted); box-shadow: inset 0 1px 2px rgba(44, 74, 66, .05); transition: border-color .2s, box-shadow .2s, background .2s; }
.search:focus-within { border-color: var(--brand-300); background: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 18%, transparent); }
.search input { flex: 1; border: 0; background: none; outline: none; height: 100%; color: var(--ink); min-width: 0; }
.search kbd { font: 700 12px/1 system-ui; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 4px 7px; background: #fff; }
.search.in { max-width: 460px; margin: 0; background: var(--glass-strong); }
.suggest { position: absolute; top: calc(100% + 8px); inset-inline: 0; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 8px; color: var(--ink); max-height: 70vh; overflow: auto; animation: pop .18s var(--ease); }
.suggest a { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; }
.suggest a:hover, .suggest a.on { background: var(--brand-50); }
.suggest img, .suggest .ph { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: #fff; }
.suggest .all { display: block; text-align: center; color: var(--brand-700); font-weight: 700; padding: 10px; }
.suggest .none { padding: 14px; color: var(--muted); text-align: center; }
.tools { display: flex; align-items: center; gap: 4px; }
.tool { position: relative; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: var(--brand-800); font-weight: 800; transition: background .2s, transform .2s; }
.tool:hover { background: rgba(255, 255, 255, .8); transform: translateY(-1px); }
.city { display: flex; align-items: center; gap: 4px; color: var(--brand-800); padding: 0 10px; border-radius: 14px; height: 46px; transition: background .2s; }
.city:hover { background: rgba(255, 255, 255, .8); }
.city select { border: 0; background: none; font-weight: 700; cursor: pointer; max-width: 130px; outline: none; }
.cart-count { position: absolute; top: 2px; inset-inline-end: 0; background: linear-gradient(135deg, #D7756E, var(--sale)); color: #fff; font-size: 11.5px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; box-shadow: 0 3px 8px rgba(196, 96, 90, .4); }
.cart-count[hidden] { display: none; }
.cart-count.bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.45); } }
.catbar { border-top: 1px solid var(--line); }
.catbar-in { display: flex; gap: 6px; overflow-x: auto; padding-block: 8px; scrollbar-width: none; }
.catbar-in::-webkit-scrollbar { display: none; }
.catbar a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 99px; white-space: nowrap; font-weight: 700; font-size: 13.5px; color: var(--ink-2); transition: background .2s, color .2s; }
.catbar a span { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.catbar a:hover { background: rgba(255, 255, 255, .85); color: var(--brand-800); }
.catbar a.hot { color: var(--sale); }
@media (max-width: 900px) {
  .top-in { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 8px; }
  .top.scrolled .top-in { height: auto; }
  .logo small, .search kbd { display: none; }
  .tools { margin-inline-start: auto; }
  .search { order: 3; flex-basis: 100%; height: 44px; max-width: none; }
  .city select { max-width: 90px; }
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 14px; border: 0; cursor: pointer; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-800)); box-shadow: 0 8px 20px rgba(61, 99, 89, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .2s var(--ease), box-shadow .2s, filter .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(61, 99, 89, .34), inset 0 1px 0 rgba(255, 255, 255, .25); filter: brightness(1.05); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.big { height: 54px; font-size: 16.5px; padding: 0 26px; }
.btn.ghost { background: var(--glass-strong); color: var(--brand-800); border: 1px solid var(--glass-border); box-shadow: var(--shadow); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.btn.light { background: rgba(255, 255, 255, .92); color: var(--brand-800); box-shadow: none; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.block { width: 100%; }
.select, .input { height: 46px; border: 1.5px solid var(--line); border-radius: 14px; padding: 0 14px; background: rgba(255, 255, 255, .8); outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus, .select:focus { border-color: var(--brand-300); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); background: #fff; }
.input { width: 100%; } textarea.input { height: 92px; padding: 10px 14px; resize: vertical; }
.field { display: grid; gap: 6px; } .field > span { font-weight: 700; font-size: 14px; color: var(--ink-2); }

/* hero */
.hero-grid { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(260px, 1fr); gap: 16px; margin-top: 20px; }
.hero-wrap { position: relative; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; height: 100%; }
.hero::-webkit-scrollbar { display: none; }
.banner { scroll-snap-align: start; position: relative; aspect-ratio: 1200 / 530; overflow: hidden; color: #fff; display: flex; align-items: center;
  background: radial-gradient(120% 140% at 85% 0%, color-mix(in srgb, var(--c) 70%, #fff) 0%, var(--c) 38%, color-mix(in srgb, var(--c) 40%, #183029) 100%); }
.banner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 80% at 15% 110%, rgba(255, 255, 255, .25), transparent 60%); }
.banner > img:not(.banner-mark) { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.banner-txt { padding: 0 clamp(24px, 6%, 80px); display: grid; gap: 10px; max-width: 70%; position: relative; z-index: 1; }
.banner-txt b { font-size: clamp(26px, 3.6vw, 52px); line-height: 1.15; letter-spacing: -.02em; text-shadow: 0 2px 20px rgba(0, 0, 0, .12); }
.banner-txt span { font-size: clamp(15px, 1.5vw, 21px); opacity: .92; }
.banner-txt em { font-style: normal; justify-self: start; margin-top: 8px; padding: 10px 22px; border-radius: 99px; font-weight: 800; font-size: 15px; color: #fff;
  background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background .2s; }
.banner:hover .banner-txt em { background: rgba(255, 255, 255, .34); }
.banner-mark { position: absolute; inset-inline-end: -3%; bottom: -16%; width: 40%; opacity: .18; transition: transform 6s ease-out; }
.banner:hover .banner-mark { transform: scale(1.06) rotate(-3deg); }
.hero-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .55); cursor: pointer; font-size: 24px; color: #fff;
  background: rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .25s, background .2s; z-index: 2; }
.hero-wrap:hover .hero-btn { opacity: 1; } .hero-btn:hover { background: rgba(255, 255, 255, .36); }
.hero-btn.prev { inset-inline-start: 14px; } .hero-btn.next { inset-inline-end: 14px; }
[dir=rtl] .hero-btn.prev, [dir=rtl] .hero-btn.next { transform: translateY(-50%) scaleX(-1); }
.dots { position: absolute; bottom: 14px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: rgba(255, 255, 255, .5); cursor: pointer; transition: width .35s var(--ease), background .3s; }
.dots button.on { width: 26px; background: #fff; }
.hero-side { display: grid; gap: 16px; }
.tile { border-radius: 24px; padding: 22px; display: grid; gap: 4px; align-content: center; position: relative; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tile b { font-size: 20px; color: var(--brand-900); } .tile span { color: var(--ink-2); font-size: 14px; } .tile em { font-style: normal; color: var(--brand-700); font-weight: 800; margin-top: 6px; }
.tile-ic { font-size: 30px; }
.tile.dark { background: linear-gradient(135deg, rgba(78, 125, 113, .92), rgba(44, 74, 66, .95)); border-color: rgba(255, 255, 255, .2); }
.tile.dark b, .tile.dark span, .tile.dark em { color: #fff; } .tile.dark span { opacity: .85; }
.tile::after { content: ''; position: absolute; width: 160px; height: 160px; border-radius: 50%; inset-inline-end: -50px; bottom: -60px; background: radial-gradient(circle, rgba(127, 169, 158, .35), transparent 70%); }
@media (max-width: 1000px) { .hero-grid { grid-template-columns: 1fr; } .hero-side { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .hero-side { grid-template-columns: 1fr; } .banner-txt { max-width: 92%; } .hero-btn { display: none; } }

/* trust strip */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.trust > div { border-radius: var(--r); padding: 16px 18px; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; transition: transform .25s var(--ease); }
.trust > div:hover { transform: translateY(-2px); }
.trust svg { grid-row: span 2; color: var(--brand-700); background: var(--brand-50); padding: 10px; width: 46px; height: 46px; border-radius: 14px; }
.trust b { font-size: 15px; } .trust span { color: var(--muted); font-size: 13px; } .trust a { color: var(--brand-700); font-weight: 700; }
@media (max-width: 900px) { .trust { grid-template-columns: 1fr 1fr; } }

/* sections, categories, rails */
.sec { margin-top: clamp(28px, 3vw, 44px); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-tools { display: flex; align-items: center; gap: 6px; }
.more { color: var(--brand-700); font-weight: 800; font-size: 14px; padding: 6px 12px; border-radius: 99px; transition: background .2s; }
.more:hover { background: rgba(255, 255, 255, .8); }
.rail-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--glass-border); background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: var(--brand-800); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); transition: transform .2s, background .2s; }
.rail-btn:hover { background: #fff; transform: scale(1.06); }
[dir=rtl] .rail-btn { transform: scaleX(-1); } [dir=rtl] .rail-btn:hover { transform: scaleX(-1) scale(1.06); }
@media (hover: none) { .rail-btn { display: none; } }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.cat { border-radius: var(--r); padding: 10px; display: grid; gap: 10px; text-align: center; font-size: 14px; transition: transform .3s var(--ease), box-shadow .3s; }
.cat:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat img { aspect-ratio: 1; object-fit: cover; border-radius: 14px; width: 100%; transition: transform .5s var(--ease); }
.cat:hover img { transform: scale(1.04); }
.cat-dot { aspect-ratio: 1; border-radius: 14px; background: color-mix(in srgb, var(--c) 30%, #fff); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 220px); gap: 14px; overflow-x: auto; padding: 4px 4px 14px; margin: -4px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--brand-300) transparent; }
.rail .card { scroll-snap-align: start; }
.app-cta { margin-top: 44px; color: #fff; border-radius: 32px; padding: clamp(24px, 4vw, 48px); display: flex; align-items: center; gap: 24px; overflow: hidden; position: relative;
  background: radial-gradient(80% 140% at 100% 0%, #6E9E92 0%, var(--brand-800) 45%, var(--brand-900) 100%); box-shadow: var(--shadow-lg); }
.app-cta h2 { font-size: clamp(22px, 2.4vw, 32px); } .app-cta p { opacity: .9; max-width: 620px; }
.app-cta > img { width: 220px; opacity: .22; margin-inline-start: auto; }
.apps { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .app-cta > img { display: none; } }

/* product cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
@media (max-width: 480px) { .grid { grid-template-columns: 1fr 1fr; gap: 10px; } }
.card { border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 6px; transition: transform .3s var(--ease), box-shadow .3s, background .3s; position: relative; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); background: var(--glass-strong); }
.card-img { position: relative; aspect-ratio: 1; border-radius: 14px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s var(--ease); }
.card:hover .card-img img { transform: scale(1.06); }
.qv-btn { position: absolute; bottom: 8px; inset-inline: 8px; z-index: 2; height: 34px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .7); cursor: pointer; font-weight: 700; font-size: 13px; color: var(--brand-900);
  background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s var(--ease); }
.card:hover .qv-btn, .qv-btn:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .qv-btn { display: none; } }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); border-radius: 14px; }
.noimg.big { font-size: 80px; aspect-ratio: 1; }
.sale { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 1; background: linear-gradient(135deg, #D7756E, var(--sale)); color: #fff; font-weight: 800; font-size: 12.5px; padding: 3px 10px; border-radius: 99px; box-shadow: 0 4px 10px rgba(196, 96, 90, .3); }
.sale.inline { position: static; }
.card-name { font-weight: 700; font-size: 14.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.card-name:hover { color: var(--brand-800); }
.card-meta { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.price { font-weight: 800; color: var(--brand-800); font-size: 16px; } .price s { color: var(--muted); font-weight: 400; font-size: 12.5px; display: block; }
.add { width: 40px; height: 40px; border-radius: 13px; border: 0; color: #fff; font-size: 22px; cursor: pointer; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-800)); box-shadow: 0 6px 14px rgba(61, 99, 89, .3); transition: transform .2s var(--ease), box-shadow .2s; }
.add:hover { transform: scale(1.08) rotate(90deg); box-shadow: 0 8px 18px rgba(61, 99, 89, .38); }
.add.done { background: var(--ok); transform: none; }
.out { color: var(--muted); font-size: 13px; }
.flag { font-size: 10.5px; font-weight: 800; padding: 0 5px; border-radius: 5px; background: #eee; }
.f-EG { background: #FBE9E9; color: #9B2F2F; } .f-TN { background: #FDECEC; color: #B3261E; } .f-LY { background: #E7F3EA; color: #1F6B3A; }
.fly { position: fixed; z-index: 80; width: 60px; height: 60px; border-radius: 14px; object-fit: contain; background: #fff; box-shadow: var(--shadow-lg); pointer-events: none;
  transition: transform .75s cubic-bezier(.5, -.3, .3, 1), opacity .75s; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.card.reveal.in:hover { transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; } .orbs i, .ann-track { animation: none; } * { transition-duration: .01ms !important; }
}

/* listing pages */
.crumbs { margin-top: 16px; font-size: 13.5px; color: var(--muted); } .crumbs a:hover { color: var(--brand-700); }
.cat-head { margin-top: 12px; display: flex; align-items: center; gap: 18px; border-radius: 26px; padding: 18px 22px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 35%, rgba(255, 255, 255, .6)), rgba(255, 255, 255, .55)); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.cat-head img { width: 110px; height: 110px; border-radius: 20px; object-fit: cover; box-shadow: var(--shadow); }
.cat-head p { margin: 4px 0 0; color: var(--ink-2); }
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px auto; }
.filters .select { margin-inline-start: auto; }
.chk { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--brand-700); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 28px 0; }
.empty { text-align: center; padding: 60px 16px; color: var(--muted); display: grid; justify-items: center; gap: 10px; }

/* product page */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 3vw, 44px); margin-top: 16px; align-items: start; }
.pdp-img { position: sticky; top: 130px; border-radius: 28px; padding: 24px; overflow: hidden; cursor: zoom-in; }
.pdp-img img { width: 100%; aspect-ratio: 1; object-fit: contain; transition: transform .2s ease-out; transform-origin: var(--zx, 50%) var(--zy, 50%); }
.pdp-img.zoom img { transform: scale(1.9); }
.pdp-info { display: grid; gap: 14px; }
.pill { justify-self: start; background: rgba(255, 255, 255, .75); border: 1px solid var(--glass-border); color: var(--brand-800); font-weight: 700; padding: 5px 14px; border-radius: 99px; font-size: 13px; }
.pdp-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pdp-price b { font-size: clamp(28px, 3vw, 38px); color: var(--brand-800); letter-spacing: -.02em; } .pdp-price s { color: var(--muted); }
.seller { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14.5px; } .seller svg { color: var(--brand-700); flex-shrink: 0; }
.low { color: var(--sale); font-weight: 700; font-size: 14px; }
.buy { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; padding: 14px; border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-border); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow); }
.qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; height: 54px; }
.qty button { width: 44px; height: 100%; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--brand-800); }
.qty input { width: 46px; text-align: center; border: 0; outline: none; font-weight: 800; -moz-appearance: textfield; background: none; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.sh { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--glass-strong); color: var(--ink-2); font-weight: 700; cursor: pointer; font-size: 13.5px; transition: transform .2s, background .2s; }
.sh:hover { background: #fff; transform: translateY(-1px); }
.sh.wa { color: #1E8E4E; } .sh.fb { color: #2F5DA8; }
.facts { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: var(--r); overflow: hidden; }
.facts th, .facts td { text-align: start; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { color: var(--muted); font-weight: 400; width: 40%; }
.desc { border-radius: var(--r); padding: 18px; } .desc h2 { font-size: 17px; }
.rx-box { display: flex; gap: 14px; background: rgba(251, 244, 230, .85); border: 1px solid #F0DFB8; border-radius: var(--r); padding: 18px; color: var(--ink-2); }
.rx-box svg { color: var(--warn); flex-shrink: 0; } .rx-box p { margin: 6px 0 12px; }
.out-box { display: block; background: rgba(255, 255, 255, .6); border-color: var(--line); }
@media (max-width: 860px) { .pdp { grid-template-columns: 1fr; } .pdp-img { position: static; } .buy .btn { flex: 1; } }

/* cart drawer & quick view */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(31, 46, 42, .28); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .25s; }
.drawer { position: fixed; top: 10px; bottom: 10px; inset-inline-end: 10px; z-index: 70; width: min(420px, calc(100vw - 20px)); display: flex; flex-direction: column; border-radius: 26px;
  background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg); animation: slide-in .35s var(--ease); }
[dir=rtl] .drawer { animation-name: slide-in-rtl; }
@keyframes slide-in { from { transform: translateX(110%); } } @keyframes slide-in-rtl { from { transform: translateX(-110%); } }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); font-size: 17px; }
.drawer-body { flex: 1; overflow: auto; padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.drawer-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(61, 99, 89, .08); cursor: pointer; font-size: 15px; color: var(--ink-2); transition: background .2s; }
.x:hover { background: rgba(61, 99, 89, .16); }
.free-bar { font-size: 13px; color: var(--ink-2); } .free-bar i { display: block; height: 7px; border-radius: 99px; background: var(--brand-100); margin-top: 6px; overflow: hidden; }
.free-bar i::after { content: ''; display: block; height: 100%; width: var(--p); background: linear-gradient(90deg, var(--brand), var(--brand-700)); border-radius: 99px; transition: width .5s var(--ease); }
.modal { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; padding: 16px; background: rgba(31, 46, 42, .3); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .2s; }
.modal-card { position: relative; width: min(920px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 28px; padding: 22px;
  background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg); animation: pop .3s var(--ease); }
.modal-card > .x { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; }
.qv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.qv-grid img, .qv-grid .noimg { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 20px; background: #fff; }
.qv-info { display: grid; gap: 12px; }
@media (max-width: 680px) { .qv-grid { grid-template-columns: 1fr; } }
.to-top { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 40; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--glass-border); cursor: pointer; font-size: 20px; font-weight: 800; color: var(--brand-800);
  background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease); }
.to-top.on { opacity: 1; transform: none; pointer-events: auto; }

/* cart / checkout / account */
.two { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; align-items: start; margin: 16px 0 30px; }
.two > .box:last-child { position: sticky; top: 130px; }
@media (max-width: 960px) { .two { grid-template-columns: 1fr; } .two > .box:last-child { position: static; } }
.box { border-radius: 24px; padding: 20px; display: grid; gap: 14px; }
.box h2 { font-size: 18px; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; padding-bottom: 0; }
.line img, .line .ph { width: 72px; height: 72px; object-fit: contain; border-radius: 14px; background: #fff; }
.line .qty { height: 38px; } .line .qty button { width: 34px; }
.line.bad { opacity: .6; } .line .err { color: var(--sale); font-size: 13px; font-weight: 700; }
.rm { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; text-decoration: underline; }
.sum { display: grid; gap: 8px; } .sum div { display: flex; justify-content: space-between; } .sum .tot { font-size: 20px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 10px; color: var(--brand-800); }
.note { background: rgba(238, 245, 242, .85); color: var(--brand-800); border-radius: 14px; padding: 10px 14px; font-size: 13.5px; border: 1px solid var(--glass-border); }
.note.err { background: #FBEEED; color: var(--sale); }
.pay { display: grid; gap: 8px; }
.pay label { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 14px; padding: 13px; cursor: pointer; font-weight: 700; background: rgba(255, 255, 255, .6); transition: border-color .2s, background .2s; }
.pay label:has(input:checked) { border-color: var(--brand-700); background: rgba(238, 245, 242, .9); }
.pay input { accent-color: var(--brand-700); width: 18px; height: 18px; }
.tabs { display: flex; background: rgba(61, 99, 89, .07); border-radius: 14px; padding: 4px; }
.tabs button { flex: 1; border: 0; background: none; height: 40px; border-radius: 11px; font-weight: 700; cursor: pointer; transition: background .2s; }
.tabs button.on { background: #fff; color: var(--brand-800); box-shadow: 0 2px 8px rgba(44, 74, 66, .1); }
.auth { max-width: 480px; margin: 24px auto 40px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: var(--brand-50); color: var(--brand-800); }
.badge.warn { background: #FBF4E6; color: #8A6D3B; } .badge.ok { background: #E7F3EA; color: #1F6B3A; } .badge.bad { background: #FBEEED; color: var(--sale); }
.orders a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 12px; transition: background .2s; }
.orders a:hover { background: rgba(255, 255, 255, .7); }
.track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 6px 0; position: relative; }
.track div { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 12.5px; color: var(--muted); }
.track i { width: 32px; height: 32px; border-radius: 50%; background: rgba(61, 99, 89, .12); display: grid; place-items: center; font-style: normal; color: #fff; font-weight: 800; }
.track .on { color: var(--brand-800); font-weight: 700; } .track .on i { background: linear-gradient(135deg, var(--brand-700), var(--brand-800)); box-shadow: 0 4px 10px rgba(61, 99, 89, .3); }
.done-hero { text-align: center; display: grid; justify-items: center; gap: 6px; padding: 10px 0; }
.done-hero .ok { width: 68px; height: 68px; border-radius: 50%; background: linear-gradient(135deg, #63B183, var(--ok)); color: #fff; display: grid; place-items: center; font-size: 34px; box-shadow: 0 10px 24px rgba(79, 154, 109, .35); animation: pop .5s var(--ease); }
.loading { height: 200px; display: grid; place-items: center; } .loading::after { content: ''; width: 34px; height: 34px; border: 3px solid var(--brand-100); border-top-color: var(--brand-700); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* footer & toast */
.foot { color: #DCEAE5; margin-top: 60px; padding: 44px 0 20px; font-size: 14px; background: radial-gradient(70% 120% at 100% 0%, #3F6A5F 0%, var(--brand-900) 55%, #213833 100%); border-radius: 36px 36px 0 0; }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; }
.foot-in > div { display: grid; gap: 8px; align-content: start; } .foot b { color: #fff; font-size: 15px; }
.foot a { transition: color .2s; } .foot a:hover { color: #fff; } .foot p { margin: 0; } .foot svg { vertical-align: -3px; }
.foot .muted { color: #9DB8B0; }
.copy { border-top: 1px solid #ffffff1f; margin-top: 28px; padding-top: 16px; font-size: 12.5px; color: #9DB8B0; }
@media (max-width: 800px) { .foot-in { grid-template-columns: 1fr 1fr; } }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 30px); color: #fff; padding: 13px 20px; border-radius: 16px; font-weight: 700; opacity: 0; pointer-events: none; transition: .3s var(--ease); z-index: 90; max-width: calc(100% - 32px);
  background: rgba(44, 74, 66, .88); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .15); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { color: #CFE6DE; text-decoration: underline; margin-inline-start: 8px; }

/* ================= premium motion & phone experience ================= */
:root { --spring: cubic-bezier(.32, .72, 0, 1); --press: cubic-bezier(.2, .9, .3, 1.2); }

/* smooth page-to-page transitions (Chrome / Safari 18+; others just navigate) */
@view-transition { navigation: auto; }
.top { view-transition-name: top; } .tabbar { view-transition-name: tabbar; }
::view-transition-old(root) { animation: vt-out .22s ease-in both; }
::view-transition-new(root) { animation: vt-in .38s var(--spring) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px) scale(.99); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px) scale(.99); } }

/* staggered reveal: JS sets --i per card */
.reveal { transition-delay: calc(min(var(--i, 0), 8) * 55ms); }

/* image placeholders shimmer until the photo arrives */
.card-img, .pdp-img, .line img, .suggest img { background: linear-gradient(100deg, #F3F6F4 30%, #FFFFFF 50%, #F3F6F4 70%) 0 0 / 300% 100%; }
.js .card-img:not(.loaded) { animation: shimmer 1.4s linear infinite; }
.js .card-img img { opacity: 0; transition: opacity .45s ease, transform .5s var(--ease); }
.js .card-img.loaded img { opacity: 1; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ripple on the add button */
.add { position: relative; overflow: hidden; }
.add::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle, rgba(255,255,255,.55) 0 30%, transparent 32%); transform: scale(0); opacity: 0; }
.add.ripple::after { animation: ripple .55s ease-out; }
@keyframes ripple { from { transform: scale(0); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }

/* bottom tab bar (phones & tablets) */
.tabbar { display: none; }
.grab { display: none; }
@media (max-width: 900px) {
  body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .tools .cart-btn, .tools a[href$="/account"] { display: none; }   /* they live in the tab bar */
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 45; inset-inline: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    height: 64px; padding: 6px; border-radius: 24px; background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); box-shadow: 0 14px 40px rgba(44, 74, 66, .18), 0 1px 2px rgba(44, 74, 66, .08);
    transition: transform .45s var(--spring);
  }
  .tabbar a { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; border-radius: 18px; color: var(--muted); font-size: 11px; font-weight: 700; -webkit-tap-highlight-color: transparent; transition: color .25s, background .35s var(--spring), transform .2s var(--press); }
  .tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--press); }
  .tabbar a.on { color: var(--brand-800); background: rgba(127, 169, 158, .18); }
  .tabbar a.on svg { transform: translateY(-1px) scale(1.08); }
  .tabbar a:active { transform: scale(.9); }
  .tabbar .cart-count { position: absolute; top: 4px; inset-inline-end: calc(50% - 22px); font-style: normal; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .to-top { bottom: calc(92px + env(safe-area-inset-bottom)); width: 44px; height: 44px; }
  /* header slides away while scrolling down, comes back on scroll up */
  .top { transition: transform .45s var(--spring), box-shadow .3s, background .3s; }
  .top.away { transform: translateY(-100%); box-shadow: none; }
  .pdp-img, .two > .box:last-child { top: 16px; }

  /* cart & quick view become bottom sheets with a grab handle (swipe down to close) */
  .sheet { touch-action: pan-y; }
  .grab { display: block; width: 44px; height: 5px; border-radius: 99px; background: rgba(61, 99, 89, .25); margin: 10px auto 2px; flex-shrink: 0; }
  .drawer { top: auto; bottom: 0; inset-inline: 0; width: 100%; max-height: 88vh; border-radius: 30px 30px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: sheet-up .55s var(--spring) both !important; }
  .modal { place-items: end center; padding: 0; }
  .modal-card { width: 100%; max-height: 90vh; border-radius: 30px 30px 0 0; padding: 6px 18px calc(20px + env(safe-area-inset-bottom)); animation: sheet-up .55s var(--spring) both; }
  .modal-card > .x { top: 18px; }
  .sheet.dragging { animation: none !important; transition: none !important; }
  .sheet.closing { transition: transform .32s var(--spring) !important; }
  .scrim { animation: fade .4s ease both; }
  @keyframes sheet-up { from { transform: translateY(100%); } }
}

/* touch devices: tactile press instead of hover lifts */
@media (hover: none) {
  .card:hover, .cat:hover, .tile:hover, .trust > div:hover { transform: none; box-shadow: var(--shadow); }
  .card:hover .card-img img, .cat:hover img { transform: none; }
  .card, .cat, .tile, .btn, .tool, .sh, .banner, .trust > div, .orders a, .pay label, .add { -webkit-tap-highlight-color: transparent; transition: transform .25s var(--press), box-shadow .25s, background .25s; }
  .card:active, .cat:active, .tile:active, .trust > div:active, .orders a:active { transform: scale(.965); }
  .btn:active, .sh:active, .tool:active, .pay label:active { transform: scale(.95); }
  .add:active { transform: scale(.88); }
  .banner:active { transform: scale(.985); }
}

/* phone layout polish */
@media (max-width: 560px) {
  .hero-side { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 14px; border-radius: 20px; } .tile b { font-size: 15px; } .tile span { font-size: 12px; } .tile-ic { font-size: 22px; }
  .hero-grid { gap: 10px; margin-top: 12px; } .hero-wrap { border-radius: 24px; }
  .trust { gap: 10px; } .trust > div { padding: 12px; column-gap: 10px; } .trust svg { width: 38px; height: 38px; padding: 8px; }
  .cats { grid-template-columns: repeat(3, 1fr); gap: 10px; } .cat { padding: 8px; font-size: 12.5px; border-radius: 16px; }
  .rail { grid-auto-columns: 44vw; gap: 10px; }
  .card { border-radius: 18px; padding: 8px; }
  .catbar a { padding: 6px 12px; font-size: 13px; }
  .app-cta { border-radius: 26px; }
  .foot { border-radius: 28px 28px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .js .card-img:not(.loaded) { animation: none; } .js .card-img img { opacity: 1; }
}
.pdp-img img { height: auto; }
.btn { white-space: nowrap; }
@media (max-width: 900px) {
  /* the buy row floats above the tab bar while reading the product page */
  .pdp .buy { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 6; background: rgba(255, 255, 255, .8); box-shadow: 0 10px 30px rgba(44, 74, 66, .16); flex-wrap: nowrap; padding: 10px; gap: 8px; }
  .pdp .buy .qty { height: 48px; flex-shrink: 0; } .pdp .buy .qty button { width: 34px; } .pdp .buy .qty input { width: 30px; }
  .pdp .buy .btn.big { height: 48px; font-size: 15px; padding: 0 12px; flex: 1 1 auto; }
  .pdp .buy .btn.big svg { display: none; }
}

/* checkout address: saved addresses, map pin, structured fields */
.addr-book { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.addr-chip { flex: 0 0 auto; display: grid; gap: 2px; text-align: start; min-width: 150px; max-width: 230px; padding: 10px 14px; border-radius: 16px; cursor: pointer;
  border: 1.5px solid var(--line); background: rgba(255,255,255,.7); transition: border-color .2s, background .2s, transform .2s var(--press, ease); }
.addr-chip span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.addr-chip.on { border-color: var(--brand-700); background: var(--brand-50); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.addr-chip:active { transform: scale(.97); }
.addr-chip.new b { color: var(--brand-700); }
.map-box { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
#map { height: 300px; background: var(--brand-50); }
.map-box .locate { position: absolute; z-index: 500; top: 10px; inset-inline-start: 10px; height: 40px; font-size: 14px; }
.map-hint { position: absolute; z-index: 500; bottom: 10px; inset-inline: 10px; text-align: center; font-size: 12.5px; padding: 6px 10px; border-radius: 12px;
  background: rgba(255,255,255,.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--ink-2); }
.addr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.addr-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .addr-grid { grid-template-columns: 1fr; } #map { height: 240px; } }
.leaflet-container { font-family: inherit; }

/* Horizontal strips never scroll vertically: the mouse wheel always scrolls the page, not the strip's box.
   (Hover lift + shadows used to overflow the strip vertically and turn it into its own little scroller.) */
.rail, .hero, .catbar-in, .addr-book { overflow-y: hidden; overscroll-behavior-y: none; }
.rail { overflow-x: auto; padding: 10px 6px 18px; margin: -10px -6px -4px; scroll-padding-inline: 6px; }
@media (hover: hover) and (pointer: fine) {
  /* desktop: hide the strip's own scrollbar, scrolling is done with the arrow buttons, drag or shift+wheel */
  .rail { scrollbar-width: none; } .rail::-webkit-scrollbar { display: none; }
  .rail.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
  .rail.dragging .card { pointer-events: none; }
}

/* origin tags: «مصري» «تونسي» «ليبي» */
.otag { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 99px; margin-inline-end: 6px; vertical-align: 1px; background: #EEE; color: #555; }
.o-EG { background: #FBEAE6; color: #A1402F; } .o-TN { background: #FDECEC; color: #B3261E; } .o-LY { background: #E4F2E8; color: #1F6B3A; }
.pdp-info .otag { font-size: 12.5px; padding: 4px 12px; }

/* ---------- pharmacist chat ---------- */
.chat-fab { position: fixed; inset-inline-end: 22px; bottom: 26px; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 99px; color: #fff; text-decoration: none; font-weight: 700;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-800)); box-shadow: var(--shadow-lg); transition: transform .25s var(--press, ease); }
.chat-fab:hover { transform: translateY(-2px) scale(1.03); }
.chat-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
@media (max-width: 760px) { .chat-fab { bottom: 84px; inset-inline-end: 14px; padding: 12px; } .chat-fab span { display: none; } }
.chat-page { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; }
.chat-top { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.chat-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); font-size: 22px; }
.chat-log { height: min(60vh, 560px); overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px 4px; }
.cb { max-width: 78%; padding: 8px 13px 6px; border-radius: 18px; display: grid; gap: 4px; }
.cb.them { align-self: flex-start; background: var(--glass-strong); border: 1px solid var(--line); border-start-start-radius: 5px; }
.cb.me { align-self: flex-end; background: var(--brand-700); color: #fff; border-start-end-radius: 5px; }
.cb-t { white-space: pre-wrap; word-break: break-word; line-height: 1.7; }
.cb .t { opacity: .6; font-size: 11px; justify-self: end; } .cb .who { font-weight: 700; color: var(--brand-700); font-size: 12px; }
.cb-img { max-width: 240px; border-radius: 12px; display: block; }
.cb-prod { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; background: rgba(0,0,0,.05); color: inherit; text-decoration: none; font-weight: 600; }
.cb.me .cb-prod { background: rgba(255,255,255,.16); }
.cb-prod img { width: 36px; height: 36px; object-fit: contain; background: #fff; border-radius: 8px; }
.chat-att { background: var(--brand-50); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; } .chat-att .x { border: 0; background: none; font-size: 18px; cursor: pointer; float: inline-end; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; min-height: 46px; max-height: 140px; border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; font: inherit; background: #fff; }
.chat-form label.btn { cursor: pointer; }
.ask-ph { display: block; margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: var(--brand-50); color: var(--brand-800); font-weight: 700; text-decoration: none; }
.ask-ph:hover { background: var(--brand-100); }
