/* ========================
   Inter Supply (1992) — Design System
   Professional Navy / White / Corporate
======================== */
:root {
  /* PRIMARY: Forest green matching logo */
  --navy-900: #022b18;
  --navy-800: #064d29;
  --navy-700: #0a6e3d;  /* PRIMARY - matches logo green */
  --navy-600: #138a4c;
  --blue-500: #16a34a;  /* ACCENT - vibrant green */
  --blue-100: #dcfce7;
  --blue-50: #f0fdf4;

  /* keep the old vars (some places still use them) */
  --green: #0a6e3d;
  --green-bg: #d1fae5;

  --ink-950: #0a1224;
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #eef2f7;
  --ink-50:  #f6f8fb;
  --white:   #ffffff;

  --amber: #b45309;
  --amber-bg: #fef3c7;
  --red: #b91c1c;
  --red-bg: #fee2e2;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15,23,42,0.03);
  --shadow:    0 4px 14px rgba(10, 110, 61, 0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-lg: 0 14px 40px rgba(10, 110, 61, 0.12), 0 4px 8px rgba(15,23,42,0.04);
  --glow-primary: 0 0 0 4px rgba(22, 163, 74, 0.18);

  --font-th: "IBM Plex Sans Thai", "Inter", system-ui, sans-serif;
  --font-en: "Inter", "IBM Plex Sans Thai", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-th);
  background: var(--ink-50);
  color: var(--ink-900);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ========================
   APP SHELL
======================== */
.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  background: var(--navy-700);
  color: var(--white);
  border-bottom: 1px solid var(--navy-800);
}
.topbar-strip {
  background: var(--navy-900);
  color: rgba(255,255,255,0.78);
  font-size: 12px;
  padding: 6px 0;
}
.topbar-strip .wrap { max-width: 1400px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; gap: 24px; }
.topbar-strip .right { display: flex; gap: 18px; }
.topbar-strip a { display: inline-flex; align-items: center; gap: 6px; }
.topbar-strip a:hover { color: white; }

.topbar-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.brand-name { line-height: 1.1; }
.brand-name .th { font-weight: 600; font-size: 15px; }
.brand-name .en { font-size: 11px; opacity: 0.7; font-family: var(--font-en); letter-spacing: 0.04em; text-transform: uppercase; }

.topbar-search { flex: 1; max-width: 560px; position: relative; }
.topbar-search input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  color: white;
  outline: none;
}
.topbar-search input::placeholder { color: rgba(255,255,255,0.55); }
.topbar-search input:focus { background: white; color: var(--ink-900); border-color: white; }
.topbar-search input:focus::placeholder { color: var(--ink-400); }
.topbar-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); opacity: 0.7; }
.topbar-search input:focus + .icon { color: var(--ink-500); opacity: 1; }

.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative;
  border: none; background: transparent; color: white;
  padding: 8px 10px;
  border-radius: 8px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  transition: background 0.15s;
}
.icon-btn:hover { background: rgba(255,255,255,0.12); }
.icon-btn .badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #f97316; color: white;
  border-radius: 9px; font-size: 11px;
  display: grid; place-items: center; font-weight: 600;
  font-family: var(--font-en);
}

.nav {
  background: white;
  border-bottom: 1px solid var(--ink-200);
}
.nav-wrap { max-width: 1400px; margin: 0 auto; padding: 0 24px; display: flex; gap: 4px; }
.nav a {
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-700);
  border-bottom: 2px solid transparent;
  display: flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.nav a:hover { color: var(--navy-700); }
.nav a.active { color: var(--navy-700); border-bottom-color: var(--navy-700); font-weight: 600; }
.nav .spacer { flex: 1; }
.nav .pill { background: var(--blue-50); color: var(--navy-700); padding: 2px 8px; border-radius: 999px; font-size: 11px; }

/* main content */
main { flex: 1; }
.container { max-width: 1400px; margin: 0 auto; padding: 24px; }
.container-narrow { max-width: 1100px; margin: 0 auto; padding: 24px; }

/* page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; margin: 0 0 4px; font-weight: 700; letter-spacing: -0.01em; }
.page-head .crumb { font-size: 12px; color: var(--ink-500); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.page-head .crumb a { color: var(--ink-500); cursor: pointer; }
.page-head .crumb a:hover { color: var(--navy-700); }

/* ========================
   BUTTONS
======================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
  background: white;
  color: var(--ink-900);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.btn:hover { background: var(--ink-100); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--navy-700); color: white; border-color: var(--navy-700);
}
.btn-primary:hover { background: var(--navy-800); border-color: var(--navy-800); }

.btn-accent {
  background: var(--blue-500); color: white; border-color: var(--blue-500);
}
.btn-accent:hover { background: #1761d4; border-color: #1761d4; }

.btn-outline {
  background: white; color: var(--navy-700); border-color: var(--ink-200);
}
.btn-outline:hover { border-color: var(--navy-700); background: var(--blue-50); }

.btn-ghost { background: transparent; color: var(--ink-700); border: none; }
.btn-ghost:hover { background: var(--ink-100); }

.btn-danger { background: white; color: var(--red); border-color: var(--ink-200); }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red); }

.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-block { width: 100%; }

/* ========================
   CARD
======================== */
.card {
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }
.card-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ink-200);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.card-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }

/* ========================
   PRODUCT CARDS
======================== */
.catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: flex-start; }

.filter-card { position: sticky; top: 16px; }
.filter-group { padding: 16px 20px; border-bottom: 1px solid var(--ink-200); }
.filter-group:last-child { border-bottom: none; }
.filter-group h4 { font-size: 12px; font-weight: 600; color: var(--ink-500); margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.filter-item { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 13.5px; cursor: pointer; color: var(--ink-700); }
.filter-item input[type="checkbox"], .filter-item input[type="radio"] { accent-color: var(--navy-700); width: 16px; height: 16px; }
.filter-item:hover { color: var(--navy-700); }
.filter-item .count { margin-left: auto; color: var(--ink-400); font-size: 12px; font-family: var(--font-en); }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .result-count { color: var(--ink-500); font-size: 13px; }
.toolbar .spacer { flex: 1; }
.toolbar select {
  padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--ink-200);
  background: white; font-size: 13px;
}
.toolbar .view-toggle { display: flex; background: white; border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 2px; }
.toolbar .view-toggle button { border: none; background: transparent; padding: 6px 10px; border-radius: 6px; color: var(--ink-500); }
.toolbar .view-toggle button.active { background: var(--navy-700); color: white; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.product-card {
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: all 0.15s;
  cursor: pointer;
}
.product-card:hover {
  border-color: var(--blue-500);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.product-img {
  aspect-ratio: 1 / 1;
  background: var(--ink-50);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--ink-200);
}
.product-img .ph {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(11, 58, 130, 0.04) 12px 13px),
    var(--ink-50);
  display: grid; place-items: center;
  color: var(--ink-400);
  font-family: var(--font-mono); font-size: 11px;
}
.product-tag {
  position: absolute; top: 8px; left: 8px;
  background: var(--navy-700); color: white;
  padding: 3px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.product-tag.new { background: var(--green); }
.product-tag.sale { background: #dc2626; }
.product-tag.hot { background: #ea580c; }
.product-fav {
  position: absolute; top: 8px; right: 8px;
  width: 32px; height: 32px;
  background: white; border: 1px solid var(--ink-200); border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  color: var(--ink-400);
}
.product-fav:hover { color: #dc2626; border-color: #dc2626; }
.product-fav.on { color: #dc2626; border-color: #dc2626; }

.product-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-sku { font-family: var(--font-mono); font-size: 11px; color: var(--ink-500); letter-spacing: 0.02em; }
.product-name { font-size: 14px; font-weight: 600; color: var(--ink-900); line-height: 1.35; min-height: 2.7em; text-wrap: pretty; }
.product-desc { font-size: 12px; color: var(--ink-500); line-height: 1.4; min-height: 2.8em; }
.product-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }
.product-price { font-family: var(--font-en); font-weight: 700; font-size: 17px; color: var(--navy-800); letter-spacing: -0.01em; }
.product-price .unit { font-size: 11px; font-weight: 500; color: var(--ink-500); margin-left: 4px; }
.product-price-old { font-family: var(--font-en); font-size: 12px; color: var(--ink-400); text-decoration: line-through; }
.product-stock { font-size: 11px; color: var(--green); display: flex; align-items: center; gap: 4px; }
.product-stock.low { color: var(--amber); }
.product-stock.out { color: var(--red); }
.product-actions { display: flex; gap: 6px; padding: 0 14px 14px; }
.product-actions .btn { flex: 1; padding: 8px 10px; font-size: 12.5px; }

.dealer-price-row {
  background: linear-gradient(180deg, #fff7e6 0%, #fef3c7 100%);
  border-top: 1px dashed #d97706;
  border-bottom: 1px dashed #d97706;
  padding: 6px 14px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
}
.dealer-price-row .label { color: var(--amber); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.dealer-price-row .price { font-family: var(--font-en); font-weight: 700; color: var(--amber); }

/* ========================
   PRODUCT DETAIL
======================== */
.pdp-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: flex-start; }
.pdp-gallery { display: flex; flex-direction: column; gap: 12px; }
.pdp-main-img {
  aspect-ratio: 1 / 1;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ink-200);
  position: relative;
  overflow: hidden;
}
.pdp-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pdp-thumb {
  aspect-ratio: 1 / 1;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--ink-200);
  position: relative;
  cursor: pointer;
}
.pdp-thumb.active { border-color: var(--navy-700); box-shadow: 0 0 0 2px var(--blue-100); }

.pdp-info h1 { font-size: 26px; margin: 8px 0 6px; line-height: 1.2; letter-spacing: -0.01em; }
.pdp-info .pdp-sku { font-family: var(--font-mono); color: var(--ink-500); font-size: 12.5px; }
.pdp-info .pdp-rating { display: flex; align-items: center; gap: 8px; margin: 8px 0 16px; font-size: 13px; color: var(--ink-500); }
.pdp-info .stars { color: #f59e0b; }
.pdp-price-card {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin: 16px 0;
}
.pdp-price { font-family: var(--font-en); font-weight: 700; font-size: 32px; color: var(--navy-800); letter-spacing: -0.02em; }
.pdp-price .vat { font-size: 12px; color: var(--ink-500); font-weight: 500; margin-left: 8px; }
.pdp-price-old { font-family: var(--font-en); font-size: 16px; color: var(--ink-400); text-decoration: line-through; }
.pdp-dealer-callout {
  margin-top: 10px;
  background: #fef3c7; color: var(--amber);
  padding: 8px 12px; border-radius: 8px;
  font-size: 12.5px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}

.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--ink-200); border-radius: var(--radius); overflow: hidden; background: white; }
.qty-stepper button { border: none; background: transparent; width: 36px; height: 38px; color: var(--ink-700); font-size: 16px; }
.qty-stepper button:hover { background: var(--ink-100); color: var(--navy-700); }
.qty-stepper input { width: 50px; height: 38px; border: none; text-align: center; font-family: var(--font-en); font-weight: 600; outline: none; border-left: 1px solid var(--ink-200); border-right: 1px solid var(--ink-200); }

.pdp-actions { display: flex; gap: 10px; margin-top: 12px; }

.pdp-spec { width: 100%; border-collapse: collapse; margin-top: 16px; }
.pdp-spec tr { border-bottom: 1px solid var(--ink-200); }
.pdp-spec tr:last-child { border-bottom: none; }
.pdp-spec td { padding: 10px 12px; font-size: 13px; }
.pdp-spec td:first-child { color: var(--ink-500); width: 35%; }
.pdp-spec td:last-child { font-weight: 500; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ink-200); margin: 32px 0 16px; }
.tabs button {
  border: none; background: transparent; padding: 10px 16px;
  font-size: 14px; font-weight: 500; color: var(--ink-500);
  border-bottom: 2px solid transparent;
}
.tabs button.active { color: var(--navy-700); border-bottom-color: var(--navy-700); font-weight: 600; }

/* ========================
   CART / QUOTATION
======================== */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: flex-start; }
.cart-line {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--ink-200);
  align-items: flex-start;
}
.cart-line:last-child { border-bottom: none; }
.cart-line-img {
  width: 80px; height: 80px;
  background: var(--ink-50); border-radius: 8px;
  position: relative; overflow: hidden; border: 1px solid var(--ink-200);
}
.cart-line-name { font-weight: 600; font-size: 14px; line-height: 1.35; }
.cart-line-sku { font-family: var(--font-mono); font-size: 11px; color: var(--ink-500); margin: 3px 0 8px; }
.cart-line-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.cart-line-note {
  width: 100%; margin-top: 8px;
  border: 1px solid var(--ink-200); border-radius: 8px;
  padding: 8px 10px; font-size: 12.5px; resize: vertical;
  min-height: 36px; max-height: 80px;
}
.cart-line-note:focus { outline: none; border-color: var(--blue-500); }
.cart-line-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 110px; }
.cart-line-price { font-family: var(--font-en); font-weight: 700; font-size: 16px; color: var(--navy-800); }
.cart-line-unit { font-size: 11px; color: var(--ink-500); }
.cart-line-remove { background: none; border: none; color: var(--ink-400); padding: 4px; }
.cart-line-remove:hover { color: var(--red); }

.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13.5px; }
.summary-row .label { color: var(--ink-500); }
.summary-row .value { font-family: var(--font-en); font-weight: 500; }
.summary-row.total { border-top: 1px dashed var(--ink-200); margin-top: 6px; padding-top: 12px; font-size: 16px; font-weight: 700; }
.summary-row.total .value { color: var(--navy-800); font-size: 20px; }
.summary-row.discount .value { color: var(--green); }

.empty-state { padding: 60px 24px; text-align: center; }
.empty-state .icon { width: 64px; height: 64px; margin: 0 auto 16px; color: var(--ink-300); }
.empty-state h3 { margin: 0 0 6px; font-size: 16px; }
.empty-state p { color: var(--ink-500); margin: 0 0 16px; }

/* ========================
   FORMS
======================== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.col-2 { grid-column: span 2; }
.form-field label { font-size: 12.5px; font-weight: 500; color: var(--ink-700); }
.form-field label .req { color: var(--red); margin-left: 2px; }
.form-field input, .form-field textarea, .form-field select {
  padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--ink-200);
  background: white; font-size: 14px;
  outline: none;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(29, 111, 229, 0.12);
}
.form-field .hint { font-size: 11.5px; color: var(--ink-500); }
.form-field .err { font-size: 11.5px; color: var(--red); }

/* ========================
   LOGIN
======================== */
.login-bg {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(29, 111, 229, 0.18), transparent 40%),
    radial-gradient(ellipse at 80% 100%, rgba(11, 58, 130, 0.25), transparent 50%),
    linear-gradient(180deg, var(--navy-900), var(--navy-700));
  color: white;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.login-promo { padding: 64px 60px; display: flex; flex-direction: column; justify-content: space-between; }
.login-promo .brand-block { display: flex; align-items: center; gap: 14px; }
.login-promo .brand-block .brand-logo { width: 56px; height: 56px; font-size: 22px; }
.login-promo .brand-block .brand-name .th { font-size: 18px; }
.login-promo .brand-block .brand-name .en { font-size: 12px; }
.login-promo h1 { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 20px; }
.login-promo .promo-features { display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.login-promo .promo-feat { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid rgba(255,255,255,0.12); }
.login-promo .promo-feat:first-child { border-top: none; }
.login-promo .promo-feat .ic { width: 36px; height: 36px; flex: none; border-radius: 8px; background: rgba(255,255,255,0.1); display: grid; place-items: center; color: #93c5fd; }
.login-promo .promo-feat .t { font-weight: 600; margin-bottom: 2px; }
.login-promo .promo-feat .d { font-size: 12.5px; opacity: 0.7; }
.login-promo .legal { font-size: 11px; opacity: 0.5; }

.login-panel { background: white; color: var(--ink-900); display: grid; place-items: center; padding: 32px; }
.login-card { width: 100%; max-width: 420px; }
.login-card h2 { margin: 0 0 6px; font-size: 24px; }
.login-card .sub { color: var(--ink-500); font-size: 13.5px; margin: 0 0 24px; }
.role-switch { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--ink-100); border-radius: 10px; padding: 4px; gap: 4px; margin-bottom: 24px; }
.role-switch button { border: none; background: transparent; padding: 10px; font-size: 13px; font-weight: 500; border-radius: 7px; color: var(--ink-500); }
.role-switch button.active { background: white; color: var(--navy-700); box-shadow: var(--shadow-sm); font-weight: 600; }

.demo-creds {
  margin-top: 18px;
  background: var(--blue-50); border: 1px dashed var(--blue-500);
  border-radius: 8px; padding: 10px 12px;
  font-size: 12px; color: var(--navy-700);
  display: flex; flex-direction: column; gap: 4px;
}
.demo-creds code { font-family: var(--font-mono); background: white; padding: 1px 5px; border-radius: 3px; }

/* ========================
   DASHBOARD
======================== */
.dash-layout { display: grid; grid-template-columns: 240px 1fr; gap: 0; min-height: calc(100vh - 100px); }
.dash-side { background: white; border-right: 1px solid var(--ink-200); padding: 16px 12px; }
.dash-side h5 { font-size: 11px; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 12px; margin: 8px 0 4px; }
.dash-side a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px;
  font-size: 13.5px; color: var(--ink-700); cursor: pointer;
}
.dash-side a:hover { background: var(--ink-100); color: var(--navy-700); }
.dash-side a.active { background: var(--blue-50); color: var(--navy-700); font-weight: 600; }
.dash-side a .count { margin-left: auto; background: var(--ink-100); color: var(--ink-700); padding: 1px 7px; border-radius: 999px; font-size: 11px; font-family: var(--font-en); }
.dash-side a.active .count { background: var(--navy-700); color: white; }

.dash-main { padding: 28px 32px; background: var(--ink-50); }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.kpi {
  background: white; border: 1px solid var(--ink-200); border-radius: var(--radius-lg);
  padding: 18px 20px; position: relative; overflow: hidden;
}
.kpi .label { font-size: 12px; color: var(--ink-500); margin-bottom: 8px; }
.kpi .value { font-family: var(--font-en); font-weight: 700; font-size: 26px; color: var(--ink-900); letter-spacing: -0.01em; }
.kpi .delta { font-family: var(--font-en); font-size: 12px; margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; }
.kpi .delta.up { color: var(--green); }
.kpi .delta.down { color: var(--red); }
.kpi .ic { position: absolute; right: 16px; top: 16px; width: 36px; height: 36px; border-radius: 8px; background: var(--blue-50); color: var(--navy-700); display: grid; place-items: center; }

.chart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }

.table-wrap { background: white; border: 1px solid var(--ink-200); border-radius: var(--radius-lg); overflow: hidden; }
.table-wrap .table-head { padding: 14px 18px; border-bottom: 1px solid var(--ink-200); display: flex; align-items: center; gap: 12px; }
.table-wrap .table-head h3 { margin: 0; font-size: 14px; }
.table-wrap .spacer { flex: 1; }

table.data {
  width: 100%; border-collapse: collapse;
}
table.data th {
  text-align: left; padding: 10px 16px; font-size: 11.5px; font-weight: 600;
  color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--ink-50); border-bottom: 1px solid var(--ink-200);
}
table.data td {
  padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--ink-100);
  vertical-align: middle;
}
table.data tr:hover td { background: var(--ink-50); }
table.data tr:last-child td { border-bottom: none; }
table.data .num { font-family: var(--font-en); font-variant-numeric: tabular-nums; }
table.data .mono { font-family: var(--font-mono); font-size: 12px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500; }
.chip.ok { background: var(--green-bg); color: var(--green); }
.chip.warn { background: var(--amber-bg); color: var(--amber); }
.chip.bad { background: var(--red-bg); color: var(--red); }
.chip.info { background: var(--blue-100); color: var(--navy-700); }
.chip.neutral { background: var(--ink-100); color: var(--ink-700); }

/* mini avatar */
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue-100); color: var(--navy-700);
  display: inline-grid; place-items: center;
  font-weight: 600; font-size: 12px; font-family: var(--font-en);
  flex: none;
}

/* ========================
   PDF PREVIEW (Thai formal style)
======================== */
.pdf-shell {
  background: var(--ink-100);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex; flex-direction: column; align-items: center;
}
.pdf-doc {
  width: 794px; /* A4 */
  min-height: 1123px;
  background: white;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  padding: 48px 56px;
  font-size: 12px; line-height: 1.45;
  position: relative;
  color: #111;
}
.pdf-doc .pdf-header { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 16px; border-bottom: 2.5px solid var(--navy-700); }
.pdf-doc .pdf-logo-wrap { display: flex; gap: 12px; align-items: center; }
.pdf-doc .pdf-logo {
  width: 68px; height: 68px;
  display: grid; place-items: center;
  flex: none;
}
.pdf-doc .pdf-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pdf-doc .pdf-co .name-th { font-weight: 700; font-size: 15px; color: var(--navy-800); }
.pdf-doc .pdf-co .name-en { font-size: 11px; color: var(--ink-700); font-family: var(--font-en); margin-bottom: 4px; }
.pdf-doc .pdf-co .addr { font-size: 10.5px; color: var(--ink-700); line-height: 1.4; }
.pdf-doc .pdf-title { text-align: right; }
.pdf-doc .pdf-title h1 { margin: 0; font-size: 26px; letter-spacing: 0.04em; color: var(--navy-700); }
.pdf-doc .pdf-title .en { font-size: 11px; color: var(--ink-500); letter-spacing: 0.15em; text-transform: uppercase; font-family: var(--font-en); }
.pdf-doc .pdf-title .docno { margin-top: 6px; font-family: var(--font-mono); font-size: 11px; }

.pdf-meta { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin: 18px 0 14px; }
.pdf-meta .box { border: 1px solid #d4d8e0; padding: 12px 14px; border-radius: 4px; }
.pdf-meta .box .lbl { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-500); font-weight: 600; margin-bottom: 4px; font-family: var(--font-en); }
.pdf-meta .box .name { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.pdf-meta .box .row { font-size: 11px; margin-bottom: 2px; }
.pdf-meta .info-row { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: 11px; }
.pdf-meta .info-row dt { color: var(--ink-500); font-weight: 500; }
.pdf-meta .info-row dd { margin: 0; font-weight: 600; font-family: var(--font-en); }

.pdf-table { width: 100%; border-collapse: collapse; margin: 6px 0 16px; }
.pdf-table th {
  background: var(--navy-700); color: white;
  padding: 8px 10px; font-size: 10.5px; font-weight: 600;
  text-align: left;
}
.pdf-table th.right { text-align: right; }
.pdf-table th.center { text-align: center; }
.pdf-table td { padding: 9px 10px; font-size: 11px; border-bottom: 1px solid #e2e6ee; vertical-align: top; }
.pdf-table td.right { text-align: right; font-family: var(--font-en); font-variant-numeric: tabular-nums; }
.pdf-table td.center { text-align: center; font-family: var(--font-en); }
.pdf-table tr.note td { background: #fbfbfc; font-size: 10.5px; color: var(--ink-500); padding: 4px 10px 10px 10px; font-style: italic; }
.pdf-table td .sku { font-family: var(--font-mono); font-size: 10px; color: var(--ink-500); }
.pdf-table tfoot td {
  padding: 7px 10px;
  font-size: 11px;
  border-bottom: none;
}
.pdf-table tfoot tr.subtotal td { border-top: 1px solid #c0c5cf; padding-top: 9px; }
.pdf-table tfoot tr.grand td { background: #f4f6fb; font-weight: 700; font-size: 13px; color: var(--navy-800); }

.pdf-bottom { display: grid; grid-template-columns: 1fr 240px; gap: 32px; margin-top: 16px; }
.pdf-terms { font-size: 10.5px; }
.pdf-terms h4 { margin: 0 0 6px; font-size: 11px; font-weight: 700; color: var(--navy-700); }
.pdf-terms ol { margin: 0; padding-left: 18px; color: var(--ink-700); }
.pdf-terms ol li { margin-bottom: 3px; line-height: 1.45; }

.pdf-totals-box { border: 1px solid #d4d8e0; border-radius: 4px; padding: 12px 14px; background: #fafbfc; }
.pdf-totals-box .row { display: flex; justify-content: space-between; font-size: 11px; padding: 3px 0; font-family: var(--font-en); font-variant-numeric: tabular-nums; }
.pdf-totals-box .row .l { font-family: var(--font-th); font-variant-numeric: normal; color: var(--ink-700); }
.pdf-totals-box .row.total { font-size: 14px; font-weight: 700; color: var(--navy-800); border-top: 1.5px solid var(--navy-700); padding-top: 6px; margin-top: 3px; }

.pdf-signatures { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.pdf-sig {
  border-top: 1px solid var(--ink-300);
  padding-top: 6px;
  text-align: center;
  font-size: 10.5px;
  color: var(--ink-700);
  position: relative;
  min-height: 96px;
}
.pdf-sig .sig-line { height: 70px; display: grid; place-items: center; }
.pdf-sig .stamp {
  display: inline-block;
  border: 2px solid var(--red);
  color: var(--red);
  padding: 6px 14px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 10px;
  transform: rotate(-12deg);
  letter-spacing: 0.15em;
  opacity: 0.85;
}
.pdf-sig .name { font-weight: 600; color: var(--ink-900); font-size: 11.5px; }
.pdf-sig .role { font-size: 10px; color: var(--ink-500); }

.pdf-footer-bar {
  margin-top: 22px;
  padding-top: 10px;
  border-top: 1px solid var(--ink-200);
  display: flex; justify-content: space-between; font-size: 9.5px; color: var(--ink-500);
  font-family: var(--font-en);
}

.pdf-controls {
  position: sticky; top: 0;
  background: white; border-bottom: 1px solid var(--ink-200);
  padding: 12px 20px;
  display: flex; align-items: center; gap: 8px;
  z-index: 5;
}

/* ========================
   MODAL
======================== */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(11, 30, 64, 0.55);
  display: grid; place-items: center;
  z-index: 100;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}
.modal {
  background: white; border-radius: var(--radius-lg);
  width: 100%; max-width: 540px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow: auto;
  animation: slideUp 0.2s ease;
}
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--ink-200); display: flex; align-items: center; gap: 16px; }
.modal-head h3 { margin: 0; font-size: 16px; flex: 1; }
.modal-body { padding: 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--ink-200); display: flex; justify-content: flex-end; gap: 8px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ========================
   TOAST
======================== */
.toasts { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast {
  background: var(--navy-900); color: white;
  border-radius: 10px; padding: 12px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideRight 0.25s ease;
  font-size: 13.5px;
  min-width: 280px;
  max-width: 400px;
}
.toast .ic { color: #4ade80; flex: none; }
.toast.err .ic { color: #fca5a5; }
@keyframes slideRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* responsive */
@media (max-width: 1024px) {
  .catalog-layout, .cart-layout, .pdp-layout { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .login-bg { grid-template-columns: 1fr; }
  .login-promo { padding: 40px 32px; }
}

/* ========================
   LOGO
======================== */
.brand-logo {
  width: 44px; height: 44px;
  background: white;
  border-radius: 50%;
  display: grid; place-items: center;
  overflow: hidden;
  flex: none;
  padding: 4px;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ========================
   HOMEPAGE
======================== */
.home { background: var(--white); }

/* HERO */
.hero {
  position: relative;
  background: linear-gradient(180deg, #02240e 0%, #064d29 50%, #0a6e3d 100%);
  color: white;
  overflow: hidden;
  padding: 64px 0 80px;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
    radial-gradient(ellipse at 70% 20%, rgba(29, 111, 229, 0.25), transparent 50%);
  background-size: 48px 48px, 48px 48px, 100% 100%;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-en);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 18px;
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: #93c5fd; }
.hero-h1 {
  font-size: 56px; line-height: 1.05;
  margin: 0 0 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.hero-h1-accent {
  background: linear-gradient(120deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 16px; line-height: 1.55;
  color: rgba(255,255,255,0.75);
  max-width: 520px;
  margin: 0 0 28px;
}
.hero-cta { display: flex; gap: 12px; margin-bottom: 36px; flex-wrap: wrap; }
.hero-trust {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.trust-item {
  display: flex; gap: 12px; align-items: flex-start;
  color: rgba(255,255,255,0.85);
}
.trust-item > svg { color: #93c5fd; flex: none; margin-top: 2px; }
.trust-item .muted { color: rgba(255,255,255,0.55) !important; }

/* hero visual */
.hero-visual { position: relative; }
.hero-visual-card {
  position: relative;
  border-radius: 20px;
  overflow: visible;
  filter: drop-shadow(0 24px 50px rgba(0,0,0,0.4));
}
.hero-floating-badge {
  position: absolute;
  display: flex; gap: 10px; align-items: center;
  background: white;
  color: var(--ink-900);
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  z-index: 2;
  top: -16px; left: -20px;
  font-family: var(--font-th);
}
.hero-floating-badge-2 {
  top: auto; left: auto;
  bottom: -20px; right: -16px;
}
.hero-floating-badge .badge-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--blue-500);
  color: white;
  display: grid; place-items: center;
  flex: none;
}
.hero-floating-badge .badge-title { font-size: 11px; color: var(--ink-500); }
.hero-floating-badge .badge-sub { font-size: 13px; font-weight: 700; color: var(--ink-900); }

/* STATS STRIP */
.stats-strip {
  background: var(--ink-900);
  color: white;
  padding: 28px 0;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.stat-cell {
  text-align: center;
  padding: 8px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.stat-cell:last-child { border-right: none; }
.stat-num {
  font-family: var(--font-en);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 13.5px; font-weight: 600; }
.stat-sub { font-size: 11.5px; color: rgba(255,255,255,0.5); margin-top: 2px; }

/* SECTION HEAD */
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 28px;
  gap: 24px; flex-wrap: wrap;
}
.section-head .hero-eyebrow { color: var(--blue-500); margin-bottom: 12px; }
.section-head .hero-eyebrow .dot { background: var(--blue-500); }
.section-head[data-light="true"] .hero-eyebrow { color: #93c5fd; }
.section-head[data-light="true"] h2, .section-head[data-light="true"] p { color: white; }
.section-head h2 {
  margin: 0 0 6px; font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.section-head p {
  margin: 0; color: var(--ink-500);
  font-size: 14px; max-width: 560px;
}

/* CATEGORY GRID */
.cat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.cat-card {
  display: flex; gap: 16px;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--cat-color);
  opacity: 0;
  transition: opacity 0.15s;
}
.cat-card:hover {
  border-color: var(--cat-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cat-card:hover::before { opacity: 1; }
.cat-card:hover .cat-card-arrow { transform: translateX(4px); color: var(--cat-color); }
.cat-card-icon {
  width: 64px; height: 64px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--cat-color) 8%, white);
  display: grid; place-items: center;
  flex: none;
}
.cat-card-body { flex: 1; display: flex; flex-direction: column; }
.cat-card-en {
  font-family: var(--font-en);
  font-size: 11.5px; font-weight: 600;
  color: var(--ink-500);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 4px;
}
.cat-card-th {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 12px;
}
.cat-card-foot {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center;
}
.cat-card-arrow {
  width: 28px; height: 28px;
  border-radius: 14px;
  background: var(--ink-100);
  color: var(--ink-500);
  display: grid; place-items: center;
  transition: all 0.2s;
}

/* PROMO BANNER */
.promo-banner {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(251, 191, 36, 0.15), transparent 50%),
    linear-gradient(135deg, #0a6e3d 0%, #02240e 100%);
  border-radius: var(--radius-lg);
  padding: 48px 56px;
  color: white;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.promo-banner::before {
  content: ""; position: absolute; right: -20%; top: -20%;
  width: 60%; height: 140%;
  background: repeating-linear-gradient(45deg, transparent 0 16px, rgba(255,255,255,0.03) 16px 17px);
  pointer-events: none;
}
.promo-tier-stack {
  display: flex; flex-direction: column; gap: 8px;
  position: relative; z-index: 1;
}
.tier-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 12px 18px;
  display: grid;
  grid-template-columns: 1fr auto 1.4fr;
  align-items: center;
  gap: 16px;
}
.tier-card.tier-platinum { background: linear-gradient(90deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.04)); border-color: rgba(251, 191, 36, 0.4); }
.tier-card .tier-name { font-weight: 700; }
.tier-card .tier-disc { font-family: var(--font-en); font-weight: 800; font-size: 22px; color: #fbbf24; letter-spacing: -0.02em; }
.tier-card .tier-desc { font-size: 11.5px; opacity: 0.6; text-align: right; }

/* BRANDS SECTION */
.brands-section {
  background: linear-gradient(180deg, #0f1f17 0%, #02240e 100%);
  color: white;
  padding: 60px 0 70px;
  position: relative;
}
.brands-section::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}
.brand-grid {
  position: relative;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px;
}
.brand-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  transition: all 0.15s;
}
.brand-card:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); transform: translateY(-2px); }
.brand-logo-tile {
  height: 56px;
  display: grid; place-items: center;
  border-radius: 6px;
  font-size: 18px;
  padding: 0 12px;
  letter-spacing: 0.02em;
}
.brand-meta { display: flex; justify-content: space-between; align-items: center; }
.brand-country { font-size: 11px; color: rgba(255,255,255,0.7); }
.brand-meta .muted { color: rgba(255,255,255,0.4) !important; font-family: var(--font-en); }

/* CUSTOMERS SECTION */
.customers-section { background: var(--ink-50); padding: 60px 0 70px; }
.customer-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
  margin-bottom: 40px;
}
.customer-card {
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  transition: all 0.15s;
}
.customer-card:hover { border-color: var(--blue-500); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.customer-logo {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex: none;
}
.customer-name {
  font-size: 11.5px;
  color: var(--ink-700);
  line-height: 1.3;
  font-weight: 500;
}

.testimonial-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.testimonial-card {
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}
.testimonial-card p {
  margin: 12px 0 18px;
  color: var(--ink-700);
  line-height: 1.55;
  font-size: 13.5px;
}
.testimonial-by { display: flex; align-items: center; gap: 12px; }
.testimonial-quote { display: flex; align-items: center; gap: 6px; color: var(--green); }

/* CTA FINAL */
.cta-final {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
  background-image: radial-gradient(ellipse at 100% 0%, rgba(29,111,229,0.06), transparent 50%);
}

@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-h1 { font-size: 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .promo-banner { grid-template-columns: 1fr; padding: 32px; }
  .brand-grid { grid-template-columns: repeat(4, 1fr); }
  .customer-grid { grid-template-columns: repeat(4, 1fr); }
  .testimonial-strip { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cat-grid, .brand-grid, .customer-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ========================
   PRODUCT PHOTO (rich SVG illustration)
======================== */
.product-photo {
  position: absolute; inset: 0;
  overflow: hidden;
  display: grid; place-items: stretch;
}
.product-photo-bg {
  position: absolute; inset: 0;
}
.product-photo-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15,23,42,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.04) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}
.product-photo-svg {
  position: relative;
  width: 100%; height: 100%;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.product-card:hover .product-photo-svg {
  transform: scale(1.08) rotate(-2deg);
}

.product-img { background: transparent !important; }
.product-img .ph { display: none; }
.cart-line-img .product-photo { border-radius: 8px; }

/* ========================
   ANIMATIONS / EFFECTS
======================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}
@keyframes pulse-soft {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 12px rgba(22, 163, 74, 0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes count-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bg-pan {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"].in-view { transition-delay: 80ms; }
.reveal[data-delay="2"].in-view { transition-delay: 160ms; }
.reveal[data-delay="3"].in-view { transition-delay: 240ms; }
.reveal[data-delay="4"].in-view { transition-delay: 320ms; }
.reveal[data-delay="5"].in-view { transition-delay: 400ms; }

/* enrich the topbar interactions */
.topbar { backdrop-filter: blur(8px); }
.icon-btn { position: relative; transition: background 0.15s, transform 0.15s; }
.icon-btn:active { transform: scale(0.94); }
.icon-btn .badge { animation: pulse-soft 2.2s ease-in-out infinite; }

/* button shine effect */
.btn { position: relative; overflow: hidden; }
.btn-primary::after, .btn-accent::after {
  content: ""; position: absolute; top: 0; left: 0; width: 30%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-200%);
  transition: transform 0.7s ease;
  pointer-events: none;
}
.btn-primary:hover::after, .btn-accent:hover::after { transform: translateX(400%); }
.btn-primary, .btn-accent { transition: background 0.2s, transform 0.15s, box-shadow 0.2s; }
.btn-primary:hover, .btn-accent:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(10, 110, 61, 0.28); }
.btn-primary:active, .btn-accent:active { transform: translateY(0); }
.btn-lg.btn-primary { box-shadow: 0 6px 18px rgba(10, 110, 61, 0.25); }

/* CARD hover lift */
.card { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.product-card { transition: transform 0.25s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.25s, border-color 0.2s; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 20px 36px rgba(10, 110, 61, 0.12); }
.product-tag { animation: scaleIn 0.4s ease; }

/* hero floating badges */
.hero-floating-badge { animation: float 4s ease-in-out infinite; }
.hero-floating-badge-2 { animation: float 4s ease-in-out infinite; animation-delay: 2s; }
.hero-h1-accent { background-size: 200% 100%; animation: bg-pan 6s linear infinite; }

/* hero grid bg pulse */
.hero-grid-bg::after {
  content: ""; position: absolute; inset: -50%;
  background: radial-gradient(ellipse, rgba(22, 163, 74, 0.18), transparent 50%);
  animation: float 8s ease-in-out infinite;
}

/* link & nav hover */
.nav a {
  position: relative; transition: color 0.15s;
}
.nav a::before {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px;
  height: 2px; background: var(--navy-700);
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.25s ease;
}
.nav a:hover::before { transform: scaleX(0.6); }
.nav a.active::before { transform: scaleX(1); }

/* category card icon micro-bounce */
.cat-card-icon { transition: transform 0.3s cubic-bezier(0.5, 1.5, 0.5, 1); }
.cat-card:hover .cat-card-icon { transform: scale(1.1) rotate(-6deg); }

/* MARQUEE strip for brand carousel */
.marquee-wrap { overflow: hidden; }
.marquee-track {
  display: flex; gap: 16px;
  animation: marquee 30s linear infinite;
  width: max-content;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-wrap.fade-edges {
  mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
}

/* trust items entrance */
.trust-item { animation: fadeUp 0.6s ease backwards; }
.trust-item:nth-child(1) { animation-delay: 0.4s; }
.trust-item:nth-child(2) { animation-delay: 0.55s; }
.trust-item:nth-child(3) { animation-delay: 0.7s; }

/* counter */
.stat-num { display: inline-block; animation: count-up 0.6s ease backwards; }

/* hero copy entrance */
.hero-eyebrow, .hero-h1, .hero-sub, .hero-cta {
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.hero-h1 { animation-delay: 0.1s; }
.hero-sub { animation-delay: 0.25s; }
.hero-cta { animation-delay: 0.4s; }
.hero-trust { animation: fadeIn 1s ease 0.5s backwards; }

/* hero visual entrance */
.hero-visual-card { animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s backwards; }

/* modal entrance */
.modal { animation: scaleIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.toast { animation: slideRight 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* dealer tier pulse */
.tier-platinum { animation: pulse-soft 3s ease-in-out infinite; }

/* testimonial card */
.testimonial-card { transition: transform 0.25s, box-shadow 0.25s; }
.testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* customer card */
.customer-card { transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.customer-card:hover .customer-logo { animation: pulse-soft 1.4s ease-in-out infinite; }

/* table row gradient hover */
table.data tr { transition: background 0.15s; }

/* form field focus ring */
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* page enter */
main > * { animation: fadeIn 0.4s ease; }

/* PDF table row image */
.pdf-table td.pdf-img-cell {
  padding: 4px;
  width: 50px;
}
.pdf-table .pdf-thumb {
  width: 44px; height: 44px;
  background: linear-gradient(180deg, #fafbfc, #f1f5f9);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.pdf-table .pdf-thumb svg { width: 100%; height: 100%; display: block; }

/* nice scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-300); }

/* selection */
::selection { background: var(--blue-100); color: var(--navy-900); }

/* utilities */
.marquee-item {
  flex: none;
  width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px;
  transition: all 0.2s;
}
.marquee-item:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}
.marquee-item .brand-logo-tile {
  width: 100%;
  height: 48px;
  font-size: 16px;
}
.flex { display: flex; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.between { justify-content: space-between; } .center { align-items: center; }
.muted { color: var(--ink-500); }
.mono { font-family: var(--font-mono); }
.en { font-family: var(--font-en); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.bold { font-weight: 600; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-right { text-align: right; }
.divider { height: 1px; background: var(--ink-200); margin: 16px 0; }
