:root {
  /* Exact Somatex Logistics palette (from somatexlogistics.com / stc) */
  --brand-blue: #0056b3;
  --brand-blue-dark: #003d80;
  --brand-soft: #e8f1fb;
  --brand-dark: #0f172a;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --promo: #0056b3;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 86, 179, 0.08);
  --font: "Segoe UI", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
.container { width: min(1280px, calc(100% - 32px)); margin: 0 auto; }

/* Promo bar */
.promo-bar {
  background: var(--promo);
  color: #fff;
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
}
.promo-bar a { color: #fff; font-weight: 700; margin-left: 8px; text-decoration: underline; }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 8px;
}
.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-blue);
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.logo span { color: var(--brand-dark); font-weight: 700; font-size: 0.78em; }
.header-links {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  align-items: center;
}
.header-links a {
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.header-links a:hover,
.header-links a.is-active {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
  font-weight: 600;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 20px;
  padding: 9px 18px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.15s ease;
}
.btn-primary, .btn-orange { background: var(--brand-blue); color: #fff; }
.btn-primary:hover, .btn-orange:hover { background: var(--brand-blue-dark); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 6px; }
.btn-block { width: 100%; }

.nav-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 12px;
  font-size: 14px;
  flex-wrap: wrap;
}
.nav-row a:hover,
.nav-row a.is-active {
  color: var(--brand-blue);
  font-weight: 600;
}
.all-cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-blue);
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-mobile-only { display: none; }

/* Search */
.search-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 28px 0 18px;
  border-bottom: 1px solid var(--line);
}
.search-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.search-tabs {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 14px;
  font-size: 15px;
}
.search-tabs a {
  color: var(--muted);
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
}
.search-tabs a.active {
  color: var(--brand-blue);
  font-weight: 700;
  border-color: var(--brand-blue);
}
.search-box {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 2px solid var(--brand-blue);
  border-radius: 999px;
  overflow: hidden;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 20px;
  font-size: 16px;
}
.search-box .search-btn {
  background: var(--brand-blue);
  color: #fff;
  border: none;
  padding: 0 28px;
  font-weight: 700;
  cursor: pointer;
}
.search-box .search-btn:hover { background: var(--brand-blue-dark); }

.benefit-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.benefit-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow);
}
.benefit-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-blue);
  display: grid;
  place-items: center;
  font-weight: 800;
  flex-shrink: 0;
}
.benefit-card h4 { font-size: 14px; margin-bottom: 2px; }
.benefit-card p { font-size: 12px; color: var(--muted); }

/* Layout */
.main-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  padding: 18px 0 40px;
}
.sidebar {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 8px 0;
  height: fit-content;
  position: sticky;
  top: 120px;
}
.sidebar a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  font-size: 14px;
  color: var(--ink);
}
.sidebar a:hover,
.sidebar a.active {
  background: var(--brand-soft);
  color: var(--brand-blue);
}
.sidebar .cat-left { display: flex; gap: 10px; align-items: center; }
.sidebar .chev { color: #bbb; font-size: 12px; }

.content-area { min-width: 0; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 14px;
}
.section-head h2 { font-size: 20px; }
.section-head a { color: var(--brand-blue); font-size: 13px; font-weight: 600; }

.freq-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.freq-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.freq-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.freq-card .thumb {
  height: 110px;
  background: #fafafa;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.freq-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.freq-card span {
  display: block;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.product-card .media {
  aspect-ratio: 1;
  background: #fafafa;
  overflow: hidden;
}
.product-card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card .body { padding: 12px 14px 16px; flex: 1; display: flex; flex-direction: column; }
.product-card .title {
  font-size: 14px;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
  margin-bottom: 8px;
}
.product-card .price {
  color: var(--brand-blue);
  font-size: 18px;
  font-weight: 800;
}
.product-card .meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.product-card .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 11px;
  color: #0a7;
  font-weight: 600;
}
.local-tag {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand-blue-dark);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
  width: fit-content;
}

/* Product detail */
.detail-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.detail-media {
  background: #fafafa;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
}
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-info h1 { font-size: 24px; margin-bottom: 12px; }
.detail-price { font-size: 32px; color: var(--brand-blue); font-weight: 800; margin: 12px 0; }
.detail-meta { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.detail-desc {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #444;
  white-space: pre-wrap;
}
.detail-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* Footer */
.site-footer {
  background: var(--brand-dark);
  color: #cbd5e1;
  padding: 40px 0 24px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.footer-grid h4 { color: #fff; margin-bottom: 12px; font-size: 14px; }
.footer-grid a {
  display: block;
  font-size: 13px;
  color: #aaa;
  margin-bottom: 8px;
}
.footer-grid a:hover { color: #fff; }
.footer-contact {
  border-top: 1px solid #333;
  padding-top: 16px;
  margin-bottom: 14px;
  font-size: 12px;
  color: #9aa;
  display: grid;
  gap: 6px;
}
.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 16px;
  font-size: 12px;
  color: #888;
  text-align: center;
}
.home-banner {
  background: linear-gradient(120deg, #ffffff 0%, #e8f1fb 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.home-banner h2 { font-size: 24px; margin-bottom: 6px; color: var(--brand-dark); }
.home-banner p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.home-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.home-banner-stats {
  display: flex; gap: 18px; flex-wrap: wrap;
}
.home-banner-stats div { text-align: center; min-width: 90px; }
.home-banner-stats strong { display: block; font-size: 22px; color: var(--brand-blue); }
.home-banner-stats span { font-size: 12px; color: var(--muted); }
.home-mfr-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
.home-mfr-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.home-mfr-card:hover { border-color: var(--brand-blue); box-shadow: var(--shadow); }
.home-mfr-card strong { display: block; font-size: 14px; }
.rfq-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: linear-gradient(90deg, #e8f1fb, #fff);
}
.rfq-strip h3 { font-size: 18px; margin-bottom: 4px; }
.rfq-strip p { color: var(--muted); font-size: 13px; }
.seller-line { color: var(--brand-blue) !important; font-weight: 600; }
.benefit-card { cursor: pointer; }

/* About / Help / Sell pages */
.info-hero {
  background: linear-gradient(120deg, #0056b3 0%, #003d80 60%, #0f172a 100%);
  color: #fff;
  padding: 36px 0 32px;
}
.info-eyebrow {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 8px;
  font-weight: 600;
}
.info-hero h1 {
  font-size: 34px;
  line-height: 1.2;
  margin-bottom: 10px;
  max-width: 720px;
}
.info-hero p {
  max-width: 680px;
  opacity: 0.92;
  font-size: 15px;
  line-height: 1.6;
}
.info-page { padding: 24px 0 48px; }
.info-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.info-card h3 { font-size: 16px; margin: 10px 0 6px; }
.info-card p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.info-card.link-card { transition: 0.15s ease; }
.info-card.link-card:hover {
  border-color: var(--brand-blue);
  transform: translateY(-2px);
}
.info-block { margin-bottom: 14px; }
.info-block h2 { font-size: 20px; margin-bottom: 10px; }
.info-block h3 { font-size: 15px; margin-bottom: 6px; }
.info-block p { color: #334155; line-height: 1.65; margin-bottom: 10px; }
.info-list {
  margin: 0;
  padding-left: 18px;
  color: #334155;
  line-height: 1.8;
}
.info-contact { margin-top: 14px; color: #334155; }
.info-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.sell-hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 20px;
  align-items: stretch;
}
.sell-side-card {
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 20px;
}
.sell-side-card h3 { margin-bottom: 10px; }
.sell-hero .btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.55);
  color: #fff;
}
.sell-hero .btn-outline:hover {
  background: #fff;
  color: var(--brand-blue);
  border-color: #fff;
}
@media (max-width: 900px) {
  .info-grid-3, .sell-hero-grid { grid-template-columns: 1fr; }
  .info-hero h1 { font-size: 28px; }
}
@media (max-width: 860px) {
  .header-links {
    display: flex;
    order: 3;
    width: 100%;
    gap: 12px;
    padding-top: 4px;
  }
  .header-top { flex-wrap: wrap; }
}

/* Alerts */
.alert {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 14px;
}
.alert-success { background: #e8f8ef; color: #0a7; border: 1px solid #b6ebca; }
.alert-error { background: #ffecec; color: #c00; border: 1px solid #f5c2c2; }
.alert-info { background: #eef5ff; color: #06c; border: 1px solid #c5dbff; }

.empty-state {
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}

/* Admin */
.admin-body { background: #f0f2f5; min-height: 100vh; }
.admin-login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(0,86,179,0.18), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(0,86,179,0.12), transparent 35%),
    #f8fafc;
  padding: 24px;
}
.login-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  width: min(920px, 100%);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 86, 179, 0.14);
}
.login-info {
  background: linear-gradient(145deg, #0056b3 0%, #003d80 100%);
  color: #fff;
  padding: 40px 36px;
}
.login-info h2 { font-size: 26px; margin-bottom: 10px; }
.login-info > p { opacity: 0.92; font-size: 14px; margin-bottom: 22px; line-height: 1.6; }
.login-features { list-style: none; font-size: 14px; line-height: 1.9; }
.login-card {
  width: 100%;
  background: #fff;
  border-radius: 0;
  padding: 40px 36px;
  box-shadow: none;
}
@media (max-width: 800px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-info { padding: 28px 24px; }
  .login-card { padding: 28px 24px; }
}
.login-card .brand {
  text-align: center;
  margin-bottom: 24px;
}
.login-card .brand .logo { font-size: 32px; }
.login-card h1 {
  text-align: center;
  font-size: 20px;
  margin-bottom: 6px;
}
.login-card .sub {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 22px;
}
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 11px 12px;
  outline: none;
  background: #fff;
}
.form-control:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(0,86,179,0.15); }
textarea.form-control { min-height: 120px; resize: vertical; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side {
  background: var(--brand-blue);
  color: #fff;
  padding: 20px 0;
}
.admin-side .brand {
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 12px;
}
.admin-side .brand .logo { font-size: 22px; color: #fff; }
.admin-side .brand .logo span { color: #fff; opacity: 0.9; }
.admin-user { margin-top: 8px; font-size: 12px; color: rgba(255,255,255,0.8); }
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.action-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: 0.15s ease;
}
.action-card:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.action-card strong { color: var(--brand-blue); font-size: 15px; }
.action-card span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.admin-two-col {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1000px) {
  .action-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-two-col { grid-template-columns: 1fr; }
}
.admin-side nav a {
  display: block;
  padding: 12px 20px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
}
.admin-side nav a:hover,
.admin-side nav a.active {
  background: rgba(255,255,255,0.14);
  color: #fff;
  border-left: 3px solid #fff;
}
.admin-main { padding: 24px; }
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-top h1 { font-size: 24px; }
.stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.action-grid {
  margin-bottom: 4px;
}
.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 18px;
  border: 1px solid var(--line);
}
.stat-card .label { font-size: 12px; color: var(--muted); }
.stat-card .value { font-size: 28px; font-weight: 800; margin-top: 4px; color: var(--brand-blue); }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th, .table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.table .thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: #f5f5f5;
}
.badge-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.badge-active { background: #e8f8ef; color: #0a7; }
.badge-draft { background: #fff6e8; color: #c80; }
.badge-hidden { background: #eee; color: #666; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #c82333; }
.btn-gray { background: #eee; color: #333; }
.btn-gray:hover { background: #ddd; }

.preview-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-top: 8px;
}

/* Manufacturers page (Alibaba factory-style) */
.mfr-hero {
  background: linear-gradient(120deg, #0056b3 0%, #003d80 55%, #0f172a 100%);
  color: #fff;
  padding: 28px 0;
}
.mfr-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 20px;
  align-items: center;
}
.mfr-hero h1 { font-size: 34px; line-height: 1.2; margin-bottom: 14px; }
.mfr-hero h1 span { color: #9fd0ff; }
.mfr-benefits { list-style: none; display: grid; gap: 8px; font-size: 14px; }
.mfr-rfq-card {
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.mfr-rfq-card h3 { font-size: 18px; margin-bottom: 8px; }
.mfr-rfq-card p { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.mfr-layout {
  display: grid;
  grid-template-columns: 220px 1fr 240px;
  gap: 16px;
  padding: 20px 0 40px;
}
.mfr-cat {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink);
}
.mfr-cat:hover, .mfr-cat.active {
  background: var(--brand-soft);
  color: var(--brand-blue);
}
.mfr-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.mfr-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  transition: 0.15s ease;
}
.mfr-card:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.mfr-card-top { display: flex; gap: 12px; align-items: flex-start; }
.mfr-avatar {
  width: 48px; height: 48px; border-radius: 10px;
  background: linear-gradient(135deg, #0056b3, #003d80);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 20px; flex-shrink: 0;
}
.mfr-avatar.lg { width: 72px; height: 72px; font-size: 28px; border-radius: 14px; }
.mfr-name { font-weight: 700; font-size: 15px; }
.mfr-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.mfr-verified { color: #0a7; font-size: 12px; font-weight: 700; margin-top: 4px; }
.mfr-stats {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; font-size: 12px; color: #334155;
}
.mfr-stats span {
  background: #f1f5f9; padding: 4px 8px; border-radius: 999px;
}
.mfr-tags { margin-top: 10px; font-size: 12px; color: var(--muted); }
.mfr-custom {
  display: inline-block; margin-top: 8px;
  background: #e8f1fb; color: #003d80;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px;
}
.mfr-samples {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: 12px;
}
.mfr-samples img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 6px; background: #f8fafc;
}
.mfr-aside-list { list-style: none; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.mfr-aside-list li { margin-bottom: 8px; }
.mfr-aside-list strong { color: var(--brand-blue); display: block; font-size: 18px; }
.mfr-guest h3 { font-size: 16px; }
.mfr-guest p { color: var(--muted); margin: 4px 0 12px; }
.mfr-profile-head {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap;
}
.mfr-profile-head h1 { font-size: 26px; margin-bottom: 4px; }
.mfr-profile-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* Auth / cart / checkout / account */
.auth-wrap {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 28px;
}
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-footer { margin-top: 16px; font-size: 14px; text-align: center; }
.auth-footer a { color: var(--brand-blue); font-weight: 600; }
.hint { color: var(--muted); font-size: 13px; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.header-actions a:hover { color: var(--brand-blue); }
.cart-link { font-weight: 700; color: var(--brand-blue); }
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}
.cart-row {
  display: grid;
  grid-template-columns: 88px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  margin-bottom: 12px;
}
.cart-thumb {
  width: 88px; height: 88px; border-radius: 8px; overflow: hidden; background: #f1f5f9;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info .price { color: var(--brand-blue); font-weight: 700; margin-top: 4px; }
.cart-qty { display: flex; gap: 6px; align-items: center; }
.cart-qty input { width: 72px; }
.cart-line { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.link-danger {
  background: none; border: none; color: #c00; cursor: pointer; font-size: 13px; padding: 0;
}
.cart-summary { padding: 18px; position: sticky; top: 80px; }
.cart-summary h2 { font-size: 18px; margin-bottom: 12px; }
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 14px;
}
.buy-box { margin: 14px 0; }
.buy-box label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.buy-row { display: flex; gap: 10px; align-items: center; max-width: 360px; }
.buy-row input { width: 100px; }
.account-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
}
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th, .data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.data-table th { background: #f8fafc; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e8f1fb;
  color: var(--brand-blue);
}
.status-pending { background: #fff7e6; color: #b36b00; }
.status-confirmed, .status-processing { background: #e8f1fb; color: var(--brand-blue); }
.status-shipped { background: #eef5ff; color: #06c; }
.status-delivered { background: #e8f8ef; color: #0a7; }
.status-cancelled { background: #ffecec; color: #c00; }
.rating-line { color: #e6a700; font-weight: 600; }
.review-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.review-item p { margin-top: 6px; font-size: 14px; }
.empty-state { padding: 28px; text-align: center; color: var(--muted); }

@media (max-width: 900px) {
  .cart-layout, .account-grid { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 72px 1fr; }
  .cart-qty, .cart-line { grid-column: 1 / -1; }
  .cart-line { flex-direction: row; justify-content: space-between; width: 100%; align-items: center; }
}

@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .freq-row { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .mfr-layout { grid-template-columns: 200px 1fr; }
  .mfr-aside { display: none; }
  .home-mfr-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: repeat(2, 1fr); }
  .benefit-row { grid-template-columns: 1fr; }
  .detail-wrap { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .mfr-hero-grid, .mfr-layout, .mfr-grid { grid-template-columns: 1fr; }
  .mfr-side { order: 2; }

  /* Mobile storefront chrome (desktop unchanged above) */
  .nav-toggle { display: inline-flex; }
  .hide-mobile { display: none !important; }
  .deliver-to { display: none; }
  .header-top { padding: 10px 0; gap: 10px; }
  .logo { font-size: 20px; }
  .header-actions { gap: 8px; }
  .nav-row {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 0 12px;
    border-top: 1px solid var(--line);
    margin-top: 4px;
  }
  .nav-row.is-open { display: flex; }
  .nav-row a {
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
  }
  .nav-mobile-only { display: block; }
  .promo-bar { font-size: 12px; padding: 8px 12px; line-height: 1.4; }
  .search-section { padding: 16px 0 12px; }
  .search-box {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    border-radius: 14px;
  }
  .search-box input { min-width: 0; flex: 1; padding: 12px 14px; font-size: 15px; }
  .search-box .search-btn { padding: 0 14px; white-space: nowrap; font-size: 13px; }
  .search-tabs { gap: 14px; font-size: 14px; }
  .container { width: min(1280px, calc(100% - 20px)); }
  .home-banner { padding: 18px; }
  .home-banner h2 { font-size: 22px; }
  .home-banner-stats { grid-template-columns: 1fr; gap: 8px; }
  .action-grid { grid-template-columns: 1fr; }
  .detail-actions { flex-wrap: wrap; }
  .buy-row { max-width: 100%; width: 100%; }
  .buy-row .btn { flex: 1; }
  .cart-summary { position: static; }
  .auth-wrap { padding: 24px 0; }
  .auth-card { padding: 20px; }
  .info-hero h1 { font-size: 26px; }
  .info-grid-3, .sell-hero-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 560px; }
}
@media (max-width: 640px) {
  .product-grid, .freq-row { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mfr-hero h1 { font-size: 26px; }
  .sidebar { grid-template-columns: 1fr; }
  .product-grid { gap: 10px; }
  .product-card .title { font-size: 13px; }
  .btn-sm { padding: 8px 12px; }
  .home-mfr-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-contact { font-size: 12px; }
}
