/*
 * Стили для страницы меню магазина (menu.html).
 * Вынесено из inline <style> для кеширования и уменьшения HTML.
 */

#react-root { position: relative; z-index: 500; }

/* ── Category nav ───────────────────────────────────────────────── */
.category-buttons {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid #f0f0f0;
}
.category-buttons-container {
  max-width: var(--max-w-content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  overflow-x: auto;
  padding: 12px 16px;
  gap: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.category-buttons-container::-webkit-scrollbar { display: none; }

/* Веб: ряд категорий по центру экрана */
@media (min-width: 768px) {
  .category-buttons-container {
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
    row-gap: 10px;
  }
}

.category-button {
  flex-shrink: 0;
  border: 1.5px solid #d1d5db;
  border-radius: 9999px;
  background: #fff;
  padding: 7px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.category-button:hover,
.category-button.active {
  background: #1c1c2e;
  color: #fff;
  border-color: #1c1c2e;
}

.category-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1c1c2e;
  margin: 20px 0 12px;
  padding-left: 2px;
}

/* ── Menu area ──────────────────────────────────────────────────── */
.menu { padding: 8px 0 100px; }
.menu-sec { margin-bottom: 8px; }

/* ── Product list: мобилка ──────────────────────────────────────── */
.productlist {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: #f0f0f0;
  border-radius: 16px;
  overflow: hidden;
}

/* ── Product card: мобилка (horizontal, circular photo) ─────────── */
.product-card {
  display: flex;
  align-items: center;
  padding: 14px 12px 14px 14px;
  background: #fff;
  position: relative;
  gap: 14px;
}
.product-card:first-child { border-radius: 16px 16px 0 0; }
.product-card:last-child  { border-radius: 0 0 16px 16px; }
.product-card:only-child  { border-radius: 16px; }

.product-card-image {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  order: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-sizing: border-box;
}
.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.product-card-image--empty {
  display: flex; align-items: center;
  justify-content: center; font-size: 2rem;
}

.product-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.product-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1c1c2e;
  line-height: 1.3;
  margin: 0;
}
.product-card-description {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.product-price {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #2D9F5C;
}
.product-price--from {
  font-weight: 500;
  font-size: 0.8125rem;
  margin-right: 2px;
}
.old-price {
  font-size: 0.75rem;
  color: #9ca3af;
  text-decoration: line-through;
  margin-left: 6px;
}

.product-add-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #2D9F5C;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
  align-self: flex-end;
  margin-bottom: 2px;
}
.product-add-btn:hover  { background: #219150; }
.product-add-btn:active { transform: scale(0.93); }

/* ── SEO text ───────────────────────────────────────────────────── */
.seo-text {
  padding: 24px 0 16px;
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.6;
}

/* ── Планшет (540px+): вертикальные карточки в 2 колонки ────────── */
@media (min-width: 540px) {
  .productlist {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    background: transparent;
    border-radius: 0;
    overflow: visible;
  }
  .product-card {
    flex-direction: column;
    align-items: stretch;
    padding: 0 0 14px;
    border-radius: 16px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    gap: 0;
  }
  .product-card-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 16px 16px 0 0;
    padding: 8px;
  }
  .product-card-body {
    padding: 12px 14px 0;
  }
  .product-card-footer {
    padding: 0 14px;
    margin-top: 10px;
  }
}

/* ── Desktop (860px+): 3 колонки ───────────────────────────────── */
@media (min-width: 860px) {
  .productlist {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* ── Широкий экран: 4 карточки в ряд ───────────────────────────── */
@media (min-width: 1200px) {
  .productlist {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}
