/* ============================================================
   Supplier marketplace — page-specific styles
   ============================================================ */

.mp-main { padding: 28px 0 80px; }

/* page head */
.mp-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.mp-head h1 {
  font-size: 36px;
  letter-spacing: -0.035em;
  line-height: 1.0;
  font-family: var(--font);
  font-weight: 600;
}
.mp-head .lead {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-muted);
  max-width: 480px;
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  border-radius: var(--r-pill);
  background: var(--dark);
  color: var(--text-on-dark);
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
}
.cart-btn .ms { color: var(--signal); }
.cart-btn .qty {
  font-family: var(--font-mono);
  background: var(--signal);
  color: var(--signal-on);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
}
.cart-btn .total {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
}

/* ===== FILTER BAR ===== */
.mp-filters {
  display: grid;
  grid-template-columns: 1.4fr auto auto;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 8px;
  margin-bottom: 18px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.search-box .ms { color: var(--text-muted); }
.search-box input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box .clear {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: grid; place-items: center;
}

.region-select {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.region-select .ms { color: var(--text-muted); font-size: 18px; }
.region-select strong { font-weight: 600; }
.region-select .sub { color: var(--text-muted); font-size: 13px; }

.rating-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
  white-space: nowrap;
  min-width: 240px;
}
.rating-filter .lbl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-weight: 500;
}
.rating-filter .lbl .ms { color: var(--signal); font-size: 16px; font-variation-settings: 'opsz' 20, 'wght' 600, 'FILL' 1, 'GRAD' 0; }
.rating-filter .val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
}
.rating-track {
  flex: 1;
  height: 4px;
  background: var(--surface-3);
  border-radius: var(--r-pill);
  position: relative;
}
.rating-fill {
  position: absolute;
  height: 100%;
  background: var(--signal);
  border-radius: var(--r-pill);
}
.rating-thumb {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--dark);
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

/* category chips row */
.cat-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  padding: 4px 0;
  overflow-x: auto;
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 120ms ease;
}
.cat-chip:hover { border-color: var(--text); }
.cat-chip.active {
  background: var(--dark);
  color: var(--text-on-dark);
  border-color: var(--dark);
}
.cat-chip .mono {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--text-2);
}
.cat-chip.active .mono { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9); }

/* ===== SUPPLIERS STRIP ===== */
.suppliers-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}

.supplier-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.supplier-card:hover {
  border-color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}

.supplier-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.supplier-logo {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  background: var(--surface-3);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.supplier-logo.dark { background: var(--dark); color: var(--signal); }
.supplier-logo.gold { background: var(--signal); color: var(--signal-on); }
.supplier-meta { flex: 1; min-width: 0; }
.supplier-meta .n {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.supplier-meta .role {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.supplier-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.supplier-regions .region {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
}
.supplier-regions .region .ms { font-size: 12px; color: var(--text-muted); }

.supplier-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.supplier-foot .rating {
  font-size: 14px;
  font-weight: 600;
}
.supplier-foot .rating .ms {
  color: var(--signal);
  font-variation-settings: 'opsz' 20, 'wght' 600, 'FILL' 1, 'GRAD' 0;
  font-size: 14px;
  vertical-align: -2px;
}
.supplier-foot .rating .count {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
  margin-left: 4px;
}
.supplier-foot .orders {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.supplier-foot .orders strong { color: var(--text); font-weight: 600; }

/* ===== PRODUCTS GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.product-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}

.product-photo {
  height: 180px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.product-photo .ms {
  color: rgba(15,17,21,0.20);
  font-size: 60px;
  font-variation-settings: 'opsz' 48, 'wght' 300, 'FILL' 1, 'GRAD' 0;
}
.product-photo.bg-oil { background: linear-gradient(135deg, #efe9d6 0%, #ddd5b8 100%); }
.product-photo.bg-tire { background: linear-gradient(135deg, #2a2c32 0%, #1c1e23 100%); }
.product-photo.bg-tire .ms { color: rgba(247, 246, 242, 0.18); }
.product-photo.bg-parts { background: linear-gradient(135deg, #d8dbe2 0%, #b9bdc8 100%); }
.product-photo.bg-tool { background: linear-gradient(135deg, #e6e2d5 0%, #d2cdba 100%); }
.product-photo.bg-chem {
  background:
    radial-gradient(circle at 70% 30%, rgba(31, 76, 171, 0.15), transparent 60%),
    linear-gradient(135deg, #dee7f1 0%, #c4d3e3 100%);
}
.product-photo.bg-cons { background: linear-gradient(135deg, #efeae0 0%, #d8d2c2 100%); }

.product-photo .ribbon {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--signal);
  color: var(--signal-on);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--r-pill);
}
.product-photo .ribbon.dark { background: var(--dark); color: var(--text-on-dark); }
.product-photo .ribbon.dark .ms { color: var(--signal); font-size: 12px; vertical-align: -2px; margin-right: 2px; }
.product-photo .ribbon.busy { background: var(--busy-soft); color: var(--busy); }

.product-photo .qty-min {
  position: absolute;
  bottom: 10px; left: 10px;
  background: rgba(255,255,255,0.95);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  backdrop-filter: blur(4px);
}
.product-photo.bg-tire .qty-min { background: rgba(247, 246, 242, 0.92); }

.product-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product-supplier {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
}
.product-supplier .verified {
  color: var(--info);
  font-size: 12px;
  font-variation-settings: 'opsz' 20, 'wght' 600, 'FILL' 1, 'GRAD' 0;
}

.product-name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
  min-height: 36px;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.product-tags .tag { font-size: 11px; padding: 2px 7px; }

.product-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.product-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.product-price .v {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}
.product-price .unit {
  font-size: 11px;
  color: var(--text-muted);
}

.add-to-cart {
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  border: 0;
  background: var(--dark);
  color: var(--signal);
  display: grid; place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 120ms ease;
}
.add-to-cart:hover { transform: scale(1.08); }
.add-to-cart .ms { font-size: 18px; }

.add-to-cart-row {
  display: flex;
  align-items: center;
  background: var(--dark);
  border-radius: var(--r-pill);
  padding: 2px;
  gap: 0;
  color: var(--text-on-dark);
}
.add-to-cart-row button {
  width: 28px; height: 28px;
  border: 0;
  background: transparent;
  color: var(--text-on-dark);
  cursor: pointer;
  display: grid; place-items: center;
}
.add-to-cart-row button:hover { color: var(--signal); }
.add-to-cart-row .q {
  font-family: var(--font-mono);
  font-weight: 600;
  min-width: 24px;
  text-align: center;
  font-size: 13px;
}

/* section heads in MP */
.mp-section { margin-bottom: 40px; }
.mp-section .section-head h2 { font-size: 22px; font-family: var(--font); font-weight: 600; }
.mp-section .section-head .section-sub { margin-top: 4px; }

/* horizontal supplier scroller styles already done above */
