:root {
  --red: #f34735;
  --red-dark: #de3e2e;
  --green: #25a244;
  --text: #1f1f1f;
  --muted: #666;
  --bg: #f5f5f5;
  --line: #e8e8e8;
  --danger: #d63b32;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

.container {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #ececec;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  flex: 0 0 auto;
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.brand-title span {
  color: var(--red);
}

.hero {
  background: #fff;
  padding: 18px 0;
  border-bottom: 1px solid #eee;
}

.hero-card {
  background: var(--red);
  color: #fff;
  border-radius: 16px;
  padding: 22px 16px 18px;
  overflow: hidden;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.04;
  font-weight: 800;
  max-width: 580px;
}

.hero p {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.32;
  max-width: 640px;
}

.search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  height: 48px;
  margin-bottom: 10px;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 14px;
  font-size: 16px;
  min-width: 0;
}

.search-box button {
  width: 52px;
  height: 48px;
  border: none;
  background: #1b88da;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.hint {
  font-size: 13px;
  line-height: 1.35;
  color: #ffe7e3;
  margin-bottom: 14px;
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  border: none;
  cursor: pointer;
}

.btn.white {
  background: #fff;
  color: #1f1f1f;
}

.btn.darkred {
  background: #c73426;
  color: #fff;
}

.btn.outline {
  background: #fff;
  border: 1px solid #d9d9d9;
  color: #1f1f1f;
}

.btn.red {
  background: var(--red);
  color: #fff;
}

.btn.danger {
  background: var(--danger);
  color: #fff;
}

.btn.small-btn {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
}

.hero-note {
  font-size: 14px;
  line-height: 1.4;
  color: #fff4f2;
}

.section {
  padding: 20px 0;
}

.section h2 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.1;
}

.chips {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  white-space: nowrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  flex: 0 0 auto;
}

.categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 10px;
  text-align: center;
  font-weight: 700;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.products {
  display: grid;
  gap: 12px;
}

.product {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.product img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  background: #fafafa;
  display: block;
  padding: 10px;
}

.product-body {
  padding: 14px;
}

.product-title {
  font-size: 19px;
  line-height: 1.24;
  font-weight: 700;
  margin-bottom: 6px;
}

.product-article,
.product-seller {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.product-price {
  font-size: 30px;
  font-weight: 800;
  margin: 8px 0 12px;
}

.btn-green {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

.steps {
  display: grid;
  gap: 10px;
}

.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.step strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.step span {
  color: var(--muted);
  line-height: 1.4;
  font-size: 15px;
}

.accent,
.seller-block,
.detail-section-card,
.seller-page-card,
.bridge-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 16px;
}

.accent h3,
.bridge-text h3 {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.1;
}

.accent p,
.seller-block p,
.detail-section-card p,
.dashboard-subtitle,
.form-note,
.bridge-text p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.42;
  font-size: 16px;
}

.detail-section-card {
  margin-top: 16px;
}

.catalog-bridge-note {
  margin-top: 18px;
}

.bridge-empty {
  margin-top: 8px;
}

.bridge-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.single-btn {
  width: 100%;
}

.seller-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.seller-actions .btn {
  min-height: 46px;
}

footer {
  margin-top: 10px;
  background: #efefef;
  border-top: 1px solid #ddd;
}

.footer-inner {
  padding: 18px 0 24px;
  display: grid;
  gap: 10px;
  color: #565656;
  font-size: 14px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

/* Формы продавца */
.seller-form {
  display: grid;
  gap: 12px;
}

.seller-form p {
  margin: 0;
  display: grid;
  gap: 6px;
}

.seller-form label {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

.seller-form input,
.seller-form select,
.seller-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  font-size: 15px;
  background: #fff;
  outline: none;
}

.seller-form textarea {
  min-height: 110px;
  resize: vertical;
}

.form-error {
  background: #fff0ee;
  color: #b93326;
  border: 1px solid #ffd0ca;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}

.form-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.current-image-box {
  margin: 8px 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
}

.current-image-box img {
  width: 100%;
  max-width: 240px;
  height: 180px;
  object-fit: contain;
  display: block;
  margin-top: 8px;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
}

.dashboard-header {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Фильтры каталога */
.catalog-filter-form {
  display: grid;
  gap: 14px;
}

.filter-grid {
  display: grid;
  gap: 12px;
}

.filter-field {
  display: grid;
  gap: 6px;
}

.filter-field label {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

.filter-field input,
.filter-field select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  font-size: 15px;
  background: #fff;
  outline: none;
}

.filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-actions .btn {
  min-width: 140px;
}

/* Карточка товара */
.breadcrumbs {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.product-detail {
  display: grid;
  gap: 16px;
}

.product-gallery,
.product-info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.product-main-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border-radius: 12px;
  padding: 12px;
}

.product-main-image img {
  width: 100%;
  max-width: 420px;
  height: 220px;
  object-fit: contain;
  display: block;
}

.product-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.product-thumbs img {
  width: 100%;
  height: 72px;
  object-fit: contain;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
}

.product-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffe8e5;
  color: var(--red-dark);
  font-size: 14px;
  font-weight: 700;
}

.badge.muted {
  background: #f1f1f1;
  color: #555;
}

.product-detail-title {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.15;
}

.detail-article {
  color: var(--muted);
  margin-bottom: 12px;
  font-size: 15px;
}

.detail-price {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-box {
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.detail-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.detail-value {
  font-size: 16px;
  font-weight: 700;
  word-break: break-word;
}

.detail-wa-btn {
  width: 100%;
  min-height: 50px;
}

@media (min-width: 768px) {
  .container {
    width: min(1180px, calc(100% - 32px));
  }

  .topbar-inner {
    padding: 16px 0;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .brand-title {
    font-size: 28px;
  }

  .hero-card {
    padding: 28px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero p {
    font-size: 22px;
  }

  .hint {
    font-size: 14px;
  }

  .btn-row {
    display: flex;
    gap: 12px;
  }

  .btn-row .btn {
    min-width: 220px;
  }

  .categories {
    grid-template-columns: repeat(3, 1fr);
  }

  .products {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-links {
    grid-template-columns: repeat(4, auto);
    gap: 18px;
  }

  .single-btn {
    width: auto;
    min-width: 220px;
  }

  .product-detail {
    grid-template-columns: 0.95fr 1.05fr;
    align-items: start;
  }

  .product-main-image img {
    max-width: 480px;
    height: 320px;
  }

  .filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-search {
    grid-column: span 2;
  }

  .dashboard-header {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .bridge-block {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
  }
}

@media (min-width: 1100px) {
  .products {
    grid-template-columns: repeat(4, 1fr);
  }

  .categories {
    grid-template-columns: repeat(6, 1fr);
  }

  .product-main-image img {
    max-width: 520px;
    height: 360px;
  }

  .filter-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    align-items: end;
  }

  .filter-search {
    grid-column: span 1;
  }
}