/* =============================================
   ZZap.ru — Мобильный прототип страницы поиска
   Разработчик: Фустек
   Дата: 16.05.2026
   ============================================= */

/* --- CSS Custom Properties --- */
:root {
  /* Бренд */
  --brand-dark:      #1a1a2e;
  --brand-red:       #e74c3c;
  --brand-red-hover: #c0392b;

  /* Фоны */
  --bg-page:         #f5f5f5;
  --bg-card:         #ffffff;
  --bg-summary:      #f0f0f0;

  /* Текст */
  --text-primary:    #1a1a2e;
  --text-secondary:  #555e70;
  --text-muted:      #8a94a6;

  /* Статусы */
  --green:           #27ae60;
  --green-bg:        #e8f8ef;
  --green-text:      #1a7a4a;
  --amber:           #f39c12;
  --amber-bg:        #fff3cd;
  --amber-text:      #856404;
  --blue-bg:         #eef2ff;
  --blue-text:       #3949ab;
  --red-text:        #c0392b;

  /* Рамки */
  --border:          rgba(0,0,0,0.08);
  --border-featured: #27ae60;
  --border-strong:   rgba(0,0,0,0.15);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Global Container --- */
.app {
  max-width: 390px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-page);
  position: relative;
  overflow-x: hidden;
}

/* --- Status Bar --- */
.status-bar {
  background: var(--brand-dark);
  color: #ffffff;
  font-size: 11px;
  padding: 8px 16px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 32px;
}

.status-bar .status-icons {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

/* --- Top Bar --- */
.top-bar {
  background: var(--brand-dark);
  padding: 10px 14px 14px;
}

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

.logo-badge {
  background: var(--brand-red);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  line-height: 1.3;
}

.logo-sub {
  color: #aab4c8;
  font-size: 11px;
}

.logo-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  color: #aab4c8;
  font-size: 18px;
}

/* --- Search Box --- */
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border-radius: 10px;
  padding: 0 8px 0 12px;
  height: 44px;
  margin-top: 10px;
}

.part-number {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.search-btn {
  background: var(--brand-red);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 14px;
  height: 36px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
}

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

/* --- Filter Tabs --- */
.filter-tabs {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  background: rgba(255,255,255,0.12);
  color: #cdd6e4;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 20px;
  white-space: nowrap;
  border: 0.5px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-tab.active {
  background: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
}

.filter-tab:active {
  opacity: 0.8;
}

/* --- Summary Bar --- */
.summary-bar {
  background: var(--bg-summary);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
}

.summary-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.summary-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.stat-pill {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.stat-val {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.stat-val.green {
  color: var(--green-text);
}

.stat-val.red {
  color: var(--red-text);
}

/* --- Results Header --- */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px 6px;
}

.results-count {
  font-size: 12px;
  color: var(--text-secondary);
}

.sort-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  user-select: none;
}

.sort-btn:active {
  background: var(--bg-page);
}

/* --- Card List Container --- */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 10px 80px;
}

/* --- Part Card --- */
.part-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  user-select: none;
  transition: none;
}

.part-card:active {
  background: #f8f8f8;
}

/* Featured (лучшая цена) */
.part-card.featured {
  border: 1.5px solid var(--border-featured);
  position: relative;
}

.featured-label {
  font-size: 10px;
  color: var(--green-text);
  font-weight: 500;
  margin-bottom: 6px;
}

/* --- Card Top --- */
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.card-seller {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.seller-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  font-weight: 500;
  flex-shrink: 0;
}

.seller-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.seller-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

.seller-metro {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}

.rating-badge {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #fff8e1;
  border: 1px solid #f9a825;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 11px;
  color: #795548;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Stock Badge --- */
.instock-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-bg);
  color: var(--green-text);
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 20px;
  margin-bottom: 5px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot.green {
  background: var(--green);
}

.dot.yellow {
  background: var(--amber);
}

/* --- Courier Badge --- */
.courier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--blue-bg);
  color: var(--blue-text);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 20px;
  margin-bottom: 6px;
  margin-left: 4px;
}

/* --- Cash Only --- */
.cash-only {
  font-size: 10px;
  color: var(--red-text);
  font-weight: 500;
  margin-bottom: 5px;
  margin-left: 4px;
}

/* --- Min Order Banner --- */
.min-order-banner {
  background: var(--amber-bg);
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 10px;
  color: var(--amber-text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* --- Card Part Name --- */
.card-part-name {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.4;
}

/* --- Card Bottom --- */
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.delivery {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.delivery.today {
  color: var(--green);
}

.delivery.pending {
  color: var(--amber);
}

.delivery-note {
  font-size: 10px;
  color: var(--text-muted);
}

/* --- Card Price Block --- */
.card-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.price-main {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1;
}

.btn-order {
  background: var(--brand-red);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

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

.btn-order.outline {
  background: transparent;
  color: var(--brand-red);
  border: 1px solid var(--brand-red);
}

.btn-order.outline:active {
  background: rgba(231, 76, 60, 0.08);
}

/* --- Bottom Navigation --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--border-strong);
  display: flex;
  justify-content: space-around;
  padding: 10px 0 14px;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.nav-item i {
  font-size: 22px;
}

.nav-item.active {
  color: var(--brand-red);
}

.nav-item:active {
  opacity: 0.7;
}

/* =============================================
   ZZap.ru — Карточка продавца (seller.html)
   ============================================= */

/* --- Seller Top Bar --- */
.seller-top-bar {
  padding: 10px 14px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.seller-top-bar .top-title {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

.seller-top-bar .top-actions {
  display: flex;
  gap: 12px;
  color: #aab4c8;
  font-size: 20px;
}

.seller-top-bar .back-btn {
  color: #aab4c8;
  font-size: 20px;
  cursor: pointer;
}

/* --- Seller Hero --- */
.seller-hero {
  background: #fff;
  padding: 14px 14px 0;
  border-bottom: 0.5px solid var(--border);
}

.hero-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.seller-ava {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #fff;
  font-weight: 500;
  flex-shrink: 0;
}

.seller-main {
  flex: 1;
}

.seller-hero .seller-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.seller-type {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.seller-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.stag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 500;
}

.stag.green {
  background: var(--green-bg);
  color: var(--green-text);
}

.stag.blue {
  background: var(--blue-bg);
  color: var(--blue-text);
}

.stag.amber {
  background: var(--amber-bg);
  color: var(--amber-text);
}

/* --- Rating Row --- */
.rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.stars {
  color: #f9a825;
  font-size: 13px;
  letter-spacing: 1px;
}

.rating-num {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.rating-count {
  font-size: 11px;
  color: var(--text-muted);
}

.verified-badge {
  margin-left: auto;
  font-size: 10px;
  color: var(--green-text);
  background: var(--green-bg);
  padding: 3px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

/* --- Stats Row --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(0,0,0,0.06);
  border-top: 0.5px solid var(--border);
}

.stat-cell {
  background: #fff;
  padding: 9px 8px;
  text-align: center;
}

.stat-cell .stat-v {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.stat-cell .stat-l {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* --- Action Buttons --- */
.action-btns {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 0.5px solid var(--border);
}

.btn-call {
  flex: 1;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 10px;
  height: 42px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
}

.btn-call:active {
  background: #1e8e4f;
}

.btn-sq {
  width: 42px;
  height: 42px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 19px;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}

.btn-sq:active {
  background: var(--bg-page);
}

.btn-red {
  flex: 1;
  background: var(--brand-red);
  color: #fff;
  border: none;
  border-radius: 10px;
  height: 42px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
}

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

/* --- Seller Details --- */
.seller-details {
  background: #fff;
  padding: 8px 14px;
  border-bottom: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}

.detail-row i {
  font-size: 14px;
  color: var(--text-muted);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.detail-row .red-text {
  color: var(--red-text);
  font-weight: 500;
}

/* --- Context Banner --- */
.ctx-banner {
  background: var(--brand-dark);
  margin: 8px 10px 0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ctx-icon {
  color: var(--brand-red);
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}

.ctx-title {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
}

.ctx-sub {
  font-size: 10px;
  color: #aab4c8;
  line-height: 1.4;
}

.ctx-query {
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10px;
  color: #e8e8e8;
  display: inline-block;
  margin-top: 4px;
  font-family: monospace;
}

/* --- Section Header --- */
.section-header {
  padding: 12px 14px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 20px;
}

.section-badge.red {
  background: #fdecea;
  color: var(--red-text);
}

.section-badge.amber {
  background: var(--amber-bg);
  color: var(--amber-text);
}

.section-badge.blue {
  background: var(--blue-bg);
  color: var(--blue-text);
}

.section-link {
  font-size: 12px;
  color: var(--brand-red);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
  user-select: none;
}

.section-link:active {
  opacity: 0.7;
}

/* --- Goods List --- */
.goods-list {
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 8px;
}

/* --- Good Card --- */
.good-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  border-left: 3px solid transparent;
}

.good-card.exact {
  border-left-color: var(--brand-red);
}

.good-card.same-cat {
  border-left-color: var(--amber);
}

.good-card.same-brand {
  border-left-color: var(--blue-text);
}

.gc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.gc-num {
  font-size: 10px;
  color: var(--text-muted);
  background: #f5f5f5;
  border-radius: 5px;
  padding: 2px 6px;
  font-family: monospace;
  flex-shrink: 0;
}

.gc-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
}

.gc-badge.exact {
  background: #fdecea;
  color: var(--red-text);
}

.gc-badge.cat {
  background: var(--amber-bg);
  color: var(--amber-text);
}

.gc-badge.brand {
  background: var(--blue-bg);
  color: var(--blue-text);
}

.gc-name {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 7px;
  line-height: 1.4;
}

.gc-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.gc-stock {
  font-size: 10px;
  color: var(--green-text);
  display: flex;
  align-items: center;
  gap: 3px;
}

.gc-delivery {
  font-size: 10px;
  color: var(--text-muted);
}

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

.gc-price {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.btn-add {
  background: var(--brand-red);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

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

.btn-add.outline {
  background: transparent;
  color: var(--brand-red);
  border: 1px solid var(--brand-red);
}

.btn-add.outline:active {
  background: rgba(231, 76, 60, 0.08);
}

/* --- Divider Line --- */
.divider-line {
  margin: 4px 14px;
  height: 0.5px;
  background: rgba(0,0,0,0.06);
}
