:root {
  color-scheme: light;
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #475569;
  --line: #cbd5e1;
  --line-strong: #94a3b8;
  --paper: #ffffff;
  --canvas: #f8fafc;
  --brand: #0f766e;
  --brand-hover: #115e59;
  --brand-light: #f0fdfa;
  --brand-border: #5eead4;
  --accent: #d97706;
  --accent-light: #fffbeb;
  --accent-border: #fcd34d;
  --success: #15803d;
  --success-light: #f0fdf4;
  --success-border: #86efac;
  --danger: #b91c1c;
  --danger-light: #fef2f2;
  --danger-border: #fca5a5;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header & Navigation */
.topbar {
  height: 72px;
  background: #042f2e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1200px) / 2));
  gap: 24px;
  border-bottom: 2px solid #115e59;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.brand-badge {
  background: #f59e0b;
  color: #0f172a;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.brand-dot {
  color: #2dd4bf;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topnav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: #ccfbf1;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.topnav a:hover {
  background: rgba(204, 251, 241, 0.12);
  color: #ffffff;
}

.topnav a[aria-current="page"] {
  background: #0f766e;
  color: #ffffff;
  font-weight: 600;
}

.topnav-portal {
  background: #f59e0b !important;
  color: #042f2e !important;
  font-weight: 700 !important;
}

.topnav-portal:hover {
  background: #fbbf24 !important;
  color: #042f2e !important;
}

/* App Sub-navigation */
.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.app-nav a {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: all 0.15s ease;
}

.app-nav a:hover {
  border-color: var(--brand-border);
  color: var(--brand);
}

.app-nav a[aria-current="page"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

/* Layout Container */
.wrap {
  max-width: 1200px;
  margin: 28px auto 64px;
  padding: 0 24px;
}

.crumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.crumb a {
  color: var(--brand);
  font-weight: 500;
}

.crumb a:hover {
  text-decoration: underline;
}

.pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.pagehead h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--ink);
  line-height: 1.35;
}

.subhead {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 6px;
  max-width: 740px;
}

/* Cards & Containers */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow);
}

.cardhead {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: #fafcfc;
}

.cardhead h2, .cardhead h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Badges & Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--brand-light);
  color: #0d5f58;
  border: 1px solid var(--brand-border);
  white-space: nowrap;
}

.pill-amber {
  background: var(--accent-light);
  color: #92400e;
  border-color: var(--accent-border);
}

.pill-green {
  background: var(--success-light);
  color: #14532d;
  border-color: var(--success-border);
}

.pill-red {
  background: var(--danger-light);
  color: #991b1b;
  border-color: var(--danger-border);
}

.pill-neutral {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

/* Callouts & Notices */
.demo-note, .notice, .callout {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.demo-note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #854d0e;
}

.notice {
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  color: #134e4a;
}

.callout {
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--ink-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--brand-hover);
}

.btn-secondary {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: var(--ink);
}

.btn-warning {
  background: #f59e0b;
  color: #042f2e;
  font-weight: 700;
}

.btn-warning:hover {
  background: #fbbf24;
  color: #042f2e;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

/* Catalog & Product Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}


.product-card .product-pills,
.product-card div > div[style*="justify-content:space-between"] {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  margin-bottom: 8px !important;
}

.product-card .pill {
  max-width: 100%;
  font-size: 11px;
  padding: 3px 8px;
}

.product-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.product-card h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}

.product-card .price {
  font-size: 17px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1.4;
}

.product-card .price small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}

/* Statistics Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  margin-top: 6px;
  line-height: 1.35;
}

/* Data Tables */
.data-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 4px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.data-table th {
  padding: 12px 16px;
  background: #f8fafc;
  font-weight: 700;
  color: var(--ink-secondary);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: #fafcfc;
}

/* Order Tracking Timeline */
.tracking-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 30px 10px 20px;
}

.tracking-timeline::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 20px;
  right: 20px;
  height: 3px;
  background: var(--line);
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}

.timeline-node {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--line);
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.timeline-step.completed .timeline-node {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.timeline-step.active .timeline-node {
  border-color: #92400e;
  color: #92400e;
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent-light);
}

.timeline-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.timeline-time {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Forms */
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease;
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}

/* Item & Summary Components */
.item {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.item:last-child {
  border-bottom: none;
}

.item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0;
}

.item h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.4;
}

.item .meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.item .price {
  font-size: 16px;
  font-weight: 800;
  text-align: right;
  color: var(--ink);
  line-height: 1.4;
}

.item .price small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.seller-total {
  padding: 12px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.summary {
  padding: 24px;
}

.summary h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.4;
}

.sumrow {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

.sumrow strong {
  color: var(--ink);
}

.sumrow.total {
  border-top: 2px dashed var(--line-strong);
  margin-top: 12px;
  padding-top: 16px;
  font-size: 18px;
  font-weight: 800;
  color: var(--brand);
}

.summary .btn {
  width: 100%;
  margin-top: 16px;
}

.footnote {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.5;
}

/* Rx Prescription Badge & Upload */
.rx-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.upload-box {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  background: #fafcfc;
  cursor: pointer;
  transition: all 0.15s ease;
}

.upload-box:hover {
  border-color: var(--brand);
  background: var(--brand-light);
}

/* Hero Section */
.hero {
  padding: 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #042f2e 0%, #0f766e 100%);
  color: #ffffff;
  border: 1px solid #115e59;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}

.hero h1 {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
}

.hero p {
  font-size: 16px;
  line-height: 1.6;
  color: #ccfbf1;
  max-width: 640px;
  margin-bottom: 24px;
}

/* Footer */
footer.wrap {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .twocol {
    grid-template-columns: 1fr;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .tracking-timeline {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .tracking-timeline::before {
    display: none;
  }
  .timeline-step {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
  }
  .timeline-node {
    margin: 0;
  }
}

/* Buyer Shell & Left AI Chat Sidebar */
.buyer-shell {
  display: flex;
  min-height: calc(100vh - 72px);
  background: var(--canvas);
}



.buyer-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.buyer-main .wrap {
  max-width: 1280px;
  margin: 24px auto 48px;
  padding: 0 32px;
  width: 100%;
  box-sizing: border-box;
}



.ai-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-icon-bubble {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.ai-title-wrap strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.ai-title-wrap span {
  font-size: 12px;
  color: var(--muted);
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fafcfc;
}

.ai-msg {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
}

.ai-msg-bot {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink);
  border-bottom-left-radius: 2px;
}

.ai-msg-bot p {
  margin: 0;
}

.ai-msg-user {
  background: #0f766e;
  color: #ffffff;
  align-self: flex-end;
  max-width: 90%;
  border-bottom-right-radius: 2px;
}

.ai-msg-user p {
  margin: 0;
}

.ai-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-chip {
  padding: 8px 12px;
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  color: #0d5f58;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.ai-chip:hover {
  background: #ccfbf1;
  color: #042f2e;
}

.ai-product-link {
  display: inline-block;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  color: #0f766e;
  font-weight: 700;
  font-size: 12px;
}

.ai-product-link:hover {
  text-decoration: underline;
}

.ai-chat-input-wrap {
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  display: flex;
  gap: 8px;
}

.ai-chat-input-wrap input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
}

.ai-chat-input-wrap input:focus {
  border-color: var(--brand);
}

@media (max-width: 1024px) {
  .buyer-shell {
    flex-direction: column;
  }
  .ai-chat-sidebar {
    width: 100%;
    height: auto;
    max-height: 380px;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}


/* --- Khối mô phỏng trạng thái xác thực xem giá sỉ --- */
.auth-gate-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.auth-gate-banner strong {
  color: #166534;
  font-size: 13px;
}
.auth-gate-banner p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #15803d;
}
.auth-gate-actions {
  display: flex;
  gap: 8px;
}
.price-locked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.price-locked:hover {
  background: #f1f5f9;
  border-color: var(--brand);
  color: var(--brand);
}
.price-locked svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}


.cardbody {
  padding: 20px;
}


/* --- Sidebar Chat AI: Nền xanh lá nhẹ & Hỗ trợ Thu nhỏ / Mở rộng --- */
.ai-chat-sidebar {
  width: 320px;
  flex-shrink: 0;
  background: #f4fbf7; /* Xanh lá dược liệu nhẹ nhàng, phân tách rõ ràng */
  border-right: 1px solid #ccebd7;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  z-index: 30;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.04);
  
}

.ai-sidebar-header {
  padding: 12px 14px;
  border-bottom: 1px solid #ccebd7;
  background: #eaf7ef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ai-toggle-btn {
  background: #ffffff;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #065f46;
  font-size: 14px;
  font-weight: bold;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.ai-toggle-btn:hover {
  background: #047857;
  color: #ffffff;
  border-color: #065f46;
}

.ai-chat-sidebar.collapsed {
  width: 56px;
}

.ai-chat-sidebar.collapsed .ai-title-wrap,
.ai-chat-sidebar.collapsed .pill,
.ai-chat-sidebar.collapsed .ai-chat-messages,
.ai-chat-sidebar.collapsed .ai-chat-input-wrap {
  display: none !important;
}

.ai-chat-sidebar.collapsed .ai-sidebar-header {
  padding: 12px 10px;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ai-chat-sidebar.collapsed .ai-badge {
  flex-direction: column;
  align-items: center;
}

.ai-collapsed-pill {
  display: none;
}

.ai-chat-sidebar.collapsed .ai-collapsed-pill {
  display: flex;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  letter-spacing: 1.5px;
  font-size: 11px;
  font-weight: 700;
  color: #065f46;
  margin-top: 16px;
  padding: 8px 4px;
  border-radius: 4px;
  background: #d1fae5;
  cursor: pointer;
}

/* Bảng thông số kỹ thuật sản phẩm chuẩn B2B - Chống co kéo chữ */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}
.spec-table tr {
  border-bottom: 1px solid var(--line);
}
.spec-table tr:last-child {
  border-bottom: none;
}
.spec-table td {
  padding: 10px 0;
  font-size: 13px;
  line-height: 1.5;
  vertical-align: middle;
}
.spec-table td.spec-label {
  color: var(--muted);
  width: 40%;
  padding-right: 14px;
  white-space: nowrap;
}
.spec-table td.spec-value {
  color: var(--ink);
  text-align: left;
  font-weight: 600;
}

/* B2B Gian hàng & Danh mục sỉ nâng cấp */
.store-hero {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #0f766e 100%);
  color: #ffffff;
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}
.store-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
}
.store-profile {
  display: flex;
  gap: 20px;
  align-items: center;
}
.store-avatar {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 2px solid #a7f3d0;
  flex-shrink: 0;
}
.store-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  color: #ecfdf5;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.store-cta-box {
  background: rgba(0, 0, 0, 0.25);
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: right;
  min-width: 220px;
}

/* Bảng chiết khấu số lượng (Tier Pricing B2B) */
.tier-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 16px 0 24px;
}
.tier-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.tier-card:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.tier-card.highlight {
  border-color: #059669;
  background: #f0fdf4;
}
.tier-badge {
  font-size: 11px;
  font-weight: 800;
  color: #065f46;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.tier-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.tier-discount {
  font-size: 12px;
  color: #059669;
  font-weight: 700;
  margin-top: 4px;
}

/* Thanh công cụ lọc & sắp xếp sỉ (Catalog Toolbar) */
.catalog-toolbar {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-chip-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}
.filter-chip-btn.active {
  background: #065f46;
  color: #ffffff;
  border-color: #059669;
}

/* Bố cục trang Catalog chuẩn E-Commerce: Cột Lọc Trái + Lưới Hàng Phải */
.catalog-layout-wrap {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 20px;
}
@media (max-width: 900px) {
  .catalog-layout-wrap {
    grid-template-columns: 1fr;
  }
}

/* Cột Lọc Bên Trái (Filter Sidebar Panel) */
.filter-sidebar-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 16px;
}
.filter-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.filter-sidebar-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-block-title {
  font-size: 12px;
  font-weight: 800;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filter-radio-list,
.filter-cat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
}
.filter-radio-item input[type="radio"] {
  cursor: pointer;
  accent-color: #059669;
}
.filter-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: all 0.15s;
}
.filter-cat-link:hover {
  background: #f1f5f9;
  color: var(--ink);
}
.filter-cat-link.active {
  background: #065f46;
  color: #ffffff;
}
.filter-cat-count {
  font-size: 11px;
  opacity: 0.8;
}

/* Thanh điều khiển trên đỉnh danh sách (Top Action Bar) */
.catalog-top-ctrl {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.product-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #475569;
  margin: 6px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.product-rating-stars {
  color: #d97706;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.product-sold-tag {
  color: #047857;
  font-weight: 700;
}

/* Khối đánh giá & Phản hồi thực tế trang Chi Tiết Sản Phẩm */
.reviews-summary-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: 20px;
}
@media (max-width: 640px) {
  .reviews-summary-card {
    grid-template-columns: 1fr;
  }
}
.review-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.review-item:last-child {
  border-bottom: none;
}

/* Trang chủ nâng cấp: Tìm kiếm nhanh & Module Hot B2B */
.home-search-bar {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.home-search-input {
  flex: 1;
  min-width: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.home-search-input:focus {
  border-color: var(--brand);
}
.home-filter-select {
  padding: 10px 14px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

/* Banner Flash Deal / Nổi Bật B2B */
.featured-deal-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  border: 1px solid #334155;
}
.deal-timer-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.deal-timer-unit {
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 10px;
  border-radius: 6px;
  text-align: center;
  min-width: 44px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.deal-timer-unit strong {
  display: block;
  font-size: 16px;
  color: #fbbf24;
}
.deal-timer-unit span {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
}

/* Lưới nhà cung cấp tiêu biểu (Top Verified Sellers) */
.seller-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.seller-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}
.seller-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}
.seller-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

/* Module Quy trình giao dịch B2B 4 bước */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.workflow-step {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  position: relative;
}
.workflow-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #065f46;
  color: #ffffff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-bottom: 12px;
}
.workflow-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 6px;
}
.workflow-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* Banner Quảng Cáo Đôi (Dual Ad Promo Banners) */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.promo-banner {
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.promo-banner-1 {
  background: linear-gradient(135deg, #064e3b 0%, #047857 100%);
  color: #ffffff;
}
.promo-banner-2 {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #ffffff;
}

/* Danh Mục Lướt Ngang Dạng Tròn (Horizontal Scrolling Category Bar) */
.horizontal-cat-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 8px 4px 16px;
  margin-bottom: 24px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.cat-item-pill {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  min-width: 110px;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.cat-item-pill:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.cat-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #065f46;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 8px;
  border: 1px solid #a7f3d0;
}
.cat-item-name {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.cat-item-count {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* Badge Nhãn Sản Phẩm Cháy Hàng / Bán Chạy / Độc Quyền */
.product-tag-wrap {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}
.tag-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.tag-bestseller {
  background: #dc2626;
  color: #ffffff;
}
.tag-trending {
  background: #b45309;
  color: #ffffff;
}
.tag-exclusive {
  background: #0369a1;
  color: #ffffff;
}
.tag-new {
  background: #047857;
  color: #ffffff;
}

/* Bảng Tin Tức & Cảnh Báo Ngành Dược (B2B Ticker) */
.market-ticker {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.ticker-badge {
  background: #065f46;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.ticker-content {
  font-size: 13px;
  color: #064e3b;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bộ chọn Thùng & Tính Giá Tức Thì (B2B Quick Order Selector) */
.order-tier-selector {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 16px 0;
}
.tier-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.tier-opt-btn {
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}
.tier-opt-btn:hover, .tier-opt-btn.active {
  border-color: #059669;
  background: #ecfdf5;
}
.tier-opt-qty {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}
.tier-opt-discount {
  font-size: 11px;
  color: #065f46;
  font-weight: 700;
  margin-top: 2px;
}
.order-calc-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  margin-top: 10px;
}

/* Thư viện ảnh Thumbnail & Giấy tờ kiểm nghiệm (Gallery & Docs) */
.product-thumb-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}
.product-thumb-item {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 2px;
  background: #fff;
  cursor: pointer;
  object-fit: cover;
}
.product-thumb-item.active {
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
}

/* Bảng Tài liệu kiểm nghiệm & Hồ sơ pháp lý tải về */
.doc-download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.doc-download-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s;
}
.doc-download-card:hover {
  border-color: #059669;
}
.doc-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* Giỏ hàng B2B nâng cấp: Bộ đếm số lượng thùng & Ước tính vận chuyển */
.cart-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
}
.cart-qty-btn {
  width: 32px;
  height: 32px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-qty-val {
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.cart-free-ship-bar {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: #065f46;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
