/* VanCraft UK — clean adventure palette (alpine mist + pine teal + trail gold) */
:root {
  --bg: #FFFFFF;
  --fg: #1F2937;
  --card: #FFFFFF;
  --primary: #6B7280;
  --primary-hover: #4B5563;
  --primary-fg: #FFFFFF;
  --secondary: #F3F4F6;
  --muted: #E5E7EB;
  --muted-fg: #6B7280;
  --accent: #FF5722;
  --accent-fg: #FFFFFF;
  --destructive: #C2342A;
  --border: rgba(107, 114, 128, 0.2);
  --green-soft: #9CA3AF;
  --ink: #374151;
  --ink-mid: #4B5563;
  --sky: #3D7A8C;
  --sidebar: #4B5563;
  --sidebar-fg: #F9FAFB;
  --radius: 0.75rem;
  --shadow: 0 1px 3px rgba(11, 28, 22, .05);
  --shadow-md: 0 10px 28px rgba(11, 28, 22, .08);
  --font: "Inter", system-ui, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 80rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: #FFFFFF;
  color: var(--fg);
  line-height: 1.5;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0; }
h4, h5, h6 { font-family: var(--font); font-weight: 500; margin: 0; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 4px; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Layout */
.container { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* Icons (inline SVG span) */
.icon { display: inline-flex; width: 1em; height: 1em; vertical-align: -0.125em; }
.icon svg { width: 100%; height: 100%; }

/* Badges */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.125rem 0.625rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 500;
}
.badge-default { background: var(--secondary); color: var(--fg); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-orange { background: #fff4e0; color: #9A5A08; }
.pill {
  position: absolute; top: 0.75rem; left: 0.75rem;
  font-size: 0.75rem; font-weight: 600;
  padding: 0.25rem 0.5rem; border-radius: 0.5rem; color: #fff; z-index: 1;
}
.pill-sale { background: var(--accent); }
.pill-low { background: #f59e0b; }
.pill-rated, .pill-primary { background: var(--primary); }
.pill-dark { background: var(--ink); }
.pill-accent { background: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: 0.75rem; font-weight: 500;
  transition: all .15s ease; white-space: nowrap;
}
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; border-radius: 0.5rem; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(107,114,128,.28); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(.95); }
.btn-ghost {
  background: rgba(255,255,255,.1); color: #fff;
  border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255,255,255,.2); }
.btn-outline {
  border: 1px solid var(--primary); color: var(--primary); background: transparent;
}
.btn-outline:hover { background: rgba(107,114,128,.08); }
.btn-secondary { background: var(--secondary); color: var(--fg); }
.btn-secondary:hover { background: var(--muted); }
.btn-icon {
  width: 2.25rem; height: 2.25rem; border-radius: 0.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted-fg);
}
.btn-icon:hover { background: var(--secondary); color: var(--fg); }
.btn-round {
  width: 1.75rem; height: 1.75rem; border-radius: 999px;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-round:hover { background: var(--primary-hover); }
.link { color: var(--primary); font-weight: 500; font-size: 0.875rem; display: inline-flex; align-items: center; gap: 0.25rem; }
.link:hover { gap: 0.5rem; }

/* Forms */
.input, .select, .textarea {
  width: 100%; padding: 0.625rem 0.875rem;
  background: var(--secondary); border: 1px solid var(--border);
  border-radius: 0.5rem; font-size: 0.875rem;
  outline: none; transition: box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  box-shadow: 0 0 0 3px rgba(107,114,128,.25);
}
.label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; }
.field { margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 1rem; overflow: hidden; box-shadow: var(--shadow);
}
.product-card.card {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(4px);
}
.card-hover { transition: transform .2s, box-shadow .2s; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Stars */
.stars { display: inline-flex; gap: 2px; color: #fbbf24; }
.stars .empty { color: var(--muted); }

/* ── Navbar ── */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 4rem; gap: 1rem;
}
.logo { display: flex; align-items: center; gap: 0.625rem; }
.logo-mark {
  width: 2rem; height: 2rem; background: var(--primary); border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.1; }
.logo-sub { font-size: 0.625rem; color: var(--muted-fg); letter-spacing: .15em; text-transform: uppercase; }
.nav-links { display: none; align-items: center; gap: 0.25rem; }
.nav-links a, .nav-links button {
  padding: 0.5rem 1rem; font-size: 0.875rem; color: var(--muted-fg);
  border-radius: 0.5rem; transition: .15s;
}
.nav-links a:hover, .nav-links button:hover { color: var(--fg); background: var(--secondary); }
.nav-links .erp-link { color: var(--accent); font-weight: 500; }
.nav-links .erp-link:hover { background: rgba(212,120,10,.1); }
.nav-actions { display: flex; align-items: center; gap: 0.25rem; }
.cart-badge {
  position: absolute; top: -2px; right: -2px;
  width: 1rem; height: 1rem; background: var(--accent); color: #fff;
  font-size: 0.625rem; font-weight: 700; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}
.search-bar { padding: 0.75rem 0; border-top: 1px solid var(--border); }
.search-wrap { position: relative; }
.search-wrap .icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--muted-fg); }
.search-wrap .input { padding-left: 2.25rem; }
.mobile-menu { display: none; padding: 1rem 0; border-top: 1px solid var(--border); }
.mobile-menu.open { display: block; }
.mobile-menu a, .mobile-menu button {
  display: block; width: 100%; text-align: left;
  padding: 0.625rem 1rem; font-size: 0.875rem; border-radius: 0.5rem;
}
.mobile-menu a:hover, .mobile-menu button:hover { background: var(--secondary); }
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .menu-toggle { display: none !important; }
}

/* ── Store shell ── */
#store-shell { min-height: 100vh; display: flex; flex-direction: column; }
#store-main { flex: 1; }
#erp-shell { display: none; height: 100vh; overflow: hidden; }
#erp-shell.active { display: flex; }
#buyer-shell { display: none; height: 100vh; overflow: hidden; }
#buyer-shell.active { display: flex; }
#store-shell.erp-hidden { display: none; }

/* ── Hero ── */
/* ── Hero slider ── */
.hero {
  position: relative; height: 560px; overflow: hidden; background: var(--ink); color: #fff;
}
@media (min-width: 1024px) { .hero { height: 680px; } }
.hero-track {
  position: absolute; inset: 0;
  display: flex; width: 100%;
  transition: transform .65s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}
.hero-slide {
  position: relative; flex: 0 0 100%; width: 100%; height: 100%;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .48; }
.hero-grad {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(55,65,81,.92) 0%, rgba(55,65,81,.55) 42%, rgba(107,114,128,.25) 72%, transparent 100%),
    linear-gradient(to top, rgba(55,65,81,.35), transparent 40%);
}
.hero-content {
  position: relative; height: 100%; display: flex; align-items: center;
  max-width: var(--max); margin: 0 auto; padding: 0 1rem;
}
@media (min-width: 1024px) { .hero-content { padding: 0 2rem; } }
.hero-inner {
  max-width: 36rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease .15s, transform .5s ease .15s;
}
.hero-slide.is-active .hero-inner {
  opacity: 1;
  transform: translateY(0);
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(212,120,10,.18); color: #F0C56A;
  border: 1px solid rgba(212,120,10,.35); border-radius: 999px;
  padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 500; margin-bottom: 1.5rem;
}
.hero-tag .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 999px; }
.hero h1 { font-size: 2.75rem; font-weight: 700; margin-bottom: 1.25rem; line-height: 1.1; }
@media (min-width: 1024px) { .hero h1 { font-size: 3.5rem; } }
.hero h1 span { color: var(--green-soft); }
.hero p { font-size: 1.0625rem; color: rgba(255,255,255,.72); margin-bottom: 1.75rem; max-width: 32rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-stats { display: flex; gap: 2rem; margin-top: 2.25rem; }
.hero-stats strong { display: block; font-size: 1.25rem; font-weight: 700; }
.hero-stats span { font-size: 0.75rem; color: rgba(255,255,255,.5); }

.hero-nav {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0.75rem; z-index: 3;
}
@media (min-width: 768px) { .hero-nav { padding: 0 1.25rem; } }
.hero-btn {
  pointer-events: auto;
  width: 2.75rem; height: 2.75rem; border-radius: 999px;
  background: rgba(255,255,255,.12); color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  transition: background .15s;
}
.hero-btn:hover { background: rgba(255,255,255,.22); }
.hero-dots {
  position: absolute; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
  display: flex; gap: 0.5rem; z-index: 3;
}
.hero-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 999px;
  background: rgba(255,255,255,.35); border: none; padding: 0;
  transition: width .25s, background .25s;
}
.hero-dot.active {
  width: 1.5rem; background: #fff;
}

.announce {
  background: linear-gradient(90deg, var(--ink-mid), var(--primary));
  color: #fff; text-align: center;
  padding: 0.625rem; font-size: 0.875rem; font-weight: 500;
}
.announce code {
  background: rgba(255,255,255,.2); padding: 0.125rem 0.375rem;
  border-radius: 0.25rem; font-weight: 700; font-family: var(--font);
}

/* Sections */
.section { padding: 5rem 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 2.5rem; gap: 1rem; }
.eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .15em; color: var(--accent); font-weight: 500; margin-bottom: 0.5rem; }
.eyebrow-light { color: var(--green-soft); }
.section-head h2 { font-size: 1.875rem; font-weight: 700; }

/* Category grid */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat-card {
  position: relative; height: 13rem; border-radius: 1rem; overflow: hidden;
  background: var(--secondary); text-align: left; color: #fff;
}
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat-card:hover img { transform: scale(1.05); }
.cat-card-grad {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,28,22,.85), rgba(11,28,22,.2), transparent);
}
.cat-card-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 1rem; }
.cat-card-body .icon { color: var(--green-soft); margin-bottom: 0.5rem; font-size: 1.125rem; }
.cat-card-body strong { display: block; font-size: 0.875rem; }
.cat-card-body span { font-size: 0.75rem; color: rgba(255,255,255,.6); }

/* Product grid */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .product-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.product-card { text-align: left; display: block; width: 100%; cursor: pointer; }
.product-card .thumb { position: relative; height: 12rem; background: var(--secondary); overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product-card:hover .thumb img { transform: scale(1.05); }
.product-card .body { padding: 1rem; }
.product-card .cat { font-size: 0.75rem; color: var(--muted-fg); margin-bottom: 0.25rem; }
.product-card .name {
  font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card .meta { display: flex; align-items: center; gap: 0.375rem; margin-bottom: 0.75rem; }
.product-card .meta span { font-size: 0.75rem; color: var(--muted-fg); }
.product-card .row { display: flex; align-items: center; justify-content: space-between; }
.product-card .price { font-weight: 700; font-size: 1rem; }
.product-card .was { font-size: 0.75rem; color: var(--muted-fg); text-decoration: line-through; margin-left: 0.5rem; }

/* Van section */
.van-section {
  background:
    linear-gradient(160deg, #0B1C16 0%, #0F2E26 55%, #143028 100%);
  padding: 5rem 0; color: #fff;
}
.van-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .van-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .van-grid { grid-template-columns: repeat(3, 1fr); } }
.van-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 1rem; overflow: hidden; text-align: left; color: #fff;
  transition: .2s;
}
.van-card:hover { background: rgba(255,255,255,.08); transform: translateY(-4px); }
.van-card .thumb { position: relative; height: 13rem; background: var(--ink-mid); overflow: hidden; }
.van-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.van-card:hover .thumb img { transform: scale(1.05); }
.van-card .body { padding: 1.25rem; }
.van-card .base { font-size: 0.75rem; color: rgba(255,255,255,.4); margin-bottom: 0.25rem; }
.van-card h3 { font-family: var(--font-display); font-size: 1.125rem; margin-bottom: 0.75rem; }
.van-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 1rem; }
.van-specs div { background: rgba(255,255,255,.05); border-radius: 0.5rem; padding: 0.5rem 0.75rem; }
.van-specs span { display: block; font-size: 0.75rem; color: rgba(255,255,255,.4); }
.van-specs strong { font-size: 0.75rem; }
.van-price-row { display: flex; align-items: center; justify-content: space-between; }
.van-price-row .label { font-size: 0.75rem; color: rgba(255,255,255,.4); }
.van-price-row .price { font-size: 1.25rem; font-weight: 700; }
.van-price-row .view { color: var(--green-soft); font-size: 0.875rem; font-weight: 500; display: inline-flex; align-items: center; gap: 0.25rem; }

/* Trust */
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (min-width: 1024px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-item { text-align: center; padding: 1.5rem; }
.trust-icon {
  width: 3rem; height: 3rem; background: rgba(107,114,128,.12); border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem;
  color: var(--primary); font-size: 1.375rem;
}
.trust-item h4 { font-weight: 600; margin-bottom: 0.375rem; }
.trust-item p { font-size: 0.875rem; color: var(--muted-fg); }

/* Newsletter */
.newsletter {
  background:
    linear-gradient(135deg, #6B7280 0%, #4B5563 48%, #374151 100%);
  border-radius: 1rem; padding: 2.5rem; text-align: center;
  color: #fff; position: relative; overflow: hidden;
}
@media (min-width: 1024px) { .newsletter { padding: 3.5rem; } }
.newsletter::before {
  content: ""; position: absolute; top: 0; right: 0; width: 24rem; height: 24rem;
  background: #fff; border-radius: 999px; opacity: .1; transform: translate(50%, -50%);
}
.newsletter > * { position: relative; }
.newsletter h2 { font-size: 1.875rem; margin: 0.75rem 0 1rem; }
.newsletter p { color: rgba(255,255,255,.7); max-width: 28rem; margin: 0 auto 2rem; }
.newsletter-form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 28rem; margin: 0 auto; }
@media (min-width: 640px) { .newsletter-form { flex-direction: row; } }
.newsletter-form .input {
  flex: 1; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2);
  color: #fff;
}
.newsletter-form .input::placeholder { color: rgba(255,255,255,.4); }

/* Footer */
.footer {
  background: #0A0A0A;
  color: #fff; margin-top: 6rem;
}
.footer-grid {
  display: grid; gap: 3rem; padding: 4rem 0;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer p { font-size: 0.875rem; color: rgba(255,255,255,.6); margin: 1rem 0 1.25rem; }
.socials { display: flex; gap: 0.75rem; }
.socials a {
  width: 2.25rem; height: 2.25rem; background: rgba(255,255,255,.1); border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center;
}
.socials a:hover { background: var(--primary); }
.footer h4 { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem; }
.footer li { margin-bottom: 0.625rem; }
.footer li a, .footer li button { font-size: 0.875rem; color: rgba(255,255,255,.6); }
.footer li a:hover, .footer li button:hover { color: #fff; }
.footer-bottom {
  background: #fff;
  border-top: 1px solid #E5E7EB;
  padding: 1rem 0;
}
.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}
@media (min-width: 720px) {
  .footer-bottom-inner { flex-direction: row; }
}
.footer-bottom p {
  margin: 0;
  color: #6B7280;
  font-size: 0.8125rem;
}
.pay-methods {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.pay-method {
  display: inline-flex;
  width: 3.75rem;
  height: 2.35rem;
  border-radius: 0.45rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid #E5E7EB;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pay-method:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}
.pay-method svg {
  width: 100%;
  height: 100%;
  display: block;
}
.pay-method[title="PayPal"] { width: 4.5rem; }
.paypal-only-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid #E5E7EB;
  border-radius: 0.75rem;
  background: #F8FAFC;
}
.paypal-only-badge {
  width: 4.5rem;
  height: 2.35rem;
  flex-shrink: 0;
  border-radius: 0.4rem;
  overflow: hidden;
  border: 1px solid #E5E7EB;
  background: #fff;
}
.paypal-only-badge svg { width: 100%; height: 100%; display: block; }
.paypal-only-box strong { display: block; font-size: 0.9375rem; margin-bottom: 0.2rem; }
.paypal-only-box p { margin: 0; font-size: 0.8125rem; color: var(--muted-fg); line-height: 1.4; }

/* ── Shop page layout ── */
.page { padding: 2.5rem 0; }
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--muted-fg); margin-bottom: 1.5rem; flex-wrap: wrap; }
.breadcrumb a:hover, .breadcrumb button:hover { color: var(--fg); }
.page-title-row { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 640px) {
  .page-title-row { flex-direction: row; align-items: center; justify-content: space-between; }
}
.page-title-row h1 { font-size: 1.875rem; font-weight: 700; }
.shop-layout { display: flex; gap: 2rem; }
.filter-aside { display: none; width: 14rem; flex-shrink: 0; }
@media (min-width: 1024px) { .filter-aside { display: block; } }
.filter-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem;
  padding: 1.25rem; position: sticky; top: 6rem;
}
.filter-box h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.75rem; }
.filter-box .group { margin-bottom: 1.5rem; }
.check-row { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 0.5rem; cursor: pointer; font-size: 0.875rem; color: var(--muted-fg); }
.check-row:hover { color: var(--fg); }
.check-row input { accent-color: var(--primary); }
.shop-main { flex: 1; min-width: 0; }
.shop-count { font-size: 0.875rem; color: var(--muted-fg); margin-bottom: 1.25rem; }
.view-toggle { display: flex; border: 1px solid var(--border); border-radius: 0.5rem; overflow: hidden; }
.view-toggle button { padding: 0.5rem; color: var(--muted-fg); background: var(--card); }
.view-toggle button.active { background: var(--primary); color: #fff; }
.toolbar { display: flex; align-items: center; gap: 0.75rem; }
.product-list .product-card { display: flex; }
.product-list .thumb { width: 8rem; height: 7rem; flex-shrink: 0; }
.product-list .body { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* Detail pages */
.detail-grid { display: grid; gap: 3rem; margin-bottom: 4rem; }
@media (min-width: 1024px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.gallery-main {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--secondary);
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1rem;
  user-select: none;
  touch-action: pan-y;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-main img.gallery-fade {
  animation: galleryFade .28s ease;
}
@keyframes galleryFade {
  from { opacity: .45; }
  to { opacity: 1; }
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.92);
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  transition: background .15s ease, transform .15s ease;
}
.gallery-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}
.gallery-prev { left: 0.65rem; }
.gallery-next { right: 0.65rem; }
.gallery-counter {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  background: rgba(17,24,39,.72);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.gallery-thumbs button {
  aspect-ratio: 4/3; border-radius: 0.75rem; overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: var(--secondary);
  cursor: pointer;
}
.gallery-thumbs button.active { border-color: var(--primary); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-info .cat { font-size: 0.875rem; color: var(--muted-fg); margin-bottom: 0.5rem; }
.detail-info h1 { font-size: 1.875rem; margin-bottom: 0.75rem; }
.detail-info .price-lg { font-size: 2rem; font-weight: 700; margin: 1rem 0 0.25rem; }
.detail-info .stock { font-size: 0.875rem; color: var(--muted-fg); margin-bottom: 1.5rem; }
.qty-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.product-share {
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}
.product-share-label {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted-fg);
}
.product-share-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 0.4rem;
  color: #fff;
  border: 0;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.share-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  color: #fff;
}
.share-btn .icon,
.share-btn .icon svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}
.share-wa { background: #25D366; }
.share-wa:hover { background: #1ebe57; }
.share-tg { background: #229ED9; }
.share-tg:hover { background: #1b8fc4; }
.share-ig {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.share-ig .icon svg { stroke: #fff; fill: none; }
.qty-ctrl { display: flex; border: 1px solid var(--border); border-radius: 0.5rem; overflow: hidden; }
.qty-ctrl button { padding: 0.5rem 0.75rem; background: var(--card); }
.qty-ctrl button:hover { background: var(--secondary); }
.qty-ctrl span { padding: 0.5rem 0.75rem; font-weight: 500; min-width: 2.5rem; text-align: center; }
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.tabs button {
  padding: 0.75rem 1.25rem; font-size: 0.875rem; font-weight: 500; color: var(--muted-fg);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.spec-table { width: 100%; }
.spec-table tr { border-bottom: 1px solid var(--border); }
.spec-table td { padding: 0.75rem 0; font-size: 0.875rem; }
.spec-table td:first-child { color: var(--muted-fg); }
.spec-table td:last-child { font-weight: 500; text-align: right; }
.review { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.review-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.review-head strong { font-size: 0.875rem; }
.review-head span { font-size: 0.75rem; color: var(--muted-fg); }
.review p { font-size: 0.875rem; color: var(--muted-fg); }

/* Van detail */
.van-detail-grid { display: grid; gap: 2.5rem; margin-bottom: 4rem; }
@media (min-width: 1024px) { .van-detail-grid { grid-template-columns: 3fr 2fr; } }
.van-detail-grid .gallery-main { aspect-ratio: 16/10; }
.van-detail-grid .gallery-thumbs { grid-template-columns: repeat(3, 1fr); }
.spec-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.5rem; }
.spec-pills div { background: var(--secondary); border-radius: 0.75rem; padding: 0.75rem; }
.spec-pills span { display: block; font-size: 0.75rem; color: var(--muted-fg); }
.spec-pills strong { font-size: 0.875rem; }
.feature-list { display: flex; flex-direction: column; gap: 0.625rem; }
.feature-list li { display: flex; align-items: center; gap: 0.75rem; font-size: 0.875rem; color: var(--muted-fg); }
.feature-check {
  width: 1.25rem; height: 1.25rem; background: rgba(107,114,128,.12); border-radius: 999px;
  display: flex; align-items: center; justify-content: center; color: var(--primary); flex-shrink: 0; font-size: 0.7rem;
}
.two-cols { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .two-cols { grid-template-columns: 1fr 1fr; } }
.two-cols h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }

/* Cart */
.cart-layout { display: grid; gap: 2rem; }
@media (min-width: 1024px) { .cart-layout { grid-template-columns: 2fr 1fr; } }
.cart-item {
  display: flex; gap: 1rem; padding: 1.25rem;
  background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem;
}
.cart-item .thumb { width: 6rem; height: 5rem; border-radius: 0.75rem; overflow: hidden; background: var(--secondary); flex-shrink: 0; }
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .sku { font-size: 0.75rem; color: var(--muted-fg); }
.cart-item .name { font-weight: 600; font-size: 0.875rem; margin-bottom: 0.75rem; }
.cart-item .row { display: flex; align-items: center; justify-content: space-between; }
.summary-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem;
  padding: 1.5rem; position: sticky; top: 6rem;
}
.summary-box h2 { font-size: 1.125rem; margin-bottom: 1.25rem; }
.summary-line { display: flex; justify-content: space-between; font-size: 0.875rem; margin-bottom: 0.75rem; }
.summary-line span:first-child { color: var(--muted-fg); }
.summary-total { border-top: 1px solid var(--border); padding-top: 0.75rem; display: flex; justify-content: space-between; align-items: center; }
.summary-total strong:last-child { font-size: 1.25rem; }
.promo-row { display: flex; gap: 0.5rem; margin: 1.25rem 0; }
.empty-state { text-align: center; padding: 6rem 1rem; }
.empty-state .icon { font-size: 3rem; color: var(--muted); margin-bottom: 1rem; }
.empty-state h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--muted-fg); margin-bottom: 1.5rem; }

/* Checkout */
.steps { display: flex; align-items: center; justify-content: center; margin-bottom: 3rem; flex-wrap: wrap; gap: 0.25rem; }
.step { display: flex; flex-direction: column; align-items: center; }
.step-dot {
  width: 2.25rem; height: 2.25rem; border-radius: 999px; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 700;
  color: var(--muted-fg);
}
.step.active .step-dot { border-color: var(--primary); color: var(--primary); }
.step.done .step-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.step label { font-size: 0.75rem; margin-top: 0.375rem; color: var(--muted-fg); font-weight: 500; }
.step.active label { color: var(--primary); }
.step-line { width: 4rem; height: 2px; background: var(--border); margin: 0 0.5rem 1.25rem; }
.step-line.done { background: var(--primary); }
.checkout-layout { display: grid; gap: 2rem; }
@media (min-width: 1024px) { .checkout-layout { grid-template-columns: 2fr 1fr; } }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.75rem; }
.panel h2 { font-size: 1.25rem; margin-bottom: 1.5rem; }
.confirm-box { text-align: center; padding: 4rem 2rem; }
.confirm-box .check {
  width: 4rem; height: 4rem; background: #d1fae5; color: #065f46; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; font-size: 1.5rem;
}

/* Account */
.account-grid { display: grid; gap: 2rem; }
@media (min-width: 1024px) { .account-grid { grid-template-columns: 1fr 2fr; } }
.account-card { padding: 1.5rem; }
.account-avatar {
  width: 4rem; height: 4rem; background: var(--primary); color: #fff; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700;
  margin-bottom: 1rem;
}
.order-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--border);
}
.order-row:last-child { border-bottom: none; }

/* ── Buyer My Page portal ── */
#buyer-shell { background: var(--bg); }
.buyer-sidebar {
  width: 15rem;
  background: #0F2A33;
  color: #E8F1F4;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}
.buyer-brand {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.buyer-brand .logo-mark { background: #3D7A8C; color: #fff; }
.buyer-brand strong { display: block; font-size: 0.875rem; }
.buyer-brand span { font-size: 0.625rem; text-transform: uppercase; letter-spacing: .12em; opacity: .5; }
.buyer-nav { padding: 1rem 0.75rem; flex: 1; overflow-y: auto; }
.buyer-nav .group-label {
  font-size: 0.625rem; text-transform: uppercase; letter-spacing: .12em;
  opacity: .45; padding: 0.5rem 0.75rem; margin-top: 0.75rem;
}
.buyer-nav a {
  display: flex; align-items: center; gap: 0.75rem; width: 100%;
  padding: 0.625rem 0.75rem; border-radius: 0.5rem; font-size: 0.875rem;
  color: rgba(232,241,244,.72); text-align: left;
}
.buyer-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.buyer-nav a.active { background: #3D7A8C; color: #fff; }
.buyer-user {
  padding: 1rem; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 0.75rem;
}
.buyer-user-av {
  width: 2.25rem; height: 2.25rem; border-radius: 999px; object-fit: cover; background: #244750;
}
.buyer-user p { font-size: 0.75rem; margin: 0; }
.buyer-user span { font-size: 0.625rem; opacity: .55; display: block; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buyer-main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.buyer-topbar {
  height: 3.5rem; border-bottom: 1px solid var(--border); background: var(--card);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1.5rem; flex-shrink: 0;
}
.buyer-topbar h1 { font-family: var(--font); font-size: 1rem; font-weight: 600; margin: 0; }
.buyer-topbar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.buyer-content { flex: 1; overflow-y: auto; padding: 1.5rem; background: var(--bg); }
.buyer-welcome {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.25rem; align-items: stretch;
}
.buyer-hello { margin: 0; font-size: 0.875rem; color: var(--muted-fg); }
.buyer-welcome h2 { margin: 0.15rem 0 0.35rem; font-size: 1.5rem; }
.buyer-points-card {
  min-width: 14rem; background: linear-gradient(145deg, #0F2A33, #3D7A8C);
  color: #fff; border-radius: 0.75rem; padding: 1rem 1.15rem;
  display: flex; flex-direction: column; gap: 0.45rem;
}
.buyer-points-top { display: flex; flex-direction: column; }
.buyer-points-top strong { font-size: 1.5rem; line-height: 1.1; }
.buyer-points-top span { font-size: 0.75rem; opacity: .8; }
.buyer-points-card .share-bar { background: rgba(255,255,255,.2); }
.buyer-points-card .share-bar span { background: #F0C56A; }
.buyer-points-card .muted-sm { color: rgba(255,255,255,.7); }
.buyer-activity { padding: 0.75rem 1.15rem 1rem; display: grid; gap: 0.85rem; }
.buyer-activity-row { display: flex; gap: 0.75rem; align-items: flex-start; }
.buyer-activity-row strong { display: block; font-size: 0.8125rem; font-weight: 500; }
.buyer-activity-dot {
  width: 0.55rem; height: 0.55rem; border-radius: 999px; margin-top: 0.35rem; flex-shrink: 0;
  background: #3D7A8C;
}
.buyer-activity-dot[data-type="done"] { background: #059669; }
.buyer-activity-dot[data-type="ship"] { background: #D4780A; }
.buyer-activity-dot[data-type="wish"] { background: #7C3AED; }
.buyer-activity-dot[data-type="points"] { background: #F0C56A; }
.buyer-reco-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; padding: 1rem;
}
@media (min-width: 900px) {
  .buyer-reco-grid { grid-template-columns: repeat(4, 1fr); }
}
.buyer-reco-card {
  border: 1px solid var(--border); border-radius: 0.65rem; overflow: hidden; background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}
.buyer-reco-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.buyer-reco-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.buyer-reco-card div { padding: 0.65rem 0.75rem; }
.buyer-reco-card strong { display: block; font-size: 0.75rem; margin-bottom: 0.25rem; line-height: 1.35; }
.buyer-reco-card span { font-size: 0.8125rem; font-weight: 700; color: var(--primary); }
.buyer-wish-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.buyer-wish-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem; overflow: hidden;
}
.buyer-wish-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.buyer-wish-body { padding: 0.9rem 1rem 1rem; display: grid; gap: 0.35rem; }
.buyer-wish-body a { color: inherit; }
.buyer-wish-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.5rem; }
.buyer-garage-hero {
  position: relative; border-radius: 0.85rem; overflow: hidden; margin-bottom: 1.25rem; min-height: 220px;
}
.buyer-garage-hero img { width: 100%; height: 260px; object-fit: cover; display: block; }
.buyer-garage-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,42,51,.88), rgba(15,42,51,.2) 55%, transparent);
  color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.25rem 1.4rem;
}
.buyer-garage-tag {
  display: inline-flex; width: fit-content; font-size: 0.7rem; text-transform: uppercase; letter-spacing: .08em;
  background: rgba(61,122,140,.85); padding: 0.2rem 0.55rem; border-radius: 999px; margin-bottom: 0.45rem;
}
.buyer-garage-overlay h2 { margin: 0 0 0.25rem; font-size: 1.5rem; }
.buyer-garage-overlay p { margin: 0; opacity: .85; font-size: 0.9rem; }
.buyer-spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; padding: 1.15rem; }
.buyer-spec {
  background: var(--secondary); border-radius: 0.55rem; padding: 0.75rem 0.85rem;
}
.buyer-spec span { display: block; font-size: 0.7rem; color: var(--muted-fg); margin-bottom: 0.2rem; }
.buyer-spec strong { font-size: 0.9rem; }
.buyer-upgrade-list { padding: 0.5rem 0; }
.buyer-upgrade-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 1.15rem; border-bottom: 1px solid var(--border);
}
.buyer-upgrade-row:last-child { border-bottom: none; }
.buyer-upgrade-row strong { display: block; font-size: 0.875rem; }
.buyer-profile-card {
  display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 1.35rem;
}
.buyer-profile-av { border-radius: 999px; background: #E5E7EB; }
.buyer-profile-card h3 { margin: 0 0 0.25rem; font-size: 1.15rem; }
.buyer-profile-card p { margin: 0.2rem 0; font-size: 0.875rem; }
.buyer-profile-actions {
  display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1.25rem 1.25rem;
}
.buyer-member-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; padding: 1.15rem;
}
.buyer-member-stats > div {
  background: var(--secondary); border-radius: 0.55rem; padding: 0.85rem;
}
.buyer-member-stats span { display: block; font-size: 0.7rem; color: var(--muted-fg); margin-bottom: 0.25rem; }
.buyer-member-stats strong { font-size: 1.1rem; }

@media (max-width: 900px) {
  .buyer-sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: min(18rem, 86vw);
    z-index: 120;
    transform: translateX(-105%);
    transition: transform .28s ease;
    box-shadow: 8px 0 28px rgba(0,0,0,.18);
  }
  .buyer-sidebar.open { transform: translateX(0); }
  .buyer-content { padding: 1rem; }
  .buyer-topbar { padding: 0 0.85rem 0 0.65rem; }
  .buyer-topbar-actions .btn { padding: 0.35rem 0.55rem; font-size: 0.7rem; }
  .buyer-points-card { min-width: 0; width: 100%; }
  .buyer-spec-grid { grid-template-columns: 1fr; }
  .buyer-upgrade-row { flex-direction: column; align-items: flex-start; }
  .buyer-profile-card { flex-direction: column; align-items: center; text-align: center; }
}

/* ── ERP ── */
.erp-sidebar {
  width: 15rem; background: var(--sidebar); color: var(--sidebar-fg);
  display: flex; flex-direction: column; flex-shrink: 0; overflow-y: auto;
}
.erp-brand { padding: 1.25rem; border-bottom: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: 0.75rem; }
.erp-brand .logo-mark { background: var(--accent); }
.erp-brand strong { display: block; font-family: var(--font-display); font-size: 0.875rem; }
.erp-brand span { font-size: 0.625rem; text-transform: uppercase; letter-spacing: .12em; opacity: .5; }
.erp-nav { padding: 1rem 0.75rem; flex: 1; overflow-y: auto; }
.erp-nav .group-label {
  font-size: 0.625rem; text-transform: uppercase; letter-spacing: .12em;
  opacity: .45; padding: 0.5rem 0.75rem; margin-top: 0.75rem;
}
.erp-nav a, .erp-nav button {
  display: flex; align-items: center; gap: 0.75rem; width: 100%;
  padding: 0.625rem 0.75rem; border-radius: 0.5rem; font-size: 0.875rem;
  color: rgba(240,237,230,.7); text-align: left;
}
.erp-nav a:hover, .erp-nav button:hover { background: rgba(255,255,255,.08); color: #fff; }
.erp-nav a.active, .erp-nav button.active { background: var(--primary); color: #fff; }
.erp-user {
  padding: 1rem; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 0.75rem;
}
.erp-user .av {
  width: 2rem; height: 2rem; background: var(--accent); border-radius: 999px;
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700;
}
.erp-user p { font-size: 0.75rem; margin: 0; }
.erp-user span { font-size: 0.625rem; opacity: .5; }
.erp-main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.erp-topbar {
  height: 3.5rem; border-bottom: 1px solid var(--border); background: var(--card);
  display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; flex-shrink: 0;
}
.erp-topbar h1 { font-family: var(--font); font-size: 1rem; font-weight: 600; }
.erp-content { flex: 1; overflow-y: auto; padding: 1.5rem; background: var(--bg); }
.admin-note {
  font-size: 0.8125rem;
  color: var(--muted-fg);
  background: #F3F4F6;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1rem;
}
.admin-note code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: #fff;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.admin-toolbar .input { max-width: 16rem; min-width: 10rem; }
.admin-actions { display: flex; gap: 0.25rem; }
.btn-icon.danger:hover { background: #FEE2E2; color: #DC2626; }
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.admin-modal.hidden { display: none; }
.admin-modal-card {
  width: min(28rem, 100%);
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.admin-modal-card.admin-modal-wide { width: min(36rem, 100%); }
.admin-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  color: var(--fg) !important;
}
.admin-check input { width: auto; }
.admin-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
}
.admin-modal-head h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.admin-form {
  display: grid;
  gap: 0.75rem;
  padding: 1.15rem;
}
.admin-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-fg);
}
.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.admin-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.perf-score-grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .perf-score-grid { grid-template-columns: 1fr 1fr; }
}
.perf-score-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.15rem;
}
.perf-score-ring {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: conic-gradient(#059669 calc(var(--s, 90) * 1%), #E5E7EB 0);
  position: relative;
}
.perf-score-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  background: #fff;
  border-radius: inherit;
}
.perf-score-ring strong {
  position: relative;
  z-index: 1;
  font-size: 0.875rem;
}
.perf-meta { font-size: 0.75rem; color: var(--muted-fg); margin-top: 0.2rem; }
.muted-sm { font-size: 0.75rem; color: var(--muted-fg); }
.admin-person { display: flex; align-items: center; gap: 0.65rem; }
.admin-avatar, .admin-thumb {
  width: 2.25rem; height: 2.25rem; border-radius: 0.45rem;
  object-fit: cover; background: #E5E7EB; flex-shrink: 0;
}
.admin-avatar { border-radius: 999px; }
.admin-split {
  display: grid; gap: 1.25rem; margin-bottom: 1.5rem;
}
@media (min-width: 1100px) {
  .admin-split { grid-template-columns: 1.4fr 1fr; }
}
.admin-split .table-card { margin-bottom: 0; }
.kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-card.compact { padding: 1rem 1.15rem; }
.kpi-card.compact .value { font-size: 1.35rem; margin-bottom: 0.15rem; }
.kpi-card.compact .label { font-size: 0.8rem; color: var(--muted-fg); }
.top-seller-list { padding: 0.5rem 0; }
.top-seller-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 1.15rem; border-bottom: 1px solid var(--border);
}
.top-seller-row:last-child { border-bottom: none; }
.top-seller-row .rank {
  width: 1.5rem; font-size: 0.75rem; font-weight: 700; color: var(--muted-fg);
}
.top-seller-meta { flex: 1; min-width: 0; }
.top-seller-meta strong {
  display: block; font-size: 0.8125rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.top-seller-rev { font-size: 0.8125rem; white-space: nowrap; }
.alert-item-rich {
  flex-direction: row; align-items: flex-start; gap: 0.75rem;
}
.alert-item-rich > div { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.chart-tall { height: 260px; }
.funnel-list { display: grid; gap: 0.75rem; margin-top: 0.5rem; }
.funnel-row { display: grid; grid-template-columns: 1fr; gap: 0.35rem; }
.funnel-label { display: flex; justify-content: space-between; font-size: 0.8125rem; }
.funnel-bar {
  height: 0.55rem; background: #E5E7EB; border-radius: 999px; overflow: hidden;
}
.funnel-bar span { display: block; height: 100%; border-radius: inherit; }
.share-cell { display: flex; align-items: center; gap: 0.5rem; min-width: 7rem; }
.share-bar {
  flex: 1; height: 0.4rem; background: #E5E7EB; border-radius: 999px; overflow: hidden;
}
.share-bar span { display: block; height: 100%; background: #4B5563; }
.vital-badges {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0.75rem;
}
.vital-badge {
  border: 1px solid var(--border); border-radius: 0.65rem; padding: 0.85rem;
  display: flex; flex-direction: column; gap: 0.15rem;
}
.vital-badge strong { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-fg); }
.vital-badge span { font-size: 1.25rem; font-weight: 700; }
.vital-badge em { font-style: normal; font-size: 0.75rem; font-weight: 600; }
.vital-badge.good { background: #ECFDF5; border-color: #A7F3D0; }
.vital-badge.good em { color: #059669; }
.vital-badge.ok { background: #FFFBEB; border-color: #FDE68A; }
.vital-badge.ok em { color: #D97706; }
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
@media (min-width: 1280px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }
.kpi-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem;
  padding: 1.25rem; box-shadow: var(--shadow);
}
.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; }
.kpi-icon {
  width: 2.5rem; height: 2.5rem; border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center; font-size: 1.125rem;
}
.kpi-icon.green { background: rgba(107,114,128,.12); color: var(--primary); }
.kpi-icon.orange { background: rgba(212,120,10,.12); color: var(--accent); }
.kpi-icon.blue { background: rgba(61,122,140,.12); color: var(--sky); }
.kpi-icon.amber { background: #fef3c7; color: #d97706; }
.kpi-trend { font-size: 0.75rem; font-weight: 500; display: inline-flex; align-items: center; gap: 0.25rem; }
.kpi-trend.up { color: #059669; }
.kpi-trend.down { color: #ef4444; }
.kpi-card .value { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.125rem; }
.kpi-card .label { font-size: 0.875rem; font-weight: 500; }
.kpi-card .sub { font-size: 0.75rem; color: var(--muted-fg); }
.chart-row { display: grid; gap: 1.25rem; margin-bottom: 1.5rem; }
@media (min-width: 1280px) { .chart-row { grid-template-columns: 2fr 1fr; } }
.chart-card { background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.5rem; }
.chart-card h3 { font-family: var(--font); font-size: 1rem; font-weight: 600; }
.chart-card .sub { font-size: 0.875rem; color: var(--muted-fg); margin-bottom: 1.5rem; }
.chart-wrap { position: relative; height: 220px; }
.legend { margin-top: 0.5rem; }
.legend-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.legend-row .left { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--muted-fg); }
.legend-dot { width: 0.625rem; height: 0.625rem; border-radius: 999px; }
.legend-row strong { font-size: 0.75rem; }
.table-card { background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem; overflow: hidden; margin-bottom: 1.5rem; }
.table-head {
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.table-head h3 { font-family: var(--font); font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.table-scroll { overflow-x: auto; }
.data-table th {
  text-align: left; font-size: 0.75rem; font-weight: 600; color: var(--muted-fg);
  text-transform: uppercase; letter-spacing: .04em; padding: 0.75rem 1.25rem;
  background: rgba(227,235,231,.7); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table td {
  padding: 0.875rem 1.25rem; font-size: 0.875rem; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(227,235,231,.45); }
.mono { font-family: var(--font-mono); color: var(--primary); font-weight: 500; }
.alert-grid { display: grid; gap: 0.75rem; padding: 1.25rem; }
@media (min-width: 640px) { .alert-grid { grid-template-columns: repeat(3, 1fr); } }
.alert-item {
  background: var(--secondary); border-radius: 0.75rem; padding: 1rem;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.alert-item strong { font-size: 0.875rem; }
.alert-item span { font-size: 0.75rem; color: var(--muted-fg); }

@media (max-width: 900px) {
  .erp-sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: min(18rem, 86vw);
    z-index: 120;
    transform: translateX(-105%);
    transition: transform .28s ease;
    box-shadow: 8px 0 28px rgba(0,0,0,.18);
  }
  .erp-sidebar.open { transform: translateX(0); }
  .erp-content { padding: 1rem; }
  .erp-topbar { padding: 0 0.85rem 0 0.65rem; }
  .admin-form-row { grid-template-columns: 1fr; }
  .kpi-grid-3 { grid-template-columns: 1fr; }
  .admin-toolbar .input { max-width: none; min-width: 0; width: 100%; }
}

/* Toast */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100;
  background: var(--fg); color: #fff; padding: 0.875rem 1.25rem;
  border-radius: 0.75rem; font-size: 0.875rem; box-shadow: var(--shadow-md);
  transform: translateY(120%); opacity: 0; transition: .3s;
  max-width: min(22rem, calc(100vw - 2rem));
}
.toast.show { transform: translateY(0); opacity: 1; }
@media (max-width: 900px) {
  .toast {
    left: 1rem;
    right: 1rem;
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
    max-width: none;
    text-align: center;
  }
}

/* Portal mobile drawers */
.portal-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.portal-menu-btn {
  display: none;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.5rem;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  background: var(--secondary);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.portal-menu-btn:hover { background: #E5E7EB; }
.portal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(15, 23, 42, 0.45);
  border: 0;
  padding: 0;
}
.portal-backdrop.show { display: block; }
@media (max-width: 900px) {
  .portal-menu-btn { display: inline-flex; }
}
body.portal-nav-open,
body.sheet-open { overflow: hidden; }

/* Mobile sheets (More / Filters) */
.mobile-sheet-overlay,
.filter-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(17, 24, 39, 0.48);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.mobile-sheet-overlay.hidden,
.filter-sheet-overlay.hidden { display: none; }
.mobile-sheet,
.filter-sheet {
  width: 100%;
  max-width: 28rem;
  max-height: min(88vh, 40rem);
  background: #fff;
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -8px 32px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  animation: sheetUp .28s ease;
}
@keyframes sheetUp {
  from { transform: translateY(18px); opacity: .6; }
  to { transform: none; opacity: 1; }
}
.mobile-sheet-handle {
  width: 2.5rem;
  height: 0.28rem;
  background: #D1D5DB;
  border-radius: 999px;
  margin: 0.55rem auto 0;
}
.mobile-sheet-head,
.filter-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid #E5E7EB;
}
.mobile-sheet-head h2,
.filter-sheet-head h2 {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
}
.mobile-sheet-close {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.45rem;
  background: #F3F4F6;
  font-size: 1.35rem;
  line-height: 1;
  color: #4B5563;
  cursor: pointer;
}
.mobile-sheet-close:hover { background: #E5E7EB; color: #111; }
.mobile-sheet-body,
.filter-sheet-body {
  overflow-y: auto;
  padding: 0.5rem 0.75rem 1rem;
  -webkit-overflow-scrolling: touch;
}
.filter-sheet-foot {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #E5E7EB;
  background: #fff;
}
.mobile-sheet-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 0.75rem;
  border-radius: 0.65rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #212121;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.mobile-sheet-link:hover { background: #F3F4F6; }
.mobile-sheet-link.hidden { display: none !important; }
.msl-ico {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  background: #F3F4F6;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.filter-open-btn { display: none; }
@media (max-width: 1023px) {
  .filter-open-btn { display: inline-flex; }
}
.filter-sheet .filter-box {
  border: 0;
  padding: 0.5rem 0.35rem 1rem;
  position: static;
  box-shadow: none;
  background: transparent;
}
.account-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.75rem;
}
.account-quick-links a {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
}
.account-quick-links a:hover { background: var(--secondary); }

@media (max-width: 640px) {
  .page { padding: 1.25rem 0 2rem; }
  .page-title-row h1 { font-size: 1.35rem; }
  .toolbar { flex-wrap: wrap; width: 100%; }
  .toolbar .select { flex: 1; min-width: 8rem; }
  .cart-item { flex-direction: column; }
  .cart-item .thumb { width: 100%; height: 9rem; }
  .steps { gap: 0; margin-bottom: 1.75rem; }
  .step-line { width: 1.25rem; margin: 0 0.2rem 1.1rem; }
  .step label { font-size: 0.625rem; max-width: 3.6rem; text-align: center; line-height: 1.2; }
  .step-dot { width: 1.85rem; height: 1.85rem; font-size: 0.75rem; }
  .panel { padding: 1.15rem; }
  .product-list .product-card { flex-direction: column; }
  .product-list .thumb { width: 100%; height: auto; aspect-ratio: 16/10; }
  .promo-row { flex-direction: column; }
  .detail-info h1 { font-size: 1.35rem; }
  .qty-ctrl { flex-wrap: wrap; }
}

.bnav-item {
  cursor: pointer;
  background: transparent;
  border: 0;
  font-family: inherit;
}
