:root {
  --bg-page: #f5f7fa;
  --bg-card: #ffffff;
  --bg-alt: #eef2f7;
  --text-main: #111827;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border-subtle: #e5e7eb;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

/* СБРОС / БАЗА */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text-main);
  background: var(--bg-page);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

/* КОНТЕЙНЕР */

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(145deg, #e5e7eb, #cbd5f5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.logo-title {
  font-weight: 600;
  font-size: 16px;
}

.logo-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.main-nav {
  display: none;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}

.main-nav a {
  padding: 4px 0;
  position: relative;
  color: var(--text-muted);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.main-nav a:hover {
  color: var(--text-main);
}

.main-nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-phone {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.header-phone-main {
  font-weight: 600;
  font-size: 14px;
}

.link-button {
  padding: 0;
  border: none;
  background: none;
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
}

.cart-button {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-page);
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.cart-button:hover {
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.cart-icon {
  font-size: 18px;
}

.cart-text {
  display: none;
  flex-direction: column;
  align-items: flex-start;
}

.cart-title {
  font-size: 12px;
  font-weight: 600;
}

.cart-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

/* БУРГЕР */

.burger {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  cursor: pointer;
}

.burger span {
  height: 2px;
  border-radius: 999px;
  background: #111827;
  width: 100%;
}

/* ИНФО ПОЛОСА */

.top-info-bar {
  border-top: 1px solid var(--border-subtle);
  background: #f9fafb;
  font-size: 12px;
  color: var(--text-muted);
}

.info-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 16px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-item::before {
  content: "●";
  font-size: 6px;
}

/* HERO */

.hero {
  padding: 32px 0 24px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

.hero-content h1 {
  font-size: 26px;
  margin: 0 0 12px;
}

.hero-content p {
  margin: 0 0 20px;
  color: var(--text-muted);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-meta-item {
  padding: 10px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.hero-meta-value {
  font-weight: 600;
  font-size: 14px;
}

.hero-meta-label {
  font-size: 11px;
  color: var(--text-muted);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-warehouse {
  position: relative;
  background: #e5e7eb;
  border-radius: 24px;
  padding: 18px 18px 24px;
  box-shadow: var(--shadow-soft);
  min-width: 260px;
}

.hero-block-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.hero-block-row--shifted {
  margin-left: 18px;
}

.hero-block {
  flex: 1;
  height: 32px;
  border-radius: 10px;
}

.hero-block--light {
  background: #f3f4f6;
}

.hero-block--dark {
  background: #d1d5db;
}

.hero-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 11px;
  box-shadow: var(--shadow-soft);
}

/* СЕКЦИИ */

.section {
  padding: 32px 0;
}

.section-alt {
  background: #f3f4f8;
}

.section-header {
  margin-bottom: 20px;
}

.section-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.section-header--row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
}

/* GRID */

.grid {
  display: grid;
  gap: 16px;
}

.grid-categories {
  grid-template-columns: minmax(0, 1fr);
}

.grid-products {
  grid-template-columns: minmax(0, 1fr);
}

.grid-products--dense {
  grid-template-columns: minmax(0, 1fr);
}

/* КАРТОЧКИ */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

/* КАТЕГОРИИ */

.category-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-title {
  margin: 0;
  font-size: 16px;
}

.category-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.category-footer {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.category-count {
  color: var(--text-muted);
}

.category-link {
  color: var(--accent);
}

/* ТОВАРЫ */

.product-card {
  display: flex;
  flex-direction: column; /* вертикальная карточка */
  gap: 10px;
  position: relative;
  height: 100%;
}

/* ВЕРТИКАЛЬНАЯ КАРТОЧКА: изображение сверху */
.product-visual {
  margin-bottom: 10px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(145deg, #e5e7eb, #d1d5db); /* фон-заглушка */
}

.product-visual img {
  display: block;
  width: 100%;
  height: 160px;        /* можешь поменять под свой дизайн */
  object-fit: cover;
}

/* Плейсхолдер, когда нет фото */
.product-visual__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  font-size: 12px;
  color: var(--text-muted);
  background: #e5e7eb;
}

/* КОМПАКТНАЯ КАРТОЧКА (если где-то нужна “в ряд”) */
.product-card--compact {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
}

.product-card--compact .product-visual {
  margin-bottom: 0;
  margin-right: 12px;
  flex: 0 0 80px;
}

.product-card--compact .product-visual img,
.product-card--compact .product-visual__placeholder {
  height: 64px;
}

/* Лейбл (в наличии / хит и т.п.) */
.product-label {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  font-size: 10px;
  font-weight: 600;
}

.product-body {
  padding-top: 6px;
}

.product-title {
  margin: 0 0 2px;
  font-size: 15px;
}

.product-meta {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
}

.product-price {
    color: rgb(6, 146, 59);
  font-weight: 600;
  font-size: 15px;
}

.product-price-note {
  font-size: 11px;
  color: var(--text-muted);
}

.product-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

/* компактный футер — кнопки в колонку и прижаты вправо */
.product-footer--compact {
  flex-direction: column;
  align-items: flex-end;
}

/* СТАРЫЕ ЗАГЛУШКИ product-thumb, если ещё используешь где-то: */
.product-thumb {
  height: 90px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #e5e7eb, #d1d5db);
}

.product-thumb--plate {
  background: linear-gradient(145deg, #cbd5f5, #e5e7eb);
}

.product-thumb--block {
  background: linear-gradient(145deg, #e5e7eb, #facc15);
}

.product-thumb--ring {
  background: radial-gradient(circle at center, #f3f4f6 35%, #d1d5db 80%);
}


/* ОТЗЫВЫ */

.reviews {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-card {
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: none;
  border: 1px solid var(--border-subtle);
  opacity: 0.7;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.review-card--active {
  opacity: 1;
  box-shadow: var(--shadow-soft);
}

.review-text {
  font-size: 14px;
  margin-bottom: 10px;
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.review-author {
  font-weight: 600;
  color: var(--text-main);
}

.review-rating {
  margin-left: auto;
}

.reviews-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 4px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: #d1d5db;
  cursor: pointer;
}

.dot--active {
  width: 18px;
  background: var(--accent);
}

/* FAQ */

.faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
}

.faq-toggle {
  font-size: 18px;
  color: var(--text-muted);
}

.faq-answer {
  padding: 0 14px 12px;
  font-size: 13px;
  color: var(--text-muted);
  display: none;
}

.faq-item.is-open .faq-answer {
  display: block;
}

.faq-item.is-open .faq-toggle {
  transform: rotate(45deg);
}

/* КОНТАКТЫ */

.contacts-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.contacts-info p {
  color: var(--text-muted);
  font-size: 14px;
}

.contacts-block {
  margin-top: 12px;
  font-size: 13px;
}

.contacts-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
}

.contacts-label {
  font-weight: 500;
  font-size: 12px;
  color: var(--text-muted);
}

.contacts-form h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 13px;
}

.form-field span {
  color: var(--text-muted);
}

.form-field input,
.form-field textarea,
.catalog-sort select {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 8px 10px;
  font: inherit;
  background: #ffffff;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.catalog-sort select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.form-note {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* КАТАЛОГ КОНТРОЛЫ */

.catalog-controls {
  font-size: 13px;
}

.catalog-sort select {
  font-size: 13px;
}

/* КНОПКИ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: #f9fafb;
}

.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--accent);
}

.btn-ghost:hover {
  background: rgba(37, 99, 235, 0.06);
}


/* FOOTER */

.site-footer {
  background: #111827;
  color: #e5e7eb;
  margin-top: 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 40px 16px;
}

.footer-logo .logo-mark {
  background: #1f2937;
  color: #e5e7eb;
}

.footer-text {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 8px;
}

.footer-col h4 {
  font-size: 14px;
  margin: 0 0 8px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: #9ca3af;
}

.footer-links li + li {
  margin-top: 4px;
}

.footer-links a:hover {
  color: #e5e7eb;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  font-size: 12px;
}

.footer-bottom-inner {
  padding: 10px 16px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: space-between;
  color: #6b7280;
}

/* АДАПТИВ */

@media (min-width: 640px) {
  .hero-inner {
    gap: 32px;
  }

  .hero-content h1 {
    font-size: 30px;
  }

  .grid-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contacts-inner {
    grid-template-columns: 1.1fr 1fr;
  }
}

@media (min-width: 768px) {
  .header-inner {
    padding: 10px 16px;
  }

  .main-nav {
    display: flex;
  }

  .header-phone {
    display: flex;
  }

  .cart-text {
    display: flex;
  }

  .burger {
    display: none;
  }

  .hero {
    padding: 40px 0 28px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
  }

  .grid-products--dense {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reviews {
    gap: 16px;
  }

  .review-card {
    padding: 18px;
  }

  .section {
    padding: 40px 0;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1.2fr);
    padding: 40px 16px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1240px;
  }

  .hero-content h1 {
    font-size: 34px;
  }

  .grid-categories {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .grid-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero {
    padding: 48px 0 32px;
  }
}

/* Мобильное выпадающее меню */

@media (max-width: 767px) {
  .main-nav {
    position: fixed;
    inset: 60px 16px auto 16px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
    display: none;
  }

  .main-nav.is-open {
    display: flex;
  }
}

/* SHOP */
.catalog-page {
  display: flex;
  gap: 2rem;
}

.catalog-page__sidebar {
  width: 250px;
}

.catalog-page__content {
  flex: 1;
}

/* Категории */

.shop-category-list__items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shop-category-list__item + .shop-category-list__item {
  margin-top: 0.5rem;
}

.shop-category-list__link {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid #eee;
}

.shop-category-list__link:hover {
  border-color: #ccc;
}

/* Список товаров */

.shop-product-list__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.shop-product-card {
  border: 1px solid #eee;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.shop-product-card__image {
  width: 100%;
  display: block;
  object-fit: cover;
}

.shop-product-card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  height: 180px;
  color: #777;
}

.shop-product-card__body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.shop-product-card__name {
  font-weight: 600;
  text-decoration: none;
}

.shop-product-card__sku {
  font-size: 0.9rem;
  color: #777;
}

.shop-product-card__price {
  font-weight: 600;
  margin-top: 0.25rem;
}

.shop-product-card__more {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Страница товара */

.shop-product-page__main {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.shop-product-page__images {
  flex: 0 0 400px;
}

.shop-product-page__image-main img {
  max-width: 100%;
  height: auto;
  display: block;
}

.shop-product-page__gallery {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.shop-product-page__gallery-item {
  cursor: pointer;
}

.shop-product-page__info {
  flex: 1;
}

.shop-product-page__title {
  margin-top: 0;
}

.shop-product-page__table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.shop-product-page__table th,
.shop-product-page__table td {
  padding: 0.3rem 0.5rem;
  border: 1px solid #eee;
}

@media (max-width: 900px) {
  .catalog-page {
    flex-direction: column;
  }

  .catalog-page__sidebar {
    width: 100%;
  }

  .shop-product-page__main {
    flex-direction: column;
  }

  .shop-product-page__images {
    flex: 1 1 auto;
  }
}
