:root {
  --navy: #14294c;
  --navy-2: #1d3a66;
  --accent: #e4a03c;
  --accent-2: #cf8b28;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1a2230;
  --muted: #5f6b7a;
  --border: #dfe3e8;
  --border-2: #eceff3;
  --green: #0c7a4d;
  --wa: #1fae55;
  --wa-2: #178f45;
  --danger: #b42318;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 Inter, "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* Arabic: Plex Arabic first, a touch larger, and no letter-spacing (it breaks joined letters). */
[dir="rtl"] body { font-family: "IBM Plex Sans Arabic", Inter, system-ui, "Segoe UI", Tahoma, sans-serif; font-size: 15.5px; line-height: 1.7; }
[dir="rtl"] body * { letter-spacing: 0 !important; }
[dir="rtl"] .ico-arrow { transform: scaleX(-1); }
[dir="rtl"] .hero::before { background: linear-gradient(270deg, rgba(10,28,48,.94) 0%, rgba(10,28,48,.8) 45%, rgba(10,28,48,.35) 100%); }
[dir="rtl"] .cta::before { background: linear-gradient(270deg, rgba(10,28,48,.95), rgba(10,28,48,.7)); }
[dir="rtl"] .page-banner::before { background: linear-gradient(270deg, rgba(10,28,48,.92), rgba(10,28,48,.55)); }

.lang-btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; font: inherit; font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 4px; cursor: pointer; }
.lang-btn:hover { background: rgba(255,255,255,.12); }
.lang-btn[lang="ar"] { font-family: "IBM Plex Sans Arabic", sans-serif; }
.lang-btn[lang="en"] { font-family: Inter, sans-serif; }
a { color: var(--navy-2); text-decoration: none; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 600; }
img { max-width: 100%; display: block; }
.ico { flex: none; vertical-align: -3px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.section { padding-top: 36px; padding-bottom: 8px; }
.row { display: flex; }
.center { align-items: center; }
.gap-s { gap: 8px; }
.gap-m { gap: 14px; }
.wrap-row { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.nowrap { white-space: nowrap; }
.end { text-align: end; }
.page-title { font-size: 1.7rem; font-weight: 700; margin-bottom: 18px; }
.crumbs { font-size: .84rem; color: var(--muted); margin: 0 0 8px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--navy); }
.intro { margin-top: -8px; margin-bottom: 20px; }

/* ---------- header ---------- */
.utility { background: var(--navy); color: #c3cedb; font-size: .8rem; }
.utility .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 34px; gap: 12px; }
.utility nav { display: flex; gap: 18px; align-items: center; }
.utility a { color: #c3cedb; }
.utility a:hover { color: #fff; }

.header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
/* Logo: three crates + stacked SOUQ / BULK wordmark (kept left-to-right in Arabic too). */
.brand { display: flex; align-items: center; gap: 11px; direction: ltr; flex: none; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-word { display: flex; flex-direction: column; font-family: "Archivo Black", Inter, Arial, sans-serif; font-size: 21px; line-height: .86; text-transform: uppercase; }
.brand-word .w1 { color: var(--navy); }
.brand-word .w2 { color: var(--accent); }
.brand.light { margin-bottom: 14px; }
.brand.light .brand-mark { width: 32px; height: 32px; }
.brand.light .brand-word { font-size: 18px; }
.brand.light .w1 { color: #fff; }

.header-search { flex: 1; display: flex; border: 2px solid var(--navy); border-radius: var(--radius); overflow: hidden; max-width: 680px; background: #fff; }
.header-search select { border: 0; border-inline-end: 1px solid var(--border); background: #f7f8fa; padding: 0 12px; font: inherit; font-size: .88rem; color: var(--text); max-width: 190px; width: auto; border-radius: 0; }
.header-search input { flex: 1; border: 0; padding: 11px 14px; font: inherit; min-width: 0; outline: none; border-radius: 0; }
.header-search button { border: 0; background: var(--navy); color: #fff; padding: 0 20px; font: inherit; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.header-search button:hover { background: var(--navy-2); }

.header-nav { display: flex; align-items: center; gap: 18px; margin-inline-start: auto; }
.navlink { display: flex; align-items: center; gap: 6px; color: var(--text); font-weight: 500; font-size: .92rem; white-space: nowrap; }

.catnav { border-top: 1px solid var(--border-2); }
.catnav .wrap { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.catnav .wrap::-webkit-scrollbar { display: none; }
.catnav a { color: var(--text); font-size: .86rem; font-weight: 500; white-space: nowrap; padding: 11px 0; border-bottom: 2px solid transparent; }
.catnav a:hover { color: var(--navy); border-color: var(--border); }
.catnav a.active { color: var(--navy); border-color: var(--accent); font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; white-space: nowrap; line-height: 1.2;
  transition: background .15s, border-color .15s, color .15s;
}
.btn.sm { padding: 7px 12px; font-size: .83rem; }
.btn.lg { padding: 13px 24px; font-size: .98rem; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); color: #fff; }
.btn.outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn.outline:hover { border-color: var(--navy); color: var(--navy); }
.btn.light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.6); }
.btn.light:hover { background: #fff; color: var(--navy); }
.btn.wa { background: var(--wa); color: #fff; }
.btn.wa:hover { background: var(--wa-2); color: #fff; }
.btn.danger { background: #fff; color: var(--danger); border-color: #f0cfcc; }
.btn.danger:hover { background: #fdf1f0; color: var(--danger); }
.hero .btn.primary, .cta .btn.primary { background: var(--accent); color: var(--navy); }
.hero .btn.primary:hover, .cta .btn.primary:hover { background: #f2b555; }

/* ---------- hero ---------- */
.hero { position: relative; background-size: cover; background-position: center; color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,28,48,.94) 0%, rgba(10,28,48,.8) 45%, rgba(10,28,48,.35) 100%); }
.hero-inner { position: relative; padding-top: 72px; padding-bottom: 64px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 700; color: var(--accent); margin: 0 0 14px; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 800; max-width: 680px; letter-spacing: -.025em; }
/* Typewriter headline (typeHeadline in app.js): the untyped part keeps its place but is invisible, and the blinking
   caret takes no room, so the lines never shift while typing. */
.hero h1 .tw-off { color: transparent; }
.hero h1 .tw-caret { display: inline-block; width: 0; position: relative; }
.hero h1 .tw-caret::after { content: ""; position: absolute; inset-inline-start: 1px; bottom: -.08em; width: 3px; height: 1em; background: var(--accent); animation: tw-blink 1s step-end infinite; }
@keyframes tw-blink { 50% { opacity: 0; } }
.hero .lead { max-width: 580px; font-size: 1.06rem; color: #d5dde7; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 44px; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.16); max-width: 620px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.7rem; font-weight: 800; }
.hero-stats span { font-size: .8rem; color: #b8c4d2; text-transform: uppercase; letter-spacing: .08em; }

.trust { background: var(--surface); border-bottom: 1px solid var(--border); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.trust-grid > div { display: flex; gap: 14px; align-items: flex-start; padding: 22px 20px; color: var(--navy); }
.trust-grid > div + div { border-inline-start: 1px solid var(--border-2); }
.trust-grid b { display: block; color: var(--text); font-size: .95rem; }
.trust-grid span { color: var(--muted); font-size: .85rem; }

/* ---------- sections ---------- */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; white-space: nowrap; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.grid { display: grid; gap: 16px; }
.grid.products { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid.sellers { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* categories */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cat { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: #dde2e8; }
.cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.cat:hover img { transform: scale(1.05); }
.cat-label { position: absolute; inset: auto 0 0 0; padding: 28px 12px 10px; background: linear-gradient(transparent, rgba(8,20,36,.85)); color: #fff; display: flex; flex-direction: column; }
.cat-label span { font-weight: 600; font-size: .92rem; }
.cat-label small { color: #c9d3de; font-size: .76rem; }

/* product card */
.product { display: flex; flex-direction: column; overflow: hidden; color: var(--text); transition: box-shadow .15s, border-color .15s; }
.product:hover { color: var(--text); border-color: #c5ccd5; box-shadow: 0 6px 20px rgba(15,44,76,.1); }
.product:hover .pname { color: var(--navy-2); }
.photo { aspect-ratio: 1 / 1; background: #eef0f3; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.big { border-radius: var(--radius); border: 1px solid var(--border); aspect-ratio: 4 / 3; }
.photo.mini { width: 48px; flex: none; border-radius: 4px; }
.pbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pname { font-weight: 500; font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.price { color: var(--text); font-weight: 700; font-size: 1.08rem; margin-top: 4px; }
.price span { color: var(--muted); font-weight: 400; font-size: .8rem; }
.price.xl { font-size: 1.9rem; margin: 0; }
.moq { font-size: .8rem; color: var(--muted); }
.pseller { margin-top: auto; padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--border-2); font-size: .8rem; }
.pseller-name { font-weight: 500; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vi { color: var(--green); display: inline-flex; }

/* seller card */
.seller { overflow: hidden; display: flex; flex-direction: column; }
.cover { display: block; height: 96px; background: #dde2e8; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.sbody { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sbody .logo-box { margin-top: -28px; border: 3px solid #fff; }
.logo-box { width: 56px; height: 56px; flex: none; border-radius: var(--radius); background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; letter-spacing: .02em; }
.logo-box.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.logo-box.xl { width: 96px; height: 96px; font-size: 1.9rem; }
.sname { font-weight: 700; color: var(--text); font-size: 1.02rem; }
.smeta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .83rem; color: var(--muted); align-items: center; }
.smeta span { display: inline-flex; align-items: center; gap: 5px; }
.verified { color: var(--green) !important; font-weight: 600; }
.scats { font-size: .82rem; color: var(--muted); }
.sfoot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-2); display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .8rem; flex-wrap: wrap; }

/* emirates / steps / cta */
.emirates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.emirates a { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; color: var(--text); border-top: 3px solid var(--navy); }
.emirates a:hover { border-top-color: var(--accent); }
.emirates span { color: var(--muted); font-size: .82rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.steps .num { font-weight: 800; color: var(--accent-2); font-size: .9rem; letter-spacing: .06em; display: block; margin-bottom: 10px; }
.steps p { margin: 0; color: var(--muted); font-size: .9rem; }

.cta { position: relative; border-radius: var(--radius); overflow: hidden; background-size: cover; background-position: center; margin-bottom: 36px; }
.cta::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,28,48,.95), rgba(10,28,48,.7)); }
.cta-inner { position: relative; padding: 48px 40px; color: #fff; max-width: 640px; }
.cta-inner h2 { font-size: 1.7rem; }
.cta-inner p { color: #d5dde7; margin: 0 0 22px; }

/* ---------- listing pages ---------- */
.page-banner { position: relative; background-size: cover; background-position: center; color: #fff; }
.page-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,28,48,.92), rgba(10,28,48,.55)); }
.page-banner .wrap { position: relative; padding-top: 36px; padding-bottom: 32px; }
.page-banner h1 { margin: 0; font-size: 1.9rem; }
.page-banner .crumbs, .page-banner .crumbs a { color: #c3cedb; }

.layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.filters { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 130px; }
.filters h3 { margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--border-2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
.sort { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.sort select { width: auto; padding: 7px 10px; }
.bar { display: flex; gap: 8px; padding: 12px; margin-bottom: 18px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.bar input { flex: 2 1 260px; }
.bar select { flex: 1 1 170px; width: auto; }
/* ---------- skeletons: grey shapes shaped like the content while it loads ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sk-wrap { display: contents; }
.sk { display: block; border-radius: 4px; background: linear-gradient(100deg, #e8ecf0 30%, #f4f6f8 50%, #e8ecf0 70%) 0 0 / 300% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.sk-line { height: 11px; margin: 7px 0; }
.sk-line.sk-lg { height: 16px; margin: 9px 0; }
.sk-title { height: 30px; margin: 10px 0 22px; }
.sk-photo { aspect-ratio: 1 / 1; border-radius: 0; }
.sk-photo.sk-big { aspect-ratio: 4 / 3; border-radius: var(--radius); }
.sk-block { height: 86px; margin: 16px 0; border-radius: var(--radius); }
.sk-btn { height: 42px; width: 220px; margin-top: 22px; border-radius: var(--radius); }
.sk-hero { height: 300px; border-radius: var(--radius); margin-bottom: 28px; }
.sk-filters { height: 460px; border-radius: var(--radius); }
@media (max-width: 900px) { .sk-filters { height: 52px; } }
.sk-num { display: inline-block; vertical-align: middle; height: .8em; width: 2.2em; margin: .2em 0; }
.sk-sep { border-top: 1px solid var(--border-2); margin: 8px 0 2px; }
.sk-card { overflow: hidden; pointer-events: none; }
.sk-row { padding: 14px 16px; }
.sk-list { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.sk-page.section { padding-bottom: 36px; }
/* On the dark hero banner the numbers load on a translucent white bar. */
.hero-stats .sk { background: rgba(255,255,255,.22); animation: none; }

/* Page numbers under long lists */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 26px 0 6px; }
.pager a, .pager span { min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font-weight: 600; font-size: .9rem; }
.pager a:hover { border-color: var(--navy); color: var(--navy); }
.pager .cur { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager .gap { border: 0; background: none; min-width: 20px; padding: 0; color: var(--muted); }
.pager .off { color: #a9b2bd; background: var(--bg); }
@media (max-width: 560px) { .pager a:not(.step), .pager .gap { display: none; } .pager .cur { order: 0; } }

.empty { background: var(--surface); border: 1px dashed #c9d0d8; border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--muted); }
.empty .ico { color: #9aa6b4; margin-bottom: 10px; }
.empty h3 { color: var(--text); }
.empty p { margin: 0; }

/* ---------- forms ---------- */
label { display: flex; flex-direction: column; gap: 5px; font-weight: 500; font-size: .86rem; color: var(--text); }
input, select, textarea {
  font: inherit; font-size: .92rem; color: var(--text); background: #fff;
  border: 1px solid #cfd5dc; border-radius: var(--radius); padding: 9px 11px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(15,44,76,.12); border-color: var(--navy); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
label.check input { width: auto; accent-color: var(--navy); }
.form { padding: 24px; display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.form h3 { margin: 8px 0 0; padding-top: 16px; border-top: 1px solid var(--border-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.form h3:first-child { border: 0; padding: 0; margin: 0; }
.form .btn { align-self: flex-start; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.three { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 16px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: -8px; }
.check-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: -8px; }
.check-groups fieldset { border: 1px solid var(--border-2); border-radius: var(--radius); padding: 10px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.check-groups legend { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 4px; }

/* all-categories page */
.group-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.group-jump a { font-size: .85rem; font-weight: 500; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 6px 14px; }
.group-jump a:hover { border-color: var(--navy); color: var(--navy); }
.cat-group { padding-top: 28px; scroll-margin-top: 130px; }
.cat-group h2 { padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--accent); display: inline-block; }
.grid.guides { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.guide-card { display: flex; flex-direction: column; color: var(--text); overflow: hidden; }
.guide-card:hover { border-color: var(--navy); color: var(--text); }
.guide-card .photo { aspect-ratio: 16 / 9; }
.guide-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.guide-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.guide-body h3 { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.guide-body p { margin: 0; }
.guide-body .more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .88rem; color: var(--navy-2); }
.guide-hero { aspect-ratio: 12 / 5; border-radius: var(--radius); overflow: hidden; margin: 12px 0 20px; }
.guide-hero img { width: 100%; height: 100%; object-fit: cover; }
.guide h2 { margin-top: 28px; }
.guide-cta { padding: 18px 20px; margin-top: 28px; }
.guide-cta h3 { margin-top: 0; }
.branch-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.branch-list li { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.biz-wide { grid-column: 1 / -1; }
.b-row { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 1.3fr 1fr auto; gap: 6px; margin-bottom: 6px; }
@media (max-width: 760px) { .b-row { grid-template-columns: 1fr 1fr; } }
.file-field { display: grid; gap: 8px; margin-top: 8px; }
.file-current { display: flex; align-items: center; gap: 12px; }
.slug-field { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.slug-field > span { display: flex; align-items: center; padding: 0 10px; background: var(--bg, #f3f4f6); color: var(--muted); font-size: .85rem; white-space: nowrap; }
.slug-field input { border: 0; border-radius: 0; flex: 1; min-width: 0; }
.price-date { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-size: .82rem; color: var(--muted); }
.price-date .ico { flex: none; margin-top: 3px; }
.price-date.old { color: #9a6700; }
.danger-zone { margin-top: 24px; padding: 20px; border-color: #f0cfcc; }
.danger-zone h3 { display: flex; align-items: center; gap: 8px; color: var(--danger); margin-top: 0; }
/* Cloudflare "not a robot" check (js/captcha.js): usually invisible; takes space only when it asks for a click. */
.captcha:empty { display: none; }
.captcha iframe { max-width: 100%; }
.error { color: var(--danger); background: #fdf1f0; border: 1px solid #f0cfcc; padding: 9px 12px; border-radius: var(--radius); margin: 0; font-size: .88rem; }
.notice { display: flex; gap: 10px; align-items: flex-start; background: #fff8ec; border: 1px solid #f3dcb5; color: #7a5310; padding: 12px 14px; border-radius: var(--radius); font-size: .88rem; margin-bottom: 18px; }
.auth { max-width: 440px; }

/* ---------- profile & product detail ---------- */
.profile-cover { height: 220px; background-size: cover; background-position: center; position: relative; }
.profile-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent, rgba(10,28,48,.45)); }
.profile { position: relative; margin-top: -70px; padding: 24px; display: grid; grid-template-columns: auto 1fr 300px; gap: 24px; align-items: start; }
.profile h1 { font-size: 1.6rem; margin-bottom: 6px; }
.about { color: var(--text); margin: 14px 0; max-width: 640px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags a { font-size: .8rem; border: 1px solid var(--border); border-radius: 4px; padding: 4px 10px; color: var(--text); background: #f8f9fb; }
.tags a:hover { border-color: var(--navy); color: var(--navy); }
.contact-box { border-inline-start: 1px solid var(--border-2); padding-inline-start: 24px; }
.contact-box p { margin: 0 0 8px; font-size: .86rem; display: flex; gap: 6px; }
.contact-box p .ico { margin-top: 3px; }
.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.stack .btn { width: 100%; }

.pdetail { display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; margin-top: 8px; }
.pinfo h1 { font-size: 1.65rem; font-weight: 700; }
.price-box { background: #f7f8fa; border: 1px solid var(--border-2); border-radius: var(--radius); padding: 16px 18px; margin: 14px 0 18px; }
.price-box .muted { font-size: .88rem; margin-top: 4px; }
.specs { border-collapse: collapse; width: 100%; margin-bottom: 18px; font-size: .9rem; }
.specs th, .specs td { text-align: start; padding: 9px 0; border-bottom: 1px solid var(--border-2); }
.specs th { color: var(--muted); font-weight: 500; width: 38%; }
.desc { white-space: pre-line; color: var(--text); }
.sellerbox { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 14px; margin: 20px 0 14px; background: #fff; }
.note { display: flex; gap: 8px; font-size: .8rem; color: var(--muted); }
.note .ico { margin-top: 2px; }

/* ---------- dashboard ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.dash-head h1 { font-size: 1.5rem; margin-bottom: 4px; }
.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.dash-stats .card { padding: 16px 18px; display: flex; flex-direction: column; }
.dash-stats span { color: var(--muted); font-size: .82rem; }
.dash-stats strong { font-size: 1.3rem; }
.table-wrap { overflow-x: auto; margin-bottom: 16px; }
table.list { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.list th, table.list td { padding: 12px 14px; border-bottom: 1px solid var(--border-2); text-align: start; vertical-align: middle; }
table.list th { font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; background: #f8f9fb; }
table.list tr:last-child td { border-bottom: 0; }
table.list td.end { text-align: end; }
table.list td.end .btn { margin-inline-start: 4px; }
.status { font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: 4px; background: #f1f2f4; color: var(--muted); }
.status.ok { background: #e6f4ed; color: var(--green); }

.prose ul { padding-inline-start: 20px; }
.prose li { margin-bottom: 4px; }

/* ---------- footer ---------- */
.footer { margin-top: 48px; background: var(--navy); color: #b8c4d2; font-size: .88rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-top: 44px; padding-bottom: 32px; }
.footer-grid p { max-width: 340px; margin: 0; }
.footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.footer-grid a { display: block; color: #b8c4d2; margin-bottom: 8px; }
.footer a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; }
.footer-bottom a { color: #b8c4d2; }
.footer-bottom .lang-btn { padding: 1px 8px; font-size: .78rem; }

/* ---------- floating island: bottom menu on phones and in the app (renderIsland in app.js) ---------- */
.island { display: none; }
@media (max-width: 760px) {
  .island {
    display: flex; gap: 2px; position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: min(440px, calc(100% - 24px)); padding: 6px;
    background: rgba(20, 41, 76, .9); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; box-shadow: 0 12px 32px rgba(10, 20, 40, .32);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s;
  }
  .island a {
    flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 2px 7px; border-radius: 999px; color: #b8c4d2; font-size: .66rem; font-weight: 600; line-height: 1;
    text-decoration: none; transition: background .2s, color .2s; -webkit-tap-highlight-color: transparent;
  }
  .island a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .island a:active { transform: scale(.94); }
  .island a.active { background: var(--accent); color: var(--navy); }
  .island .dot { position: absolute; top: 5px; inset-inline-start: calc(50% + 6px); width: 9px; height: 9px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 2px #14294c; }
  .island a.active .dot { box-shadow: 0 0 0 2px var(--accent); }
  .island.away, body.typing .island { transform: translate(-50%, calc(100% + 30px)); opacity: 0; pointer-events: none; }
  body.in-admin .island { display: none; }
  /* Room at the end of every page so the island never covers the last links. */
  body:not(.in-admin) .footer { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .profile { grid-template-columns: auto 1fr; }
  .contact-box { grid-column: 1 / -1; border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--border-2); padding-top: 18px; }
  .stack { flex-direction: row; flex-wrap: wrap; }
  .stack .btn { width: auto; }
}
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .pdetail { grid-template-columns: 1fr; gap: 20px; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-grid > div + div { border-inline-start: 0; border-top: 1px solid var(--border-2); }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .utility .tagline { display: none; }
  .utility .wrap { justify-content: center; }
  .utility nav { gap: 14px; }
  .header { position: static; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-word { font-size: 18px; }
  .navlink span { display: none; }
  .header-nav .btn { padding: 8px 12px; font-size: .84rem; }
  .header-search select { display: none; }
  .header-search .label { display: none; }
  .header-search button { padding: 0 14px; }
  .hero-inner { padding-top: 44px; padding-bottom: 40px; }
  .hero-stats { gap: 24px; margin-top: 32px; }
  .hero-stats strong { font-size: 1.35rem; }
  .grid.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pbody { padding: 10px; }
  .cats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .two, .three { grid-template-columns: 1fr; }
  .profile { grid-template-columns: 1fr; margin-top: -48px; padding: 18px; }
  .profile .logo-box.xl { width: 72px; height: 72px; font-size: 1.4rem; }
  .profile-cover { height: 150px; }
  .dash-stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .dash-stats .card { padding: 12px; }
  .dash-stats strong { font-size: 1rem; }
  .cta-inner { padding: 32px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .page-title { font-size: 1.4rem; }
}

/* ---------- public additions: featured, reports, announcement, seller stats ---------- */
.card.product, .card.seller { position: relative; }
.feat-tag { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent); color: var(--navy); font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; }
.report-link { background: none; border: 0; padding: 0; margin-top: 12px; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.report-link:hover { color: var(--danger); text-decoration: underline; }
.dialog { border: 0; border-radius: 10px; padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dialog::backdrop { background: rgba(10,20,35,.55); }
.dialog .form { margin: 0; }
.announce { background: var(--accent); color: var(--navy); font-size: .88rem; font-weight: 600; }
.announce .wrap { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; text-align: center; }
.announce a { color: var(--navy); display: inline-flex; }
.footer-support { margin-top: 18px; }
.footer-support a { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.notice.danger { background: #fdecea; border-color: #f3c7c2; color: var(--danger); }
.stats-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; }
.dash-stats.four { grid-template-columns: repeat(4, 1fr); }
.dash-stats.five { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) { .dash-stats.five { grid-template-columns: repeat(3, 1fr); } }
.account-profile { padding: 16px 20px; margin-bottom: 8px; }
.account-profile .section-head { margin-bottom: 8px; }
.account-profile h3 { margin: 0; }
.dash-stats .card span { display: flex; align-items: center; gap: 6px; }
.status.warn { background: #fff4e0; color: #8a5a00; }
.status.danger { background: #fdecea; color: var(--danger); }
.status.feat { background: #fdf3e1; color: #7a4f0e; }
.status { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* ---------- admin panel ---------- */
body.in-admin .utility, body.in-admin .catnav, body.in-admin .footer, body.in-admin .header-search { display: none; }
.admin { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 73px);
  font-family: Inter, system-ui, "Segoe UI", sans-serif; font-size: 14.5px; line-height: 1.5; text-align: left; }
.adm-side { background: var(--navy); color: #c9d3de; display: flex; flex-direction: column; position: sticky; top: 73px; height: calc(100vh - 73px); }
.adm-side-head { padding: 20px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.adm-side-head b { display: block; color: #fff; font-size: 1rem; }
.adm-side-head span { display: block; font-size: .76rem; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-nav { padding: 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.adm-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 6px; color: #c9d3de; font-weight: 500; font-size: .9rem; white-space: nowrap; }
.adm-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.adm-nav a.active { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.adm-nav em { margin-left: auto; font-style: normal; font-size: .72rem; font-weight: 700; background: rgba(255,255,255,.16); color: #fff; border-radius: 99px; padding: 1px 8px; }
.adm-nav em.hot { background: var(--accent); color: var(--navy); }
.adm-side-foot { padding: 12px; display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.08); }
.adm-side-foot .btn { background: transparent; color: #c9d3de; border-color: rgba(255,255,255,.22); }
.adm-side-foot .btn:hover { color: #fff; border-color: #fff; }
.adm-main { padding: 24px 28px 56px; min-width: 0; }
.adm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.adm-head h1 { font-size: 1.45rem; margin: 0; }
.adm-head p { margin: 6px 0 0; color: var(--muted); max-width: 720px; }
.adm-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* Admin skeleton: table rows while a list or chart loads (plain rows inside a panel, a card on its own). */
.adm-sk { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 16px; }
.adm-panel .adm-sk { background: none; border: 0; padding: 0; }
.adm-sk-row { display: grid; grid-template-columns: 1.1fr 2fr 1.2fr .7fr; gap: 18px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border-2); }
.adm-sk-row:last-child { border-bottom: 0; }
.adm-sk-row .sk { margin: 0; }
.adm-sk-row:nth-child(even) .sk:nth-child(2) { width: 75%; }
.adm-sk-row:nth-child(3n) .sk:nth-child(3) { width: 60%; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tiles.four { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; color: var(--text); }
a.tile:hover { border-color: var(--navy); color: var(--text); }
.tile-label { font-size: .8rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.tile-val { font-size: 1.7rem; font-weight: 700; line-height: 1.25; }
.tile-sub, .delta-vs { font-size: .76rem; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: .78rem; font-weight: 600; }
.delta.up { color: var(--green); }
.delta.down { color: var(--danger); }
.delta.flat { color: var(--muted); }

.adm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.adm-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; min-width: 0; margin-bottom: 16px; }
.adm-grid .adm-panel { margin-bottom: 0; }
.adm-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.adm-panel-head h2 { font-size: 1rem; margin: 0; }

.attn { display: flex; flex-direction: column; }
.attn a { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--border-2); color: var(--text); }
.attn a:last-child { border-bottom: 0; }
.attn a:hover { color: var(--navy-2); }
.attn a > .ico:first-child { color: var(--muted); }
.attn b { min-width: 28px; }
.attn span { flex: 1; }
.mini-list { display: flex; flex-direction: column; }
.mini-list a { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--border-2); color: var(--text); align-items: center; }
.mini-list a:last-child { border-bottom: 0; }
.mini-list a > span { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list small { grid-column: 1; color: var(--muted); font-size: .78rem; }
.mini-list a > .status, .mini-list a > b { grid-row: 1 / span 2; grid-column: 2; font-weight: 600; }

/* column chart: single series, 2px gaps, 4px rounded tops, hairline grid */
.cc { margin: 0; }
.cc figcaption { font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.cc-body { display: flex; gap: 8px; height: 170px; }
.cc-y { display: flex; flex-direction: column; justify-content: space-between; font-size: .72rem; color: var(--muted);
  text-align: right; min-width: 30px; font-variant-numeric: tabular-nums; margin: -.5em 0; line-height: 1; }
.cc-plot { position: relative; flex: 1; }
.cc-grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; }
.cc-grid i { display: block; border-top: 1px solid var(--border-2); }
.cc-grid i:last-child { border-top-color: var(--border); }
.cc-cols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.cc-slot { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; cursor: default; }
.cc-bar { width: 100%; max-width: 24px; background: var(--navy); border-radius: 4px 4px 0 0; transition: opacity .12s; }
.cc-cols:hover .cc-bar { opacity: .45; }
.cc-cols .cc-slot:hover .cc-bar, .cc-slot:focus-visible .cc-bar { opacity: 1; }
.cc-slot:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 4px; }
.cc-x { display: flex; gap: 2px; margin: 6px 0 0 38px; font-size: .72rem; color: var(--muted); }
.cc-x span { flex: 1; width: 0; white-space: nowrap; text-align: center; }
.cc-x span:first-child { text-align: left; }
.cc-x span:last-child { text-align: right; }
.cc-table summary { font-size: .78rem; color: var(--muted); cursor: pointer; margin-top: 10px; }
.cc-table table { margin-top: 8px; }
.adm-tip { position: absolute; z-index: 300; transform: translate(-50%, -100%); background: #0b1628; color: #fff; font-size: .76rem;
  padding: 5px 9px; border-radius: 5px; pointer-events: none; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.2); }

/* ranked bars: value at the tip */
.bl { display: flex; flex-direction: column; gap: 9px; }
.bl-row { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; align-items: center; gap: 10px; font-size: .86rem; }
.bl-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-label a { color: var(--text); }
.bl-label a:hover { color: var(--navy-2); }
.bl-track { height: 10px; position: relative; }
.bl-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--navy); border-radius: 0 4px 4px 0; }
.bl-val { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 2ch; text-align: right; }

/* lists, filters, bulk actions */
.adm-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.adm-filters input { flex: 2 1 220px; width: auto; }
.adm-filters select { flex: 0 1 auto; width: auto; max-width: 240px; }
.adm-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: #eef2f8; border: 1px solid #d6deea; border-radius: var(--radius); margin-bottom: 10px; font-size: .86rem; }
.adm-bulk .bulk-count { margin-right: 6px; color: var(--muted); }
.adm-bulk.active .bulk-count { color: var(--text); font-weight: 600; }
.adm-bulk:not(.active) .btn { opacity: .45; pointer-events: none; }
.admin table.list td, .admin table.list th { padding: 10px 12px; }
.admin table.list .cb { width: 36px; }
.admin table.list .cb input { width: auto; }
.admin table.list .num { text-align: right; font-variant-numeric: tabular-nums; }
table.list.compact td, table.list.compact th { padding: 5px 10px; font-size: .82rem; }
.adm-table td .btn.sm { padding: 6px 9px; }
.adm-cell { display: flex; gap: 10px; align-items: center; }
.adm-cell .photo.mini { width: 40px; }
.logo-box.sm { width: 34px; height: 34px; font-size: .78rem; border-radius: 5px; }
.adm-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: .86rem; color: var(--muted); flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); margin-bottom: 14px; }
.seg a { padding: 6px 13px; font-size: .84rem; color: var(--text); border-right: 1px solid var(--border); }
.seg a:last-child { border-right: 0; }
.seg a.active { background: var(--navy); color: #fff; }
.adm-head .seg { margin-bottom: 0; }

.adm-cards { display: flex; flex-direction: column; gap: 12px; }
.adm-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.adm-card a b { color: var(--text); }
.adm-card .meta { font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.adm-card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.adm-card .licence { margin-top: 8px; font-size: .88rem; }
.report-msg { margin: 8px 0 0; padding: 8px 12px; background: #f8f9fb; border-inline-start: 3px solid var(--border); border-radius: 4px; white-space: pre-line; }

.adm-form { max-width: 960px; margin-bottom: 16px; }
.adm-panel .adm-form { padding: 0; }
.adm-flags { display: flex; gap: 10px 22px; flex-wrap: wrap; padding: 12px 14px; background: #f8f9fb; border: 1px solid var(--border-2); border-radius: var(--radius); }

.adm-toast { position: fixed; bottom: 22px; right: 22px; z-index: 400; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 6px;
  font-size: .88rem; box-shadow: 0 8px 24px rgba(0,0,0,.2); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; }
.adm-toast.show { opacity: 1; transform: none; }
.adm-toast.error { background: var(--danger); }

/* ---------- support tickets (customer + admin) ---------- */
.ticket-list { display: flex; flex-direction: column; gap: 10px; }
.ticket-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--text); flex-wrap: wrap; }
.ticket-row:hover { border-color: var(--navy); color: var(--text); }
.ticket-row.unread { border-inline-start: 3px solid var(--accent); }
.tk-subject { font-weight: 500; }
.ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ticket-head .page-title { margin-bottom: 6px; }
.thread { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.msg { max-width: 82%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.msg-meta { font-size: .78rem; color: var(--muted); margin-bottom: 4px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.msg-meta b { color: var(--text); display: inline-flex; align-items: center; gap: 4px; }
.msg-body { white-space: pre-line; overflow-wrap: anywhere; }
.msg.from-me { align-self: flex-end; background: #eef3fa; border-color: #d3deec; }
.msg.from-team { align-self: flex-start; }
.msg.internal { align-self: flex-end; background: #fff8e6; border: 1px dashed #e7c77d; }
.status.tstatus-open { background: #fff4e0; color: #8a5a00; }
.status.tstatus-pending { background: #e6f4ed; color: var(--green); }
.status.tstatus-resolved { background: #eef0f3; color: var(--muted); }
.status.tstatus-closed { background: #eef0f3; color: var(--muted); }
.count-pill { background: var(--accent); color: var(--navy); border-radius: 99px; padding: 0 7px; font-size: .74rem; font-weight: 700; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-inline-end: 6px; vertical-align: 1px; }
.admin tr.unread td { font-weight: 600; }
.admin tr.unread td .muted { font-weight: 400; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.ticket-side .adm-panel { margin-bottom: 12px; }
.ticket-side .form { padding: 0; gap: 10px; }
.kv { display: flex; flex-direction: column; gap: 8px; font-size: .88rem; margin-bottom: 12px; }
.kv > div { display: flex; flex-direction: column; }
.kv span { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
label.inline select { width: auto; }

/* ---------- rich listings ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .8rem; border: 1px solid var(--border); border-radius: 4px; padding: 3px 9px; color: var(--text); background: #f8f9fb; white-space: nowrap; }
.three:has(> :nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form label small { font-weight: 400; font-size: .76rem; }
.por { font-size: .92em; color: var(--navy-2); font-weight: 700; }
.price.xl .por { font-size: 1.4rem; }
/* "+ VAT" / "incl. VAT" next to a price */
.vat { font-size: .72em; font-weight: 600; color: var(--muted); white-space: nowrap; }
/* Radio choices in forms (price or price on request, VAT) */
fieldset.choice { border: 1px solid var(--border-2); border-radius: var(--radius); padding: 10px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
fieldset.choice legend { font-weight: 600; font-size: .88rem; padding: 0 4px; }
label.radio { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
label.radio input { width: auto; margin: 0; accent-color: var(--navy); }
[data-price-fields][hidden] { display: none; }
/* Admin > Automatic emails: fields for the email service that isn't chosen */
[data-when][hidden] { display: none; }
.logo-box.has-img { background: #fff; border: 1px solid var(--border); overflow: hidden; padding: 0; }
.logo-box.has-img img { width: 100%; height: 100%; object-fit: contain; }
.sbody .logo-box.has-img { border: 3px solid #fff; box-shadow: 0 0 0 1px var(--border); }

.gallery { display: flex; flex-direction: column; gap: 10px; }
.gallery-strip { display: flex; gap: 8px; overflow-x: auto; }
.g-pick { flex: none; width: 72px; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: none; cursor: pointer; }
.g-pick img { width: 100%; height: 100%; object-fit: cover; }
.g-pick.active { border-color: var(--navy); }

.biz-details { padding: 20px; margin: 0 0 8px; }
.biz-details h3 { margin-bottom: 14px; }
.biz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px 28px; }
.biz-grid h4 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .9rem; margin: 0 0 8px; }
.biz-grid p { margin: 0; }
.hours-table { border-collapse: collapse; font-size: .86rem; width: 100%; }
.hours-table th { text-align: start; font-weight: 500; color: var(--muted); padding: 3px 12px 3px 0; }
.hours-table td { padding: 3px 0; }
.hours-table tr.today th, .hours-table tr.today td { color: var(--text); font-weight: 700; }

.img-field { display: flex; gap: 14px; align-items: center; }
.img-prev { flex: none; width: 88px; height: 88px; border: 1px dashed #c9d0d8; border-radius: var(--radius); display: grid; place-items: center; color: var(--muted); overflow: hidden; background: #f8f9fb; }
.img-prev.wide { width: 176px; }
.img-prev img { width: 100%; height: 100%; object-fit: cover; }
.img-prev.square img { object-fit: contain; }
.img-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.gallery-edit { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin-top: -8px; }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-thumbs:empty { display: none; }
.g-thumb { position: relative; width: 80px; aspect-ratio: 1; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-thumb button { position: absolute; top: 4px; inset-inline-end: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(10,20,35,.75); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
/* The first photo is the main one: it gets the "Main" tag, the others a star to make them main. */
.g-thumb .g-make-main { inset-inline-end: auto; inset-inline-start: 4px; }
.g-main { display: none; position: absolute; inset-inline: 0; bottom: 0; padding: 2px 0; background: rgba(10,20,35,.75); color: #fff; font-size: 11px; font-weight: 600; text-align: center; }
.g-thumb:first-child { border: 2px solid var(--accent); }
.g-thumb:first-child .g-main { display: block; }
.g-thumb:first-child .g-make-main { display: none; }
.gallery-thumbs:not(:empty) + .g-empty { display: none; }
.gallery-edit .muted.small { margin: 0; }
.file-btn { position: relative; }
.variants-edit { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-top: -8px; }
.v-rows { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.v-rows:empty { display: none; }
.v-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; width: 100%; }
.hours-edit { display: flex; flex-direction: column; gap: 6px; margin-top: -8px; }
.h-row { display: grid; grid-template-columns: 140px auto auto auto; gap: 8px; align-items: center; justify-content: start; }
.h-row input[type=time] { width: auto; padding: 6px 8px; }
.h-row input[type=time]:disabled { opacity: .45; }
@media (max-width: 600px) {
  .v-row { grid-template-columns: 1fr auto; }
  .v-row .v-values { grid-column: 1; }
  .h-row { grid-template-columns: 1fr auto auto auto; }
  .three:has(> :nth-child(4)) { grid-template-columns: 1fr 1fr; }
}

/* ---------- bulk upload ---------- */
.import-box { max-width: 860px; }
.import-help summary { cursor: pointer; font-weight: 500; font-size: .88rem; }
.import-help ul { padding-inline-start: 18px; margin: 6px 0 0; }
.import-help code, .import-box code { background: #f1f3f6; padding: 1px 5px; border-radius: 4px; font-size: .78rem; }
.import-preview { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.import-preview h3 { margin: 0; }
tr.bad-row td { background: #fdf3f2; }
.err-text { color: var(--danger); }

/* ---------- buyer requests (RFQ) ---------- */
.grid.rfqs { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.rfq-card { padding: 16px; display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.rfq-card:hover { color: var(--text); border-color: var(--navy); }
.rfq-card h3 { margin: 0; font-size: 1.02rem; }
.rfq-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rfq-no { font-weight: 700; color: var(--muted); font-size: .8rem; }
.rfq-qty { font-weight: 700; color: var(--navy-2); }
.rfq-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border-2); }
.rfq-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--surface);
  border: 1px solid var(--border); border-inline-start: 4px solid var(--accent); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 16px; }
.rfq-cta h2 { margin-bottom: 4px; }
.rfq-cta p { margin: 0; color: var(--muted); max-width: 620px; }
.quote-list { display: flex; flex-direction: column; gap: 12px; }
.quote { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.quote-head { display: flex; align-items: flex-start; gap: 12px; }
.quote-price { text-align: end; font-weight: 800; font-size: 1.15rem; display: flex; flex-direction: column; gap: 2px; }
.quote-price small { font-weight: 500; font-size: .76rem; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.quote .desc { margin: 0; }
.buyer-box { padding: 16px 18px; margin-bottom: 14px; border-inline-start: 4px solid var(--green); }
.buyer-box h3 { margin-bottom: 4px; }
.notice.ok-notice { background: #e6f4ed; border-color: #bfe3d0; color: var(--green); }
.notice.ok-notice b { color: var(--text); }
.dash-rfq { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 20px; border-inline-start: 4px solid var(--accent); }
.dash-rfq b { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- ratings & reviews ---------- */
.star { fill: #d5dbe3; flex: none; }
.star.on { fill: var(--accent); }
.stars { display: inline-flex; gap: 1px; vertical-align: -3px; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: .84rem; color: var(--text); }
.rating-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rating-summary .star { width: 22px; height: 22px; }
.rating-summary strong { font-size: 1.5rem; }
.review-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.review { padding: 14px 16px; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.review p { margin: 0 0 8px; white-space: pre-line; }
.review-reply { margin-top: 10px; padding: 10px 12px; background: #f6f8fb; border-inline-start: 3px solid var(--navy); border-radius: 4px; font-size: .9rem; }
.review-reply p { margin: 4px 0 0; }
.reply-form { margin-top: 12px; padding: 0; gap: 8px; display: flex; flex-direction: column; }
.star-input { border: 0; padding: 0; margin: 0; }
.star-input legend { font-weight: 500; font-size: .86rem; padding: 0; margin-bottom: 6px; }
/* Inputs are in 5→1 order; row-reverse shows 1→5 in reading order in both English and Arabic. */
.star-row { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-row input { position: absolute; opacity: 0; pointer-events: none; }
.star-row label { cursor: pointer; display: inline-flex; }
.star-row label .star { width: 32px; height: 32px; transition: transform .1s; }
.star-row label:hover .star, .star-row label:hover ~ label .star, .star-row input:checked ~ label .star { fill: var(--accent); }
.star-row input:focus-visible + label .star { outline: 2px solid var(--navy); border-radius: 4px; }
.btn .star { width: 14px; height: 14px; }

/* ---------- saved items, recently viewed, sharing ---------- */
.plink { display: flex; flex-direction: column; flex: 1; color: var(--text); }
.plink:hover { color: var(--text); }
.fav-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; color: var(--muted); cursor: pointer; padding: 0; flex: none; transition: color .15s, transform .15s; }
.fav-btn:hover { color: #d9304f; }
.fav-btn.on { color: #d9304f; border-color: #f3c1cb; }
.fav-btn:active { transform: scale(.9); }
.card.product > .fav-btn, .card.seller > .fav-btn { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 3; box-shadow: 0 1px 4px rgba(0,0,0,.15); border: 0; }
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.title-row h1, .title-row h3 { margin-bottom: 0; }
.share-row { margin: 14px 0 4px; }
.saved-link { position: relative; }
.saved-link .ico { width: 20px; height: 20px; }
.fav-count { position: absolute; top: -6px; inset-inline-end: -10px; background: #d9304f; color: #fff; font-size: .68rem; font-weight: 700;
  border-radius: 99px; padding: 0 6px; line-height: 16px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--navy-2); }
.page-title .ico { color: #d9304f; vertical-align: -2px; }

/* ---------- maps ---------- */
.map-view { height: 560px; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; background: #e8ecef; z-index: 0; }
.map-box { height: 320px; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; background: #e8ecef; margin-top: -8px; z-index: 0; }
.mini-map { height: 170px; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; margin-top: 14px; background: #e8ecef; z-index: 0; }
.directions { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; }
.map-pin span { display: block; width: 22px; height: 22px; margin: 1px 2px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--navy); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.map-pin.verified span { background: var(--accent); }
.map-pop { display: flex; flex-direction: column; gap: 4px; min-width: 180px; font-family: Inter, "IBM Plex Sans Arabic", sans-serif; }
.map-pop .btn { align-self: flex-start; margin-top: 4px; color: #fff; }
.map-pop .verified { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; }
.leaflet-container a.btn.wa { color: #fff; }
.seg.compact { margin: 0; }
.seg.compact a { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; }
.distance { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; font-weight: 600; color: var(--navy-2); }
@media (max-width: 600px) { .map-view { height: 440px; } }

/* ---------- legal & contact pages ---------- */
.legal h2 { font-size: 1.1rem; margin-top: 26px; }
.legal p, .legal li { color: var(--text); }
.consent { align-items: flex-start; font-size: .88rem; }
.consent input { margin-top: 4px; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; max-width: 1040px; }
.contact-details { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.contact-details h3 { margin: 0; }
.contact-details p { margin: 0; }
.contact-details > div { display: flex; gap: 10px; align-items: flex-start; }
.contact-details > div > .ico { margin-top: 3px; color: var(--muted); }
.contact-details span { display: block; font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }

/* ---------- category management ---------- */
.cat-thumb { width: 48px; height: 36px; object-fit: cover; border-radius: 4px; flex: none; background: #eef0f3; }
.cat-preview { width: 240px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.admin tr.is-hidden td { opacity: .6; }
.admin code { background: #f1f3f6; padding: 1px 6px; border-radius: 4px; font-size: .8rem; }
.adm-table .btn[disabled] { opacity: .35; cursor: default; }

@media (max-width: 1100px) {
  .adm-grid { grid-template-columns: 1fr; }
  .ticket-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .msg { max-width: 100%; }
}
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .adm-side { position: static; height: auto; }
  .adm-side-head { display: none; }
  .adm-nav { flex-direction: row; overflow-x: auto; padding: 8px; }
  .adm-nav a.active { box-shadow: inset 0 -3px 0 var(--accent); }
  .adm-side-foot { padding: 0 8px 8px; border: 0; }
  .adm-main { padding: 16px 16px 40px; }
  .dash-stats.four { grid-template-columns: 1fr 1fr; }
}

/* ---------- phone-only pieces of the app layout, hidden on computers ---------- */
.back-btn, .lang-mini, .filter-btn, .sheet-backdrop, .sheet-close, .lbl-short, .chip-rail, .cat-all { display: none; }
.sheet-head { display: block; }
.stack .contact-actions { display: contents; }

/* ==================== Phones and the app: app-style layout ====================
   Everything below only applies on phone-sized screens; the computer layout above stays as it is. */
@media (max-width: 760px) {
  :root {
    --bg: #f3f2ef; --text: #16202e; --muted: #667181; --border: #e3e0da; --border-2: #eeebe6; --radius: 10px;
    --accent-soft: #fbf1df; --shadow-1: 0 1px 2px rgba(22, 32, 46, .06);
  }
  body { font-family: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif; }
  a, button, label, summary { -webkit-tap-highlight-color: transparent; }
  input, select, textarea { font-size: 16px; } /* stops iPhones zooming in while typing */
  .form h3, .check-groups legend, table.list th, .stats-h, .hero-stats span { text-transform: none; letter-spacing: 0; }

  /* Top bar: logo (or back arrow), language, saved, and a rounded search, like a shopping app. */
  .utility, .catnav, .crumbs { display: none; }
  .header { position: sticky; top: 0; border-bottom: 0; box-shadow: 0 1px 0 rgba(22, 32, 46, .07); padding-top: env(safe-area-inset-top, 0px); }
  .header-inner { flex-wrap: wrap; gap: 10px; min-height: 0; padding-top: 10px; padding-bottom: 10px; }
  .brand { gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-word { font-size: 16px; }
  .header-nav { gap: 4px; }
  .header-nav .btn, .header-nav .navlink:not(.saved-link):not(.lang-mini) { display: none; }
  .header-nav .navlink { width: 38px; height: 38px; justify-content: center; border-radius: 50%; }
  .lang-mini { display: flex; font-weight: 700; font-size: .86rem; color: var(--navy); background: var(--bg); }
  .lang-mini[lang="ar"] { font-family: "IBM Plex Sans Arabic", sans-serif; font-size: 1.05rem; }
  .header-search { order: 3; flex-basis: 100%; border: 0; border-radius: 12px; background: #f1efeb; }
  .header-search input { background: transparent; padding: 11px 10px 11px 2px; font-size: 15px; }
  .header-search button { order: -1; background: transparent; color: var(--muted); padding: 0 6px 0 12px; }
  [dir="rtl"] .header-search button { padding: 0 12px 0 6px; }
  .header-search button:hover { background: transparent; }
  .back-btn { place-items: center; width: 36px; height: 36px; margin-inline-start: -8px; border: 0; background: none; color: var(--navy); border-radius: 50%; cursor: pointer; padding: 0; }
  [dir="rtl"] .back-btn svg { transform: scaleX(-1); }
  body.sub-page .back-btn { display: grid; }
  body.sub-page .brand-word { display: none; }
  body.sub-page .header-search { order: 0; flex: 1 1 0; min-width: 0; }

  /* Page rhythm and cards */
  .wrap { padding: 0 14px; }
  .section { padding-top: 22px; }
  .section-head { margin-bottom: 10px; align-items: center; }
  .section-head h2, .page-title { font-size: 1.12rem; font-weight: 600; }
  .page-title { margin-bottom: 12px; }
  .more { font-size: .84rem; }
  .card { border-color: transparent; border-radius: 14px; box-shadow: var(--shadow-1); }

  /* Home: the same warehouse photo, as a compact rounded card */
  .hero { margin: 12px 14px 0; border-radius: 16px; overflow: hidden; }
  .hero-inner { padding: 22px 18px 18px; }
  .eyebrow, .hero .lead { display: none; }
  .hero h1 { font-size: 1.42rem; line-height: 1.25; margin-bottom: 14px; }
  .hero-cta { gap: 8px; flex-wrap: nowrap; }
  .hero-cta .btn { flex: 1; padding: 11px 10px; font-size: .86rem; }
  .hero-stats { margin-top: 16px; padding-top: 12px; gap: 8px; flex-wrap: nowrap; justify-content: space-between; }
  .hero-stats strong { font-size: 1.08rem; }
  .hero-stats span { font-size: .7rem; }
  .trust, .home-steps { display: none; }

  /* Home categories: two swipeable rows of rounded photos */
  .home-cats .cats { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-template-rows: repeat(2, auto); grid-auto-columns: 72px; gap: 14px 10px;
    overflow-x: auto; margin-inline: -14px; padding: 2px 14px 4px; scrollbar-width: none; }
  .home-cats .cats::-webkit-scrollbar { display: none; }
  .home-cats .cat, .cat-group .cat { aspect-ratio: auto; background: none; border-radius: 0; overflow: visible; display: flex; flex-direction: column; align-items: center; text-align: center; }
  .home-cats .cat img, .cat-all-ico { width: 62px; height: 62px; border-radius: 18px; object-fit: cover; flex: none; }
  .home-cats .cat:hover img, .cat-group .cat:hover img { transform: none; }
  .home-cats .cat-label, .cat-group .cat-label { position: static; padding: 6px 0 0; background: none; color: var(--text); }
  .home-cats .cat-label span { font-size: .72rem; font-weight: 500; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .home-cats .cat-label small { display: none; }
  .cat-all { display: flex; }
  .cat-all-ico { display: grid; place-items: center; background: #e6ebf3; color: var(--navy); }
  /* All-categories page: three per row, name under the photo */
  .cat-group .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
  .cat-group .cat img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 14px; object-fit: cover; }
  .cat-group .cat-label span { font-size: .78rem; font-weight: 500; line-height: 1.25; }
  .cat-group .cat-label small { color: var(--muted); font-size: .7rem; }
  .group-jump { flex-wrap: nowrap; overflow-x: auto; margin-inline: -14px; padding: 0 14px 2px; scrollbar-width: none; }
  .group-jump a { flex: none; }

  /* Swipeable rows (products, suppliers, requests, guides) */
  .rail .grid { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -14px; padding: 2px 14px 10px;
    scroll-padding-inline: 14px; scrollbar-width: none; }
  .rail .grid::-webkit-scrollbar { display: none; }
  .rail .grid > *, .rail .grid .sk-wrap > * { flex: 0 0 43%; scroll-snap-align: start; }
  .rail .grid.sellers > * { flex-basis: 84%; }
  .rail .grid.rfqs > *, .rail .grid.guides > * { flex-basis: 80%; }

  /* Product cards */
  .grid.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card.product { border: 0; }
  .card.product .photo { margin: 6px 6px 0; border-radius: 10px; }
  .pbody { padding: 8px 10px 10px; gap: 2px; }
  .pname { font-size: .84rem; line-height: 1.3; min-height: 2.6em; }
  .price { font-size: .98rem; margin-top: 4px; }
  .moq { font-size: .72rem; }
  .pseller { font-size: .72rem; padding-top: 6px; margin-top: auto; border-top: 0; }
  .pseller .muted { display: none; }
  .card.product > .fav-btn { width: 30px; height: 30px; top: 12px; inset-inline-end: 12px; }
  .feat-tag { top: 12px; inset-inline-start: 12px; font-size: .66rem; }
  .card.product:active, .card.seller:active { transform: scale(.98); }

  /* Supplier cards: initials badge next to the name, like a contact */
  .card.seller { border: 0; }
  .card.seller .cover, .card.seller > .feat-tag { display: none; }
  .card.seller .sbody { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 12px; row-gap: 6px; padding: 14px; }
  .card.seller .sbody > * { grid-column: 1 / -1; }
  .card.seller .sbody > .logo-box { grid-column: 1; grid-row: 1 / span 2; margin-top: 0; border: 0; box-shadow: none; align-self: center; }
  .card.seller .sbody > .sname { grid-column: 2; grid-row: 1; align-self: end; line-height: 1.3; padding-inline-end: 34px; }
  .card.seller .sbody > .smeta { grid-column: 2; grid-row: 2; align-self: start; font-size: .78rem; }
  .card.seller > .fav-btn { top: 12px; inset-inline-end: 12px; }
  .scats { font-size: .8rem; }
  .sfoot .row { flex: 1; }
  .sfoot .row .btn { flex: 1; }
  .logo-box { border-radius: 14px; }
  /* six calm colours for initials (avatarTone in app.js) */
  .logo-box.tone-0 { background: #14294c; }
  .logo-box.tone-1 { background: #0f5a5e; }
  .logo-box.tone-2 { background: #5a2d55; }
  .logo-box.tone-3 { background: #8f3d14; }
  .logo-box.tone-4 { background: #4a5a18; }
  .logo-box.tone-5 { background: #334155; }

  /* Emirates: one swipeable row of chips */
  .emirates { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; margin-inline: -14px; padding: 2px 14px 4px; scrollbar-width: none; }
  .emirates::-webkit-scrollbar { display: none; }
  .emirates a { flex: none; flex-direction: row; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 999px; border-top: 1px solid var(--border); }
  .emirates span { font-size: .74rem; }

  /* Cards with an action */
  .rfq-cta { padding: 16px; gap: 12px; border: 1px solid #f1dfbd; border-radius: 14px; background: var(--accent-soft); }
  .rfq-cta h2 { font-size: 1rem; }
  .rfq-cta p { font-size: .86rem; }
  .rfq-cta > .row { width: 100%; flex-wrap: nowrap; }
  .rfq-cta > .row .btn { flex: 1; padding: 11px 10px; font-size: .86rem; }
  .cta { border-radius: 16px; }
  .cta-inner { padding: 24px 18px; }
  .cta-inner h2 { font-size: 1.15rem; }
  .cta-inner .btn { width: 100%; }

  /* Product lists: category chips + a Filters button that opens a panel from the bottom */
  .page-banner .wrap { padding-top: 20px; padding-bottom: 18px; }
  .page-banner h1 { font-size: 1.3rem; }
  .chip-rail { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 14px -14px 12px; padding: 2px 14px; }
  .chip-rail::-webkit-scrollbar { display: none; }
  .chip-rail a { flex: none; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--text); font-size: .86rem; font-weight: 500; white-space: nowrap; }
  .chip-rail a.active { background: var(--navy); border-color: var(--navy); color: #fff; }
  .results-bar { margin-bottom: 10px; font-size: .82rem; }
  .filter-btn { display: inline-flex; }
  .sort > span { display: none; }
  .sort select { padding: 7px 10px; font-size: 14px; border-radius: 999px; }
  .filters { position: fixed; inset: auto 0 0 0; z-index: 60; margin: 0; border: 0; border-radius: 20px 20px 0 0; max-height: 86vh; overflow-y: auto;
    padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -12px 40px rgba(10, 20, 35, .25);
    transform: translateY(105%); visibility: hidden; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s .3s; }
  body.sheet-open .filters { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
  .sheet-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--border-2); }
  .filters .sheet-head h3 { margin: 0; padding: 0; border: 0; }
  .filters .row .btn { flex: 1; padding: 12px; }
  .sheet-close { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg); color: var(--text); cursor: pointer; padding: 0; }
  .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(10, 20, 35, .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.sheet-open .sheet-backdrop { opacity: 1; pointer-events: auto; }
  body.sheet-open { overflow: hidden; }
  body.sheet-open .island { transform: translate(-50%, calc(100% + 30px)); opacity: 0; pointer-events: none; }
  .bar { padding: 0; background: none; border: 0; gap: 8px; }
  .bar input { flex: 1 1 100%; }
  .bar select { flex: 1 1 40%; }
  .bar .btn { flex: 1 1 100%; }
  .pager { margin-top: 18px; }

  /* Product page: photo edge to edge, contact bar fixed at the bottom */
  body.detail-page .section:first-child { padding-top: 0; }
  .pdetail { margin-top: 0; gap: 14px; }
  .pdetail > .photo.big, .pdetail > .gallery { margin-inline: -14px; }
  .pdetail .photo.big { border-radius: 0; border: 0; aspect-ratio: 1 / 1; }
  .gallery-strip { padding-inline: 14px; }
  .pinfo h1 { font-size: 1.22rem; font-weight: 600; }
  .price-box { margin: 10px 0 14px; padding: 12px 14px; border-radius: 12px; background: #fff; }
  .price.xl { font-size: 1.5rem; }
  .sellerbox { margin: 16px 0 10px; border: 0; box-shadow: var(--shadow-1); border-radius: 14px; }
  body.detail-page .contact-actions { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; margin: 0; display: flex; flex-direction: row; flex-wrap: nowrap; gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 -1px 0 var(--border-2), 0 -10px 30px rgba(10, 20, 35, .08); }
  body.detail-page .contact-actions .btn { flex: 1 1 0; width: auto; min-width: 0; padding: 12px 6px; font-size: .86rem; border-radius: 12px; }
  body.detail-page .contact-actions .btn.wa { flex-grow: 1.35; }
  body.detail-page .contact-actions a[href^="mailto:"] { display: none; }
  body.detail-page .contact-actions .lbl-long { display: none; }
  body.detail-page .contact-actions .lbl-short { display: inline; }
  body.detail-page .island { display: none; }
  body.detail-page .footer { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }

  /* Supplier page */
  .profile-cover { height: 120px; }
  .profile { margin-top: -40px; padding: 16px; border-radius: 16px; }
  .profile h1 { font-size: 1.22rem; }
  .profile .logo-box.xl { width: 68px; height: 68px; font-size: 1.35rem; border-radius: 18px; }
  .biz-details { border-radius: 14px; }

  /* Footer: small links instead of the big navy block (the island does the navigation) */
  .footer { margin-top: 28px; background: transparent; color: var(--muted); font-size: .8rem; }
  .footer-grid { display: none; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 6px; border-top: 1px solid var(--border); padding-top: 16px; }
  .footer-bottom a { color: var(--muted); }
  .footer-bottom .lang-btn { color: var(--text); border-color: var(--border); }
  body:not(.in-admin) .footer { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- search suggestions (js/suggest.js): the list under a search box while typing ---------- */
.suggest { position: fixed; z-index: 70; margin: 0; padding: 6px 0; list-style: none; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 14px 34px rgba(15, 30, 50, .16); max-height: min(380px, 60vh); overflow-y: auto; }
.suggest li { display: flex; align-items: center; gap: 10px; padding: 9px 14px; cursor: pointer; font-size: .92rem; color: var(--text); }
.suggest li .ico { color: #8a95a3; }
.suggest li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.suggest li b { font-weight: 700; color: var(--navy); }
.suggest li small { flex: none; color: var(--muted); font-size: .74rem; background: #f1f3f6; border-radius: 4px; padding: 1px 6px; }
.suggest li.on, .suggest li:hover { background: #f1f4f9; }
/* A category chosen automatically from the product name flashes gold for a moment. */
select.auto-picked { animation: auto-picked 1.6s ease-out; }
@keyframes auto-picked { 0%, 35% { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(228, 160, 60, .35); } 100% { box-shadow: 0 0 0 3px rgba(228, 160, 60, 0); } }
