/* ============================================================
   category.css — shared styles for ALL category list pages
   (open-cars, stock-cars, tamiya-products, …)
   ============================================================ */

/* ── Page Hero ─────────────────────────────────────────────── */
.page-hero {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #0a0a0a;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
}

/* grid overlay */
.page-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 1;
}

/* dark overlay */
.page-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

/* ── per-category gradient themes ── */
.page-hero-bg.theme-open {
  background: linear-gradient(120deg, #0d0d1a 0%, #151530 35%, #1e1e50 65%, #c0392b 100%);
}
.page-hero-bg.theme-stock {
  background: linear-gradient(120deg, #0a1628 0%, #0f2746 35%, #1a4a7a 65%, #f39c12 100%);
}
.page-hero-bg.theme-tamiya {
  background: linear-gradient(120deg, #1a0000 0%, #3d0000 40%, #a00000 70%, #ff4500 100%);
}
.page-hero-bg.theme-japan {
  background: linear-gradient(120deg, #0d001a 0%, #1a0033 40%, #3d0066 70%, #cc0033 100%);
}
.page-hero-bg.theme-thai {
  background: linear-gradient(120deg, #001a0a 0%, #003320 40%, #005c38 70%, #f5c518 100%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  gap: 8px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.breadcrumb a {
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}

.breadcrumb a:hover { color: #fff; }

.bc-sep { color: rgba(255,255,255,0.3); font-size: 14px; }

.bc-current {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
}

.page-hero-title {
  font-size: 38px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}

.page-hero-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
}

/* ── Catalog Toolbar ─────────────────────────────────────────── */
.catalog-toolbar {
  border-bottom: 1px solid #eee;
  background: #fff;
  position: sticky;
  top: 68px;
  z-index: 50;
}

.catalog-toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 13px;
  font-weight: 700;
  color: #555;
  margin-right: 4px;
}

.filter-dropdown { position: relative; }

.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  white-space: nowrap;
}

.filter-btn:hover,
.filter-dropdown.open .filter-btn {
  border-color: #111;
  background: #f8f8f8;
}

.filter-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  padding: 10px 0;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 200;
}

.filter-dropdown.open .filter-menu { display: block; }

.filter-menu label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  transition: background 0.15s;
}

.filter-menu label:hover { background: #f5f5f5; }

.filter-menu input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #111;
  cursor: pointer;
}

.filter-clear {
  font-size: 12px;
  font-weight: 600;
  color: #aaa;
  padding: 7px 12px;
  border: 1.5px solid #eee;
  border-radius: 8px;
  transition: color 0.2s, border-color 0.2s;
  display: none;
  cursor: pointer;
  background: #fff;
  font-family: inherit;
}

.filter-clear.visible { display: block; }
.filter-clear:hover { color: #e53e3e; border-color: #e53e3e; }

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.result-count {
  font-size: 13px;
  color: #999;
  white-space: nowrap;
}

.sort-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 7px 36px 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 12px center;
  cursor: pointer;
  transition: border-color 0.2s;
  outline: none;
  font-family: inherit;
}

.sort-select:focus { border-color: #111; }

/* ── Nav active states ─────────────────────────────────────── */
.nav-link.active { background: #f0f0f0; color: #000; }
.cat-active { color: #111 !important; font-weight: 700 !important; }

/* ── Catalog grid ──────────────────────────────────────────── */
.catalog-main { padding: 40px 0 60px; }

.catalog-grid {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px;
}

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 52px;
  padding-bottom: 8px;
}

.page-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.page-btn:hover:not(:disabled):not(.active) {
  border-color: #111;
  color: #111;
  background: #f8f8f8;
}

.page-btn.active {
  background: #111;
  color: #fff;
  border-color: #111;
  cursor: default;
}

.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.page-ellipsis {
  color: #bbb;
  font-size: 16px;
  padding: 0 4px;
  line-height: 42px;
}

/* ── Empty state ───────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 0;
  color: #bbb;
}

.empty-state svg { margin: 0 auto 16px; display: block; opacity: 0.3; }
.empty-state p { font-size: 15px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .catalog-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 768px) {
  .catalog-toolbar-inner { flex-direction: column; align-items: flex-start; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 14px; }
  .page-hero-title { font-size: 28px; }
  .catalog-toolbar { top: 60px; }
}

@media (max-width: 480px) {
  .filter-group { gap: 6px; }
  .filter-btn { padding: 6px 10px; font-size: 12px; }
}
