/* ==========================================================
   FoodBridge — Demo UI (v2)
   Typography & màu theo Freightos: Open Sans, 3 cỡ chữ (48 / 24 / 16)
   Layout tham khảo TradeWheel (tinh giản), full width + padding ngang
   ========================================================== */

:root {
  --navy: #012d6f;
  --blue: #1244b9;
  --blue-50: #eef2ff;
  --teal: #36dfd4;
  --teal-600: #22c7bc;
  --teal-text: #0a8a82;
  --lavender: #b9a4ff;
  --bg: #f7f9fd;
  --bg-2: #eef2fb;
  --border: #e4e6f0;
  --muted: #6b7a8f;
  --body: #33475b;
  --success: #12a46b;
  --warning: #c27a00;
  --danger: #d6455d;

  /* Chỉ 3 cỡ chữ */
  --fs-1: 48px;
  --fs-2: 24px;
  --fs-3: 16px;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 18px rgba(1, 45, 111, .08);
  --shadow-lg: 0 16px 40px rgba(1, 45, 111, .16);
  --pad-x: clamp(16px, 4vw, 64px);
  --font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-3);
  font-weight: 400;
  line-height: 1.625;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); }
h1, h2, h3, h4, h5 { color: var(--navy); margin: 0 0 .4em; line-height: 1.25; }
h1 { font-size: var(--fs-1); font-weight: 700; letter-spacing: -.01em; }
h2, h3 { font-size: var(--fs-2); font-weight: 600; }
h4, h5 { font-size: var(--fs-3); font-weight: 700; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { width: 100%; max-width: 1920px; margin: 0 auto; padding: 0 var(--pad-x); }
.muted, .small { color: var(--muted); }
.strong { font-weight: 700; color: var(--navy); }
.hidden { display: none !important; }
.ok-text { color: var(--blue); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.v-tick { color: var(--blue); margin-left: 6px; flex-shrink: 0; }
.warn-text { color: var(--warning); font-weight: 600; }
.sep { color: var(--border); margin: 0 6px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: 6px; border: 1px solid transparent;
  font-weight: 600; font-size: var(--fs-3); line-height: 1.4; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap; text-align: center;
}
.btn-teal { background: var(--teal); color: var(--navy); }
.btn-teal:hover { background: var(--teal-600); color: var(--navy); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--navy); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--blue); color: #fff; }
.btn-outline { background: #fff; color: var(--navy); border-color: #c9d2e6; }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost-white { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost-white:hover { background: #fff; color: var(--navy); }
.btn-sm { padding: 7px 16px; }
.btn-lg { padding: 13px 28px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; cursor: pointer; }
.link-arrow { font-weight: 600; color: var(--navy); }
.link-arrow::after { content: " →"; color: var(--teal-600); }
.link-arrow:hover { color: var(--blue); }

/* Text tabs (thay cho chip/badge) */
.text-tabs { display: flex; gap: 24px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.text-tab { background: none; border: 0; padding: 10px 0; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px; }
.text-tab:hover { color: var(--navy); }
.text-tab.active { color: var(--navy); border-bottom-color: var(--teal); }

.flag { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; display: inline-block; box-shadow: 0 0 0 1px rgba(0,0,0,.06); vertical-align: -1px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: rgba(255,255,255,.85); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: var(--teal); }
.topbar-left { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-left .demo-txt { color: var(--teal); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.lang-switch { display: flex; gap: 14px; }
.lang-switch button { border: 0; background: transparent; color: rgba(255,255,255,.6); padding: 0; cursor: pointer; font-weight: 600; }
.lang-switch button:hover { color: #fff; }
.lang-switch button.active { color: #fff; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--teal); text-decoration-thickness: 2px; }

/* ---------- Header ---------- */
.header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-main { display: flex; align-items: center; gap: 32px; min-height: 80px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--navy); font-weight: 700; font-size: var(--fs-2); flex-shrink: 0; letter-spacing: -.01em; }
.logo:hover { color: var(--navy); }
.logo-mark { width: 34px; height: 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.logo-mark span { border-radius: 3px; background: var(--blue); }
.logo-mark span:nth-child(2) { background: var(--teal); }
.logo-mark span:nth-child(3) { background: var(--navy); }
.logo-mark span:nth-child(4) { background: var(--blue); opacity: .45; }
.search-bar { flex: 1; display: flex; align-items: stretch; border: 2px solid var(--blue); border-radius: 8px; overflow: hidden; background: #fff; max-width: 900px; }
.search-bar select { border: 0; background: var(--bg); padding: 0 14px; font-weight: 600; color: var(--navy); border-right: 1px solid var(--border); outline: none; cursor: pointer; }
.search-bar input { flex: 1; border: 0; padding: 12px 16px; outline: none; min-width: 0; }
.search-bar button { border: 0; background: var(--blue); color: #fff; font-weight: 600; padding: 0 28px; cursor: pointer; }
.search-bar button:hover { background: var(--navy); }
.search-bar button .bi { display: none; }
.header-actions { display: flex; align-items: center; gap: 24px; flex-shrink: 0; margin-left: auto; }
.header-actions a:not(.btn) { color: var(--navy); font-weight: 600; }
.header-actions a:not(.btn):hover { color: var(--blue); }
.menu-toggle { display: none; border: 0; background: transparent; font-size: var(--fs-2); color: var(--navy); cursor: pointer; padding: 4px; line-height: 1; }

.navbar { border-top: 1px solid var(--border); }
.navbar .container { display: flex; align-items: center; gap: 4px; min-height: 52px; }
.nav-cat-btn { display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; border: 0; font-weight: 600; padding: 0 22px; height: 52px; cursor: pointer; margin-right: 12px; }
.nav-cat-btn::after { content: "▾"; }
.nav-link { padding: 13px 16px; color: var(--navy); font-weight: 400; border-bottom: 3px solid transparent; }
.nav-link:hover { color: var(--blue); }
.nav-link.active { color: var(--blue); font-weight: 600; border-bottom-color: var(--teal); }
.nav-spacer { flex: 1; }
.nav-cta { font-weight: 600; color: var(--blue); }

.nav-cat { position: relative; }
.mega { position: absolute; left: 0; top: 100%; width: 600px; background: #fff; border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-lg); padding: 24px; display: none; grid-template-columns: 1fr 1fr; gap: 24px; z-index: 60; }
.nav-cat:hover .mega, .nav-cat.open .mega { display: grid; }
.mega h5 { color: var(--muted); margin-bottom: 8px; }
.mega a { display: block; padding: 5px 0; color: var(--navy); }
.mega a:hover { color: var(--blue); }

/* Mobile drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(1,45,111,.45); z-index: 90; display: none; }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 86vw; background: #fff; z-index: 91; transform: translateX(-100%); transition: transform .25s; overflow-y: auto; padding: 20px; }
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-backdrop { display: block; }
.drawer a { display: block; padding: 12px 4px; color: var(--navy); font-weight: 600; border-bottom: 1px solid var(--border); }
.drawer .logo { border: 0; margin-bottom: 8px; }
.drawer .lang-switch { margin: 12px 0; }
.drawer .lang-switch button { color: var(--muted); }
.drawer .lang-switch button.active { color: var(--navy); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-sm { padding: 40px 0; }
.section-white { background: #fff; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 720px; }
.eyebrow { display: block; font-weight: 600; color: var(--blue); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card-pad { padding: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.panel-head h3 { margin: 0; font-size: var(--fs-3); font-weight: 700; }
.panel-head a { font-weight: 600; }

/* ---------- Home hero ---------- */
.home-hero { padding: 28px 0 8px; }
.hero-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; }
.cat-side { padding: 10px 0; }
.cat-side h5 { color: var(--muted); padding: 10px 22px 2px; margin: 0; }
.cat-side a { display: flex; justify-content: space-between; padding: 6px 22px; color: var(--navy); }
.cat-side a:hover { background: var(--bg); color: var(--blue); }
.cat-side a .count { color: var(--muted); }
.cat-side .all { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; font-weight: 600; color: var(--blue); }

.hero-banner {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; color: #fff; min-height: 460px;
  background: linear-gradient(180deg, var(--blue) 0%, #3d5fd4 45%, #8e7cf0 85%, var(--lavender) 100%);
  display: flex; flex-direction: column; justify-content: center; padding: 48px 56px;
}
.hero-banner::before { content: ""; position: absolute; inset: 0; background: url("https://images.unsplash.com/photo-1494412519320-aa613dfb7738?auto=format&fit=crop&w=1600&q=70") center/cover; opacity: .16; mix-blend-mode: luminosity; }
.hero-arc { position: absolute; right: -80px; top: -80px; width: 340px; height: 340px; border-radius: 50%; border: 2px dashed rgba(54,223,212,.6); }
.hero-arc.two { right: auto; left: -120px; top: auto; bottom: -160px; width: 300px; height: 300px; border: 2px solid rgba(255,255,255,.25); }
.hero-banner > *:not(.hero-arc) { position: relative; }
/* Video nền hero (render bằng Remotion, hình ảnh dồn sang nửa phải) */
.hero-banner.has-video::before { display: none; }
.hero-banner > .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.hero-banner > .hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,68,185,.92) 0%, rgba(18,68,185,.7) 38%, rgba(18,68,185,0) 62%); }
.hero-banner .eyebrow { color: var(--teal); }
.hero-banner h1 { color: #fff; max-width: min(820px, 54%); }
.hero-banner p { color: rgba(255,255,255,.92); max-width: min(640px, 52%); margin-bottom: 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 48px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: var(--fs-2); font-weight: 700; color: #fff; line-height: 1.2; }
.hero-stats span { color: rgba(255,255,255,.85); }

/* Lists */
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.three-col > *, .product-grid > *, .dash > *, .listing > *, .pd-grid > *, .co-layout > *, .prov-grid > *, .role-grid > *, .hero-grid > *, .cat-block > * { min-width: 0; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--border); color: var(--body); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--bg); color: var(--body); }
.list-row .thumb { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--bg-2); }
.list-row .info { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; color: var(--navy); display: block; }
.list-row .sub { color: var(--muted); display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.list-row .time { color: var(--muted); flex-shrink: 0; }

/* Role cards: ảnh thay icon */
.role-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.role-card { border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; }
.role-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.role-card .body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.role-card h3 { margin-bottom: 8px; }
.role-card p { color: var(--muted); }
.role-card ul { margin: 0 0 18px; padding-left: 18px; flex: 1; }
.role-card li { padding: 2px 0; }
.role-card li::marker { color: var(--teal-600); }

/* Category blocks */
.cat-block { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; margin-bottom: 48px; }
.cat-feature { border-radius: var(--radius-lg); overflow: hidden; position: relative; min-height: 420px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; }
.cat-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(1,45,111,0) 25%, rgba(1,45,111,.94) 100%); }
.cat-feature > *:not(img) { position: relative; z-index: 1; }
.cat-feature h3 { color: #fff; }
.cat-feature p { color: rgba(255,255,255,.9); }
.cat-feature .subs { margin-bottom: 18px; line-height: 1.9; }
.cat-feature .subs a { color: #fff; border-bottom: 1px solid rgba(255,255,255,.4); margin-right: 14px; display: inline-block; }
.cat-feature .subs a:hover { color: var(--teal); border-color: var(--teal); }
.cat-block .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.block-title { font-size: var(--fs-3); font-weight: 700; color: var(--navy); margin: 0 0 14px; }

/* Product card */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.p-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; color: var(--body); transition: box-shadow .2s; }
.p-card:hover { box-shadow: var(--shadow); color: var(--body); }
.p-card .img { aspect-ratio: 4/3; background: var(--bg-2); overflow: hidden; }
.p-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.p-card:hover .img img { transform: scale(1.04); }
.p-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; gap: 4px; }
.p-card .name { font-weight: 700; color: var(--navy); }
.p-card .price { font-weight: 700; color: var(--blue); }
.p-card .price span { color: var(--muted); font-weight: 400; }
.p-card .meta { color: var(--muted); }
.p-card .seller { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: auto; min-width: 0; }
.p-card .seller .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Supplier card */
.s-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; display: flex; gap: 14px; align-items: flex-start; color: var(--body); transition: box-shadow .2s; }
.s-card:hover { box-shadow: var(--shadow); color: var(--body); }
.logo-box { width: 52px; height: 52px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 700; flex-shrink: 0; }
.s-card .name { font-weight: 700; color: var(--navy); display: block; }
.s-card .sub { color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Provider card */
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.prov-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s; }
.prov-card:hover { box-shadow: var(--shadow); }
.prov-card .cover { height: 160px; position: relative; }
.prov-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.prov-card .cover .logo-box { position: absolute; left: 20px; bottom: -26px; border: 3px solid #fff; }
.prov-card .body { padding: 38px 20px 20px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.prov-card .name { font-weight: 700; color: var(--navy); }
.prov-card .desc { color: var(--muted); margin: 4px 0; }
.prov-card .foot { display: flex; gap: 10px; margin-top: auto; padding-top: 14px; }
.prov-card .foot .btn { flex: 1; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.step { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.step .num { font-size: var(--fs-2); font-weight: 700; color: var(--teal-600); margin-bottom: 10px; display: block; line-height: 1; }
.step p { color: var(--muted); margin: 0; }

/* Countries */
.country-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.country-card { border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--border); padding: 24px; display: flex; gap: 18px; align-items: center; color: var(--body); }
.country-card:hover { box-shadow: var(--shadow); color: var(--body); }
.country-card .big-flag { width: 60px; height: 42px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.06); flex-shrink: 0; }
.country-card p { margin: 0; color: var(--muted); }

/* CTA band */
.cta-band { background: var(--navy); color: #fff; border-radius: var(--radius-lg); padding: 48px 56px; display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; border: 2px dashed rgba(54,223,212,.5); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); margin: 0; }
.cta-band > * { position: relative; z-index: 1; }

/* ---------- Footer ---------- */
.footer { background: #fff; border-top: 1px solid var(--border); margin-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding: 56px 0 36px; }
.footer a { display: block; color: var(--body); padding: 4px 0; }
.footer a:hover { color: var(--blue); }
.footer a.logo { display: flex; padding: 0; color: var(--navy); }
.footer p { color: var(--muted); }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 0; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Page header / breadcrumb ---------- */
.page-head { background: linear-gradient(180deg, var(--blue) 0%, #4a64d8 100%); color: #fff; padding: 36px 0 44px; position: relative; overflow: hidden; }
.page-head::after { content: ""; position: absolute; right: -60px; top: -100px; width: 320px; height: 320px; border-radius: 50%; border: 2px dashed rgba(54,223,212,.55); }
.page-head h1 { color: #fff; margin: 6px 0 8px; }
.page-head p { color: rgba(255,255,255,.9); margin: 0; max-width: 820px; }
.breadcrumb { color: rgba(255,255,255,.8); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.breadcrumb a { color: rgba(255,255,255,.95); }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb .slash { opacity: .5; }
.breadcrumb.dark { color: var(--muted); padding: 22px 0 0; }
.breadcrumb.dark a { color: var(--muted); }
.breadcrumb.dark a:hover { color: var(--blue); }
.page-head .text-tabs { border-color: rgba(255,255,255,.3); margin-top: 22px; }
.page-head .text-tab { color: rgba(255,255,255,.75); }
.page-head .text-tab:hover, .page-head .text-tab.active { color: #fff; }

/* ---------- Listing ---------- */
.listing { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 28px; padding-top: 32px; align-items: start; }
.filters { position: sticky; top: 150px; max-height: calc(100vh - 170px); overflow-y: auto; }
.filter-group { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.filter-group:last-child { border-bottom: 0; }
.filter-group h5 { margin-bottom: 10px; }
.filter-group .group-label { color: var(--muted); margin: 10px 0 2px; }
.check { display: flex; align-items: center; gap: 10px; padding: 4px 0; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; flex-shrink: 0; margin: 0; }
.check .count { margin-left: auto; color: var(--muted); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.select { border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; background: #fff; color: var(--navy); font-weight: 600; outline: none; cursor: pointer; }
.active-filters { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; color: var(--muted); }
.active-filters button { background: none; border: 0; padding: 0; color: var(--navy); font-weight: 600; cursor: pointer; }
.active-filters button::after { content: " ×"; color: var(--muted); }
.active-filters button:hover { color: var(--danger); }
.empty { text-align: center; padding: 64px 20px; color: var(--muted); }
.filter-toggle { display: none; }
.supplier-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.supplier-row .thumbs-mini { display: flex; gap: 6px; }
.supplier-row .thumbs-mini img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; }

/* ---------- Product detail ---------- */
.pd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; padding-top: 18px; align-items: start; }
.pd-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding: 28px; }
.gallery .main-img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; background: var(--bg-2); position: relative; }
.gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.gallery .note { color: var(--muted); margin-top: 8px; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.thumbs img { aspect-ratio: 1/1; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; opacity: .75; }
.thumbs img.active, .thumbs img:hover { border-color: var(--blue); opacity: 1; }
.pd-info .meta-line { color: var(--muted); margin-bottom: 18px; }
.price-box { background: var(--bg); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.price-box .val { font-size: var(--fs-2); font-weight: 700; color: var(--blue); line-height: 1.3; }
.price-box .val span { font-size: var(--fs-3); color: var(--muted); font-weight: 400; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.spec-table th { text-align: left; font-weight: 400; color: var(--muted); padding: 8px 12px 8px 0; width: 40%; vertical-align: top; }
.spec-table td { padding: 8px 0; color: var(--navy); font-weight: 600; }
.spec-table tr + tr th, .spec-table tr + tr td { border-top: 1px solid var(--border); }
.pd-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pd-actions .btn { flex: 1; }
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--border); padding: 0 28px; overflow-x: auto; }
.tab { padding: 16px 0; font-weight: 600; color: var(--muted); border: 0; background: none; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tab.active { color: var(--navy); border-bottom-color: var(--teal); }
.tab-body { padding: 28px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.side-box { padding: 24px; margin-bottom: 20px; }
.kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { color: var(--navy); font-weight: 600; text-align: right; }
.svc-suggest { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.svc-suggest:last-child { border-bottom: 0; }
.svc-suggest .logo-box { width: 40px; height: 40px; }
.svc-suggest .t { font-weight: 600; color: var(--navy); display: block; line-height: 1.35; }
.svc-suggest .s { color: var(--muted); }

/* ---------- Company profile ---------- */
.co-cover { height: 300px; position: relative; overflow: hidden; }
.co-cover img { width: 100%; height: 100%; object-fit: cover; }
.co-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(1,45,111,.1), rgba(1,45,111,.55)); }
.co-card { position: relative; z-index: 2; margin-top: -90px; }
.co-head { padding: 28px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.co-head .logo-box { width: 96px; height: 96px; font-size: var(--fs-2); border-radius: 14px; }
.co-head .info { flex: 1; min-width: 260px; }
.co-head h1 { font-size: var(--fs-2); margin-bottom: 4px; }
.co-meta { color: var(--muted); }
.co-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.co-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); }
.co-stats div { padding: 18px 28px; border-right: 1px solid var(--border); }
.co-stats div:last-child { border-right: 0; }
.co-stats strong { display: block; font-size: var(--fs-2); font-weight: 700; color: var(--navy); line-height: 1.3; }
.co-stats span { color: var(--muted); }
.co-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; margin-top: 28px; align-items: start; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cert-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.cert-card strong { display: block; color: var(--navy); }
.cert-card span { color: var(--muted); }
.verify-box { border-left: 4px solid var(--teal); }
.verify-list { margin: 0; padding-left: 18px; }
.verify-list li { padding: 3px 0; color: var(--navy); }
.verify-list li::marker { color: var(--teal-600); }
.svc-list { display: grid; gap: 14px; }
.svc-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 16px; align-items: center; }
.svc-item p { color: var(--muted); margin: 0; }

/* ---------- Services page ---------- */
.svc-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 36px; margin: 28px 0; }
.svc-intro img { border-radius: var(--radius); aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.svc-intro ul { margin: 0; padding-left: 18px; columns: 2; column-gap: 32px; }
.svc-intro li { padding: 3px 0; break-inside: avoid; }
.svc-intro li::marker { color: var(--teal-600); }
.svc-filter { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label, .field-label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field label .req { color: var(--danger); }
.field .hint { color: var(--muted); margin-top: 4px; }
.input, .field select, .field textarea { width: 100%; border: 1px solid #cfd6e4; border-radius: 6px; padding: 11px 14px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18,68,185,.12); }
.field textarea { min-height: 120px; resize: vertical; }
.field.invalid .input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field .err { display: none; color: var(--danger); margin-top: 4px; }
.field.invalid .err { display: block; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 18px; }

/* Register */
.reg-wrap { max-width: 1040px; margin: 0 auto; }
.stepper { display: flex; margin: 32px 0 24px; }
.stepper .st { flex: 1; display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--muted); }
.stepper .st:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: var(--border); margin: 0 14px; }
.stepper .st .n { color: var(--muted); }
.stepper .st.active { color: var(--navy); }
.stepper .st.active .n { color: var(--blue); }
.stepper .st.done, .stepper .st.done .n { color: var(--teal-text); }
.stepper .st.done:not(:last-child)::after { background: var(--teal-600); }
.reg-card { padding: 36px; }
.reg-card .lead { color: var(--muted); margin-bottom: 24px; }
.role-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.role-option { border: 2px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; display: flex; transition: border-color .15s; }
.role-option img { width: 140px; object-fit: cover; flex-shrink: 0; }
.role-option .txt { padding: 18px 20px; }
.role-option:hover { border-color: #b9c6ef; }
.role-option.active { border-color: var(--blue); background: var(--blue-50); }
.role-option h4 { margin: 0 0 4px; }
.role-option p { margin: 0; color: var(--muted); }
.reg-nav { display: flex; justify-content: space-between; margin-top: 30px; gap: 12px; }
.success-box { text-align: center; padding: 16px 0; }
.success-box h2 { color: var(--teal-text); }
.timeline { text-align: left; max-width: 560px; margin: 28px auto; border-left: 2px solid var(--border); padding-left: 22px; }
.timeline .ti { padding: 8px 0; }
.timeline .ti strong { display: block; color: var(--muted); }
.timeline .ti.done strong { color: var(--teal-text); }
.timeline .ti.now strong { color: var(--navy); }
.timeline .ti span { color: var(--muted); }
.upload-box { display: block; border: 2px dashed #c9d3ee; border-radius: var(--radius); padding: 28px; text-align: center; cursor: pointer; background: var(--bg); transition: border-color .15s, background .15s; }
.upload-box:hover, .upload-box.drag { border-color: var(--blue); background: var(--blue-50); }
.upload-box strong { color: var(--blue); display: block; }
.upload-box p { margin: 4px 0 0; color: var(--muted); }
.upload-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-top: 14px; }
.upload-preview .pv { position: relative; aspect-ratio: 1/1; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.upload-preview .pv img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview .pv button { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(1,45,111,.8); color: #fff; cursor: pointer; line-height: 1; }
.upload-preview .pv .main { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(1,45,111,.8); color: #fff; text-align: center; padding: 2px 0; }
.lang-tabs { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lang-tabs .text-tabs { border: 0; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; padding-top: 28px; align-items: start; }
.dash-side { padding: 16px; position: sticky; top: 150px; }
.dash-user { display: flex; gap: 12px; align-items: center; padding: 6px 6px 16px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.dash-user .logo-box { width: 44px; height: 44px; }
.dash-user strong { display: block; color: var(--navy); line-height: 1.35; }
.dash-nav a { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 6px; color: var(--body); font-weight: 600; }
.dash-nav a:hover { background: var(--bg); color: var(--navy); }
.dash-nav a.active { background: var(--blue-50); color: var(--blue); }
.dash-nav a .count { color: var(--blue); }
.dash-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.dash-title h2 { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat { padding: 20px 22px; }
.stat .lbl { color: var(--muted); }
.stat .num { font-size: var(--fs-2); font-weight: 700; color: var(--navy); line-height: 1.4; }
.stat .delta { color: var(--success); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; color: var(--muted); font-weight: 600; padding: 12px 20px; background: var(--bg); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .prod { display: flex; align-items: center; gap: 14px; min-width: 240px; }
.table .prod img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }
.table .prod strong { color: var(--navy); display: block; }
.st-approved { color: var(--success); font-weight: 600; }
.st-pending { color: var(--warning); font-weight: 600; }
.st-rejected { color: var(--danger); font-weight: 600; }
.st-draft { color: var(--muted); font-weight: 600; }
.row-actions { display: flex; gap: 16px; white-space: nowrap; }
.row-actions a, .row-actions button { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; cursor: pointer; }
.note-bar { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 22px; background: var(--blue-50); color: var(--navy); border-left: 4px solid var(--blue); }
.note-bar.ok { background: #e9faf8; border-color: var(--teal-600); }
.note-bar.warn { background: #fff6e6; border-color: var(--warning); color: #6b4500; }
.inq { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; gap: 14px; align-items: flex-start; }
.inq:last-child { border-bottom: 0; }
.inq .who { flex: 1; min-width: 0; }
.inq .who strong { color: var(--navy); }
.inq .msg { margin: 4px 0 0; }
.inq .meta { color: var(--muted); text-align: right; flex-shrink: 0; }
.progress { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin: 6px 0 4px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--blue), var(--teal)); }

/* ---------- Modal & Toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(1,45,111,.5); z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 600px; max-height: calc(100vh - 40px); overflow-y: auto; box-shadow: var(--shadow-lg); animation: pop .2s ease; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 26px 0; }
.modal-head h3 { margin: 0; }
.modal-head p { margin: 4px 0 0; color: var(--muted); }
.modal-close { border: 0; background: var(--bg); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; color: var(--navy); flex-shrink: 0; }
.modal-body { padding: 20px 26px 26px; }
.modal-prod { display: flex; gap: 14px; align-items: center; background: var(--bg); border-radius: var(--radius); padding: 12px; margin-bottom: 18px; }
.modal-prod img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; }
.modal-prod strong { display: block; color: var(--navy); }
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 8px; box-shadow: var(--shadow-lg); animation: pop .2s ease; }

/* ---------- Chatbot ---------- */
.chat-fab { position: fixed; right: 24px; bottom: 24px; z-index: 110; display: flex; align-items: center; gap: 10px; background: var(--blue); color: #fff; border: 0; border-radius: 999px; padding: 14px 26px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 24px rgba(18,68,185,.35); transition: background .15s, transform .15s; }
.chat-fab:hover { background: var(--navy); transform: translateY(-1px); }
.chat-fab .bi { font-size: 20px; line-height: 1; }
body.chat-open .chat-fab { display: none; }
.chat-panel { position: fixed; right: 24px; bottom: 24px; z-index: 111; width: 400px; max-width: calc(100vw - 32px); height: 600px; max-height: calc(100vh - 48px); background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); display: none; flex-direction: column; overflow: hidden; animation: pop .2s ease; }
body.chat-open .chat-panel { display: flex; }
.chat-head { background: var(--navy); color: #fff; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-head strong { display: block; }
.chat-head span { color: rgba(255,255,255,.75); }
.chat-head button { background: none; border: 0; color: #fff; cursor: pointer; font-size: var(--fs-2); line-height: 1; padding: 0 4px; }
.chat-body { flex: 1; overflow-y: auto; padding: 18px; background: var(--bg); display: flex; flex-direction: column; gap: 12px; }
.msg-bot, .msg-user { max-width: 86%; padding: 10px 14px; border-radius: 12px; }
.msg-bot { background: #fff; border: 1px solid var(--border); color: var(--body); align-self: flex-start; border-top-left-radius: 4px; }
.msg-user { background: var(--blue); color: #fff; align-self: flex-end; border-top-right-radius: 4px; }
.msg-bot a { font-weight: 600; }
.msg-bot ul { margin: 6px 0 0; padding-left: 18px; }
.quick { display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.quick button { text-align: left; background: #fff; border: 1px solid #c9d2e6; border-radius: 8px; padding: 9px 14px; color: var(--navy); cursor: pointer; }
.quick button:hover { border-color: var(--blue); color: var(--blue); }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: #fff; }
.chat-input input { flex: 1; border: 1px solid #cfd6e4; border-radius: 8px; padding: 10px 12px; outline: none; min-width: 0; }
.chat-input input:focus { border-color: var(--blue); }
.chat-input button { border: 0; background: var(--blue); color: #fff; border-radius: 8px; padding: 0 18px; font-weight: 600; cursor: pointer; }
.typing { color: var(--muted); align-self: flex-start; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .header-actions .hide-md { display: none; }
}
@media (max-width: 1024px) {
  :root { --fs-1: 40px; }
  .hero-grid { grid-template-columns: 1fr; }
  .cat-side { display: none; }
  .three-col { grid-template-columns: 1fr 1fr; }
  .three-col > :last-child { grid-column: 1 / -1; }
  .role-grid, .steps { grid-template-columns: 1fr 1fr; }
  .cat-block { grid-template-columns: 1fr; }
  .cat-feature { min-height: 260px; }
  .cat-block .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listing { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0 auto 0 0; width: 320px; max-width: 86vw; max-height: none; z-index: 95; border-radius: 0; transform: translateX(-100%); transition: transform .25s; }
  body.filters-open .filters { transform: none; }
  body.filters-open .drawer-backdrop { display: block; }
  .filter-toggle { display: inline-flex; }
  .pd-grid, .co-layout { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: static; }
  .dash-nav { display: flex; overflow-x: auto; gap: 4px; }
  .dash-nav a { white-space: nowrap; }
  .dash-user { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .svc-intro { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .navbar { display: none; }
  .menu-toggle { display: block; }
  .header-main { gap: 12px; flex-wrap: wrap; min-height: 64px; padding: 10px 0; }
  .search-bar { order: 3; flex-basis: 100%; max-width: none; }
  .header-actions .hide-sm, .topbar-right .hide-sm, .topbar-left .tagline { display: none; }
  .pd-main { grid-template-columns: 1fr; }
  .co-stats { grid-template-columns: 1fr 1fr; }
  .co-stats div:nth-child(2) { border-right: 0; }
  .co-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .country-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 32px 26px; }
  .filters { top: 0; }
  .supplier-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --fs-1: 30px; --fs-2: 20px; }
  .section { padding: 48px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .hero-banner { padding: 32px 22px; min-height: 0; }
  .hero-banner > .hero-shade { background: rgba(18,68,185,.72); }
  .hero-banner h1, .hero-banner p { max-width: none; }
  .hero-stats { gap: 24px; }
  .three-col, .role-grid, .steps, .prov-grid { grid-template-columns: 1fr; }
  .three-col > :last-child { grid-column: auto; }
  .product-grid, .cat-block .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .p-card .body { padding: 12px; }
  .form-grid, .role-options { grid-template-columns: 1fr; }
  .role-option img { width: 96px; }
  .stepper .st .lbl { display: none; }
  .reg-card { padding: 22px; }
  .search-bar select { max-width: 110px; padding: 0 8px; }
  .search-bar button { padding: 0 16px; }
  .search-bar button .bi { display: inline; }
  .search-bar button .lbl { display: none; }
  .co-cover { height: 180px; }
  .co-card { margin-top: -60px; }
  .co-head .logo-box { width: 72px; height: 72px; }
  .svc-intro { padding: 22px; }
  .svc-intro ul { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .tab-body, .pd-main { padding: 18px; }
  .tabs { padding: 0 18px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .chat-fab { right: 16px; bottom: 16px; padding: 12px 18px; }
  .chat-fab .lbl { display: none; }
  .chat-panel { right: 8px; bottom: 8px; height: calc(100vh - 16px); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
