/* ===== CATALOG.CSS ===== */

/* Page header */
.page-header {
  background: var(--brown-deep);
  padding: 48px 0 40px;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brown-mid), var(--gold), var(--brown-mid));
}
.page-header-title { font-size: clamp(24px,3vw,38px); font-weight: 900; color: #fff; margin-bottom: 8px; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: rgba(255,255,255,.5); flex-wrap: wrap; }
.breadcrumb a { color: rgba(255,255,255,.6); transition: color .2s; }
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb-sep { color: rgba(255,255,255,.3); }

/* Catalog layout */
.catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding: 48px 0; }
/* min-width:0 не даёт грид-колонкам растягиваться по контенту (grid blowout → гориз. скролл) */
.catalog-layout > * { min-width: 0; }

/* Sidebar */
.catalog-sidebar { position: sticky; top: 90px; align-self: start; }
.sidebar-block { background: #fff; border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow-soft); }
.sidebar-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brown-deep); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--cream-dark); }
.sidebar-cats { display: flex; flex-direction: column; gap: 4px; }
.sidebar-cat-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-main);
  transition: background var(--transition), color var(--transition);
}
.sidebar-cat-link:hover, .sidebar-cat-link.active { background: var(--cream); color: var(--gold); }
.sidebar-cat-link.active { font-weight: 700; }
.sidebar-cat-icon { font-size: 16px; }
.sidebar-cat-count { margin-left: auto; font-size: 11px; color: var(--text-muted); background: var(--cream-dark); padding: 2px 7px; border-radius: 10px; }

/* Sort bar */
.catalog-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.catalog-count { font-size: 14px; color: var(--text-muted); }
.catalog-sort { display: flex; align-items: center; gap: 10px; }
.sort-label { font-size: 13px; color: var(--text-muted); }
.sort-select {
  padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--cream-dark); background: #fff;
  font-size: 13px; font-family: inherit; color: var(--text-main);
  cursor: pointer; outline: none;
}
.sort-select:focus { border-color: var(--gold); }

/* Product grid */
.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.page-btn {
  min-width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  border: 1px solid var(--cream-dark); background: #fff;
  color: var(--text-main); transition: all var(--transition);
}
.page-btn:hover { border-color: var(--gold); color: var(--gold); }
.page-btn.active { background: var(--gold); border-color: var(--gold); color: var(--brown-deep); }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* Empty state */
.catalog-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.catalog-empty-icon { font-size: 60px; margin-bottom: 16px; }

/* Brand intro */
.brand-intro { display: flex; align-items: flex-start; gap: 32px; padding: 40px 0 0; }
.brand-intro-logo { width: 140px; height: 80px; border-radius: var(--radius); background: #fff; border: 1px solid var(--cream-dark); display: flex; align-items: center; justify-content: center; padding: 16px; flex-shrink: 0; }
.brand-intro-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-intro-desc { font-size: 15px; color: var(--text-muted); line-height: 1.7; padding-top: 4px; }

/* Product card image link */
.product-card-img-link { display: block; width: 100%; height: 100%; }

@media (max-width: 1024px) { .catalog-layout { grid-template-columns: 1fr; } .catalog-sidebar { position: static; } }
@media (max-width: 640px) { .catalog-grid { grid-template-columns: repeat(2, 1fr); } .brand-intro { flex-direction: column; gap: 16px; } }
@media (max-width: 400px) { .catalog-grid { grid-template-columns: 1fr; } }

/* Price filter (catalog sidebar) */
.price-range { display: flex; align-items: center; gap: 6px; }
.price-range input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--cream-dark); border-radius: 8px; font-size: 13px; -moz-appearance: textfield; }
.price-range input::-webkit-outer-spin-button, .price-range input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.price-range input:focus { outline: none; border-color: var(--gold); }
.price-range-sep { color: var(--text-muted); font-size: 13px; }
