:root {
  --color-canvas: #ffffff;
  --color-ink: #212121;
  --color-muted: #93939f;
  --color-hairline: #d9d9dd;
  --color-soft-stone: #eeece7;
  --color-green: #79b259;
  --color-green-dark: #5d9440;
  --color-red: #9d1c1c;
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
}
body {
  background: var(--color-canvas);
  color: var(--color-ink);
}
.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Верхняя полоса */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 40px;
}
.topbar-logo img {
  display: block;
  height: 28px;
  width: auto;
}
.topbar-label {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--color-muted);
  text-align: center;
}
.topbar-phone {
  flex-shrink: 0;
  padding: 8px 24px;
  border-radius: 9999px;
  background: var(--color-green);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}
.topbar-phone:hover {
  background: var(--color-green-dark);
}

/* Hero */
.hero {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 6px 40px 20px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 8vw, 120px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--color-ink);
}
.hero-city {
  display: flex;
  justify-content: space-between;
  font-size: clamp(14px, 2vw, 24px);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 8px;
}
.hero-city i {
  font-style: normal;
}
.hero-badge {
  flex-shrink: 0;
  width: clamp(64px, 9vw, 120px);
  height: clamp(64px, 9vw, 120px);
  border-radius: 50%;
  background: var(--color-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 700;
  margin-bottom: 1vw;
}

/* Бегущая строка */
.ticker {
  background: var(--color-green);
  overflow: hidden;
  padding: 8px 0;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 28s linear infinite;
}
.ticker-track span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}
@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Полоса баннеров */
.banner-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 40px 6px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.banner-strip {
  flex: 1;
  min-width: 0;
  height: 240px;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: center;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.banner-strip::-webkit-scrollbar {
  display: none;
}
.banner-thumb {
  flex-shrink: 0;
  height: 224px;
  aspect-ratio: 220 / 311;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--color-hairline);
  background: var(--color-soft-stone);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.banner-thumb:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.banner-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.banner-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-green);
  border: none;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    transform 0.2s;
}
.banner-arrow svg {
  width: 22px;
  height: 22px;
}
.banner-arrow:hover {
  background: var(--color-green-dark);
  transform: scale(1.05);
}

/* Лайтбокс */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.open {
  display: flex;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  user-select: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.lightbox-close:hover {
  opacity: 1;
}

/* Табы брендов */
.brand-tabs {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 8px 0 20px;
}
.brand-tab {
  padding: 10px 22px;
  border: 2px solid var(--color-green);
  border-radius: 4px;
  background: var(--color-canvas);
  color: var(--color-green);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.brand-tab.active {
  background: var(--color-green);
  color: #fff;
}
.brand-tab:hover:not(.active) {
  background: rgba(121, 178, 89, 0.1);
}

/* Поиск */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid var(--color-muted);
  padding-bottom: 8px;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}
.search-wrap:focus-within {
  border-color: var(--color-green);
}
.search-icon {
  width: 20px;
  height: 20px;
  color: var(--color-ink);
  flex-shrink: 0;
}
.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-ink);
  min-width: 0;
}
.search-input::placeholder {
  color: var(--color-muted);
}
.search-clear {
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--color-muted);
  line-height: 1;
  user-select: none;
  display: none;
  flex-shrink: 0;
}
.search-clear:hover {
  color: var(--color-ink);
}
.search-input:not(:placeholder-shown) ~ .search-clear {
  display: block;
}

/* Категории (аккордеон) */
.group-wrapper {
  border-top: 1px solid var(--color-hairline);
}
.group-wrapper:last-child {
  border-bottom: 1px solid var(--color-hairline);
}
.group-header {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 24px 0;
  user-select: none;
}
.group-num {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--color-muted);
  flex-shrink: 0;
  width: 2.5rem;
}
.group-title {
  flex: 1;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--color-ink);
  transition: color 0.2s;
  min-width: 0;
}
.group-count {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--color-muted);
  flex-shrink: 0;
}
.group-wrapper.open .group-title,
.group-wrapper.open .group-num {
  color: var(--color-green);
}
.group-body {
  padding-bottom: 32px;
}

/* Карточки товаров */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.product-card {
  background: var(--color-canvas);
  border: 1px solid var(--color-hairline);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 380px;
  transition:
    box-shadow 0.25s,
    transform 0.2s;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.12);
}
.product-img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--color-soft-stone);
  cursor: pointer;
  flex-shrink: 0;
}
.product-sku {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-mid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product-title {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-ink);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.product-stock {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-green-dark);
}
.product-prices {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.product-price {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-red);
  line-height: 1;
}
.old-price {
  font-size: 0.875rem;
  color: var(--color-muted);
  text-decoration: line-through;
}
.empty-note {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--color-muted);
  font-family: var(--font-mono);
}

/* Подвал */
.footer {
  margin-top: 80px;
  background: var(--color-green);
  padding: 80px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.footer-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 700;
  letter-spacing: -2px;
  text-transform: uppercase;
  color: #fff;
}
.footer-phone {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.footer-phone:hover {
  text-decoration: underline;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
}

main {
  padding-bottom: 2rem;
}

@media (max-width: 780px) {
  .container {
    padding: 0 16px;
  }
  .topbar {
    padding: 12px 16px;
    gap: 12px;
  }
  .topbar-label {
    display: none;
  }
  .topbar-phone {
    font-size: 0.85rem;
    padding: 6px 16px;
  }
  .hero {
    padding: 4px 16px 16px;
  }
  .hero-title {
    font-size: 8.5vw;
  }
  .hero-badge {
    margin-bottom: 0;
    width: 56px;
    height: 56px;
    font-size: 16px;
  }
  .ticker-track span {
    font-size: 0.9rem;
  }
  .banner-wrapper {
    padding: 10px 16px 6px;
    gap: 10px;
  }
  .banner-strip {
    height: 170px;
    gap: 10px;
  }
  .banner-thumb {
    height: 150px;
  }
  .banner-arrow {
    width: 40px;
    height: 40px;
  }
  .banner-arrow svg {
    width: 20px;
    height: 20px;
  }
  .brand-tabs {
    gap: 8px;
    padding-bottom: 16px;
  }
  .brand-tab {
    padding: 8px 18px;
    font-size: 1.1rem;
  }
  .search-input {
    font-size: 1.15rem;
  }
  .search-icon {
    width: 18px;
    height: 18px;
  }
  .group-header {
    gap: 14px;
    padding: 16px 0;
  }
  .group-num {
    font-size: 0.9rem;
    width: 1.6rem;
  }
  .group-title {
    font-size: 1.4rem;
    letter-spacing: 0;
  }
  .group-count {
    font-size: 0.8rem;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .product-card {
    padding: 14px;
    min-height: 300px;
    gap: 10px;
    border-radius: 12px;
  }
  .product-img {
    height: 110px;
  }
  .product-sku {
    font-size: 0.7rem;
    letter-spacing: 1px;
  }
  .product-title {
    font-size: 0.82rem;
    -webkit-line-clamp: 2;
  }
  .product-stock {
    font-size: 0.72rem;
  }
  .product-price {
    font-size: 1.5rem;
  }
  .old-price {
    font-size: 0.75rem;
  }
  .footer {
    margin-top: 48px;
    padding: 48px 16px;
  }
  .lightbox-img {
    max-width: 95vw;
    max-height: 70vh;
  }
}

@media (max-width: 360px) {
  .brand-tab {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
    padding: 8px 6px;
    font-size: 0.95rem;
  }
}
