/* ============================================
   КАТАЛОГ ТОВАРОВ
   ============================================ */

.catalog-section {
  padding: 38px 0;
  padding-bottom: calc(var(--header-height) + var(--space-2xl));
  min-height: 100vh;
  min-height: 100dvh;
  display: none;
  background: linear-gradient(180deg, #edf4f2 0%, #ffffff 45%);
}

.catalog-section.active { display: block; animation: fadeIn 0.3s ease; }

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: var(--space-sm);
}

.catalog-back {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition-base);
  flex-shrink: 0; color: var(--color-text-primary);
}

.catalog-back:hover { background: var(--color-bg-card-hover); border-color: var(--color-border-hover); }

.catalog-title {
  font-size: 16px; font-weight: 800;
  flex: 1; text-align: center;
  text-transform: uppercase;
}

.catalog-title span { color: var(--color-accent); }

.catalog-count {
  font-size: 11px; color: var(--color-text-secondary);
  flex-shrink: 0; min-width: 40px; text-align: right;
}

.catalog-filters {
  display: flex; gap: 11px; margin-bottom: 14px;
  overflow-x: auto; padding-bottom: var(--space-xs);
  scrollbar-width: none; -ms-overflow-style: none;
}

.catalog-filters::-webkit-scrollbar { display: none; }

.filter-chip {
  height: 27px;
  padding: 0 13px;
  background: var(--color-bg-card); border: 1px solid #e8e8e8;
  border-radius: 999px; font-size: 12px;
  font-weight: 650; color: #222;
  cursor: pointer; white-space: nowrap; transition: all var(--transition-base);
}

.filter-chip:hover { border-color: var(--color-border-hover); color: var(--color-text-primary); }
.filter-chip.active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

.products-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 13px; }

.product-card {
  background: var(--color-bg-card); border: 1px solid #e3e3e3;
  border-radius: 22px; overflow: hidden; cursor: pointer;
  transition: all var(--transition-base); position: relative;
}

.product-card:hover { border-color: var(--color-border-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.product-card:active { transform: scale(0.98); }

.product-card-image { width: 100%; aspect-ratio: 1 / 0.92; background: #d9d9d9; position: relative; overflow: hidden; }
.product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.product-card:hover .product-card-image img { transform: scale(1.05); }

.product-favorite-btn,
.product-detail-favorite-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.58);
  border-radius: 50%;
  background: rgba(255,255,255,0.82);
  color: #253133;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,0.14);
  backdrop-filter: blur(12px);
  transition: transform var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.product-favorite-btn svg,
.product-detail-favorite-btn svg {
  width: 17px;
  height: 17px;
}

.product-favorite-btn:active,
.product-detail-favorite-btn:active {
  transform: scale(0.92);
}

.product-favorite-btn.active,
.product-detail-favorite-btn.active {
  background: rgba(255,255,255,0.95);
  color: #d8315b;
}

.product-favorite-btn.active svg,
.product-detail-favorite-btn.active svg {
  fill: currentColor;
}

.product-card-image-placeholder {
  width: 100%; height: 100%;
}

.product-badge {
  position: absolute; left: 7px; bottom: 6px;
  min-width: 39px;
  padding: 3px 5px; background: var(--color-purple); color: white;
  font-size: 7px; font-weight: 800;
  border-radius: 999px; text-transform: none; text-align: center; z-index: 1;
}

.product-card-info { padding: 7px 8px 9px; }

.product-card-name {
  font-size: 10px; font-weight: 650;
  color: #202020; margin-bottom: 2px;
  line-height: 1.15;
  min-height: 22px;
  overflow: hidden;
}

.product-card-category { font-size: 9px; color: var(--color-text-secondary); margin-bottom: 5px; font-weight: 650; }

.product-card-sizes { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 6px; }

.product-size-tag {
  padding: 2px 5px; background: #f1f1f1;
  border-radius: 999px; font-size: 9px; color: var(--color-text-secondary);
}

.product-size-tag.highlight { background: var(--color-accent); color: #fff; font-weight: var(--font-weight-semibold); }

.product-card-price { font-size: 14px; font-weight: 800; color: #111; line-height: 1.05; }

.product-card-price-old {
  font-size: 10px; color: var(--color-text-tertiary);
  text-decoration: line-through; margin-left: var(--space-xs);
}

/* Detail modal */
.product-detail-images { position: relative; width: 100%; aspect-ratio: 1; background: var(--color-bg-secondary); overflow: hidden; }
.product-detail-images img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-images-placeholder { width: 100%; height: 100%; }

.image-nav {
  position: absolute;
  bottom: var(--space-base);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-xs);
  padding: 6px 8px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius-full);
  background: rgba(13,31,33,0.44);
  backdrop-filter: blur(14px);
}

.image-nav-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.58);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.image-nav-dot.active {
  width: 22px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
}

.product-detail-info { padding: var(--space-lg); }
.product-detail-name { font-size: var(--font-size-xl); font-weight: 800; margin-bottom: var(--space-xs); }
.product-detail-category { font-size: var(--font-size-sm); color: var(--color-text-tertiary); margin-bottom: var(--space-lg); }
.product-detail-price { font-size: var(--font-size-2xl); font-weight: 800; color: #111; margin-bottom: var(--space-lg); }

.product-detail-section { margin-bottom: var(--space-lg); }
.product-detail-section-title { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: var(--letter-spacing-wide); margin-bottom: var(--space-sm); }

.product-detail-sizes { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.product-detail-size { position: relative; padding: var(--space-sm) var(--space-base); background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: 999px; font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); color: var(--color-text-secondary); cursor: pointer; transition: all var(--transition-fast); min-width: 48px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.product-detail-size:hover, .product-detail-size.selected { background: var(--color-accent); border-color: var(--color-accent); color: white; }
.product-detail-size.last-pair { border-color: var(--color-warning, #f59e0b); }
.product-detail-size.last-pair:hover, .product-detail-size.last-pair.selected { background: var(--color-warning, #f59e0b); border-color: var(--color-warning, #f59e0b); color: #000; }

.detail-size-badge { font-size: 9px; font-weight: 700; line-height: 1; white-space: nowrap; }
.detail-size-badge.last-pair { color: var(--color-warning, #f59e0b); }
.product-detail-size.selected .detail-size-badge.last-pair { color: #000; }
.detail-size-badge.low-stock { color: var(--color-text-tertiary); }

.product-detail-description { font-size: var(--font-size-md); color: var(--color-text-secondary); line-height: var(--line-height-relaxed); }

.whatsapp-btn {
  width: 100%; padding: var(--space-base); background: #25D366; color: white;
  border-radius: 999px; font-size: var(--font-size-md); font-weight: var(--font-weight-semibold);
  display: flex; align-items: center; justify-content: center; gap: var(--space-sm);
  cursor: pointer; transition: all var(--transition-base); border: none; margin-top: var(--space-lg);
}
.whatsapp-btn:hover { background: #22c55e; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(37,211,102,0.3); }
.whatsapp-btn:active { transform: scale(0.98); }
.whatsapp-btn svg { width: 22px; height: 22px; }

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