/* B2B Upgrade — ELMALL MPE Mall. Tokens bám design-system.html */
:root {
  --b2b-navy: #1F5D8F;
  --b2b-navy-hover: #174A72;
  --b2b-navy-soft: #EDF4F9;
  --b2b-teal: #2B86A9;
  --b2b-teal-hover: #226B87;
  --b2b-teal-soft: #EDF7FA;
  --b2b-cyan: #48AFC6;
  --b2b-sky: #3B9FC0;
  --b2b-sky-soft: #E9F6FA;
  --b2b-success: #15803D;
  --b2b-success-soft: #ECFDF3;
  --b2b-border: #EAECF0;
  --b2b-border-dark: #D0D5DD;
  --b2b-text: #344054;
  --b2b-muted: #667085;
  --b2b-surface: #F8FAFC;
  --b2b-radius: 12px;
  --b2b-shadow: 0 8px 24px rgba(31, 93, 143, 0.08);
}

/* ===== 1. B2B Trust Bar ===== */
.b2b-trust-bar-wrap {
  background: #fff;
  padding: 16px 0 24px;
  position: relative;
  z-index: 5;
}
.b2b-trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: var(--b2b-surface);
  border: 1px solid var(--b2b-border);
  border-radius: var(--b2b-radius);
  padding: 18px 20px;
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.04);
}
.b2b-trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
}
.b2b-trust-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--b2b-border);
  color: var(--b2b-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(31, 93, 143, 0.06);
}
.b2b-trust-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2px;
}
.b2b-trust-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.b2b-trust-text strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--b2b-navy);
  line-height: 1.3;
}
.b2b-trust-text span {
  font-size: 12px;
  color: var(--b2b-muted);
  line-height: 1.35;
}

@media (max-width: 992px) {
  .b2b-trust-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}
@media (max-width: 576px) {
  .b2b-trust-bar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }
}

/* ===== 2. Section Rhythm & Heading Polish ===== */
#section_led_pha_mpe,
#section_led_bulb_solar,
#section_1897898950,
#section_1495207811 {
  background: var(--b2b-surface) !important;
  border-top: 1px solid var(--b2b-border);
  border-bottom: 1px solid var(--b2b-border);
}

.fx-titlebar {
  margin-bottom: 18px !important;
}
.fx-titlebar-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.fx-title,
.fx-title a {
  font-family: Inter, sans-serif !important;
  color: var(--b2b-navy) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  margin: 0 !important;
}
.fx-more {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--b2b-navy) !important;
  background: var(--b2b-navy-soft) !important;
  padding: 5px 14px !important;
  border-radius: 999px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}
.fx-more:hover {
  background: var(--b2b-navy) !important;
  color: #fff !important;
}
.fx-arr {
  font-size: 14px;
  font-weight: 800;
}

/* ===== 3. Card B2B Standards (Project.md §2) ===== */
.product-small.box {
  border: 1px solid var(--b2b-border) !important;
  border-radius: var(--b2b-radius) !important;
  overflow: hidden !important;
  background: #fff !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.03) !important;
}
.product-small.box:hover {
  border-color: var(--b2b-sky) !important;
  box-shadow: var(--b2b-shadow) !important;
}

/* Tắt hover zoom/rotate ảnh theo §2 rule 3 */
.product-small, .product-small .box, .product-small .box-image, .product-small .box-image img {
  transition: none !important;
}
.product-small.has-hover:hover, .product-small:hover {
  transform: none !important;
}
.product-small .box-image img {
  transform: none !important;
}
.product-small .box-image:hover img {
  transform: none !important;
}

.product-small .box-image {
  background: #fff !important;
  padding: 10px !important;
  border-bottom: 1px solid #F2F4F7 !important;
}

.product-small .box-text.box-text-products {
  padding: 14px 16px !important;
}

/* Tiêu đề clamp 2 dòng cố định để khối giá & nút thẳng hàng */
.product-small .woocommerce-loop-product__title a {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4 !important;
  min-height: 2.8em !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--gray-800, #1D2939) !important;
}
.product-small .woocommerce-loop-product__title a:hover {
  color: var(--b2b-navy) !important;
}

/* Giá KM + Giá niêm yết trên cùng 1 hàng */
.box-text-products .price-wrapper {
  margin: 6px 0 2px !important;
  min-height: 24px;
}
.box-text-products .price {
  display: flex !important;
  align-items: baseline !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}
.box-text-products .price ins {
  text-decoration: none !important;
  white-space: nowrap !important;
  order: 0 !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  color: var(--b2b-navy) !important;
}
.box-text-products .price del {
  white-space: nowrap !important;
  font-size: 0.85em !important;
  order: 1 !important;
  position: relative !important;
  display: inline-block !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  color: var(--b2b-muted) !important;
}
.box-text-products .price del::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: currentColor;
  transform: translateY(-50%);
  pointer-events: none;
}
.b2b-contact-price {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: var(--b2b-teal) !important;
}

/* 3 dòng thông số B2B + SKU */
.product-small .box-text .b2b-meta {
  margin: 8px 0 0 -1.5em !important;
  padding: 8px 1.5em 0 1.5em !important;
  border-top: 1px dashed var(--b2b-border);
  font-size: 12.5px;
  color: var(--b2b-text);
}
.b2b-sku {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--b2b-muted);
  margin-bottom: 6px;
}
.b2b-sku::before {
  content: "›";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  background: var(--b2b-sky);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  line-height: 13px;
  text-align: center;
  font-weight: 800;
}
.b2b-sku span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.b2b-sku strong {
  color: var(--b2b-navy);
}

.b2b-specs {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 60px;
}
.b2b-specs li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--b2b-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 20px;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.b2b-specs li::before {
  content: "›";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  background: var(--b2b-sky);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  line-height: 13px;
  text-align: center;
  font-weight: 800;
}

/* 2 nút Chi tiết | + Báo giá bằng nhau tuyệt đối */
.product-small .box-text .b2b-actions {
  margin-left: -1.5em !important;
  margin-right: -1.5em !important;
  padding-left: 1.5em !important;
  padding-right: 1.5em !important;
  display: flex !important;
  gap: 8px !important;
  margin-top: 10px !important;
  align-items: stretch !important;
}
.b2b-actions a,
.b2b-actions button {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  border-radius: 8px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 8px 4px !important;
  text-align: center;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}
.b2b-btn-detail {
  background: #fff !important;
  color: var(--b2b-navy) !important;
  border: 1px solid var(--b2b-navy) !important;
  text-decoration: none;
}
.b2b-btn-detail:hover {
  background: var(--b2b-navy-soft) !important;
  color: var(--b2b-navy) !important;
}
.b2b-btn-quote {
  background: var(--b2b-navy) !important;
  color: #fff !important;
  border: 1px solid var(--b2b-navy) !important;
}
.b2b-btn-quote:hover {
  background: var(--b2b-navy-hover) !important;
  border-color: var(--b2b-navy-hover) !important;
}
.b2b-btn-quote.in-list {
  background: var(--b2b-teal) !important;
  border-color: var(--b2b-teal) !important;
}

/* ===== 4. Thanh báo giá sỉ sticky ===== */
#b2b-quote-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  background: #101828;
  color: #fff;
  border-radius: 14px;
  padding: 14px 20px;
  display: none;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
#b2b-quote-bar.show {
  display: flex;
}
#b2b-quote-bar .count {
  background: var(--b2b-cyan);
  color: #101828;
  font-weight: 800;
  border-radius: 999px;
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: 13px;
}
#b2b-quote-bar .total {
  font-weight: 700;
  font-size: 15px;
}
#b2b-quote-bar .hint {
  font-size: 12.5px;
  opacity: 0.8;
  flex: 1;
  min-width: 180px;
}
#b2b-quote-bar .go {
  background: #fff;
  color: #101828;
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: 13.5px;
  transition: all 0.2s ease;
}
#b2b-quote-bar .go:hover {
  background: var(--b2b-navy-soft);
  color: var(--b2b-navy);
}
#b2b-quote-bar .clear {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
}
#b2b-quote-bar .clear:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  #b2b-quote-bar {
    bottom: 74px;
    left: 8px;
    right: 8px;
    padding: 12px 14px;
    gap: 10px;
  }
  .b2b-actions a, .b2b-actions button {
    min-height: 40px;
  }
}

/* ===== 5. Fix Dropdown Hệ thống chi nhánh ===== */
.header-main {
  position: relative;
  z-index: 30 !important;
}
.systerm {
  position: relative;
  z-index: 9999;
}
.systerm-lists {
  z-index: 9999 !important;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
