/* =====================================================
   OHC — Tests Catalog Page Styles
   ===================================================== */

/* PAGE HERO */
.page-hero {
  background: var(--grad-hero);
  padding: 56px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero::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: 50px 50px;
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: white;
  margin: 8px 0;
}
.page-hero p {
  color: rgba(255,255,255,0.7);
  max-width: 520px;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

/* BREADCRUMB */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 12px;
}
.breadcrumb a { color: rgba(255,255,255,0.7); }
.breadcrumb a:hover { color: white; }
.breadcrumb svg { width: 12px; height: 12px; }

/* SEARCH BAR */
.page-search-bar {
  display: flex;
  align-items: center;
  background: white;
  border-radius: var(--r-xl);
  padding: 6px 6px 6px 16px;
  max-width: 560px;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.page-search-bar .search-icon { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.page-search-bar input {
  flex: 1; border: none; outline: none;
  font-size: 0.92rem; background: transparent;
  color: var(--text-primary);
}
.page-search-bar .btn { flex-shrink: 0; }

/* LAYOUT */
.tests-main { padding: 32px 0 60px; }
.tests-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .tests-layout { grid-template-columns: 1fr; }
  .tests-sidebar { position: static; }
}

/* SIDEBAR */
.tests-sidebar { position: sticky; top: calc(var(--nav-h) + 16px); }
.filter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px;
}
.filter-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
}
.filter-title svg { width: 16px; height: 16px; color: var(--primary-text); }
.clear-filters-btn {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--accent);
  background: none; border: none; cursor: pointer;
  font-weight: 600;
}
.filter-group { margin-bottom: 20px; }
.filter-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.filter-options {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.filter-chip {
  padding: 5px 12px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.filter-chip:hover { border-color: var(--primary-text); color: var(--primary-text); }
.filter-chip.active {
  background: var(--primary-text);
  border-color: var(--primary-text);
  color: white;
}

.price-inputs {
  display: flex; align-items: center; gap: 8px;
}
.price-inputs input {
  flex: 1; padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 0.82rem;
  background: var(--surface-2);
  color: var(--text-primary);
  width: 0;
}
.price-inputs input:focus { outline: none; border-color: var(--primary); }
.price-inputs span { color: var(--text-muted); flex-shrink: 0; }

.filter-select {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 0.85rem;
  background: var(--surface-2);
  color: var(--text-primary);
  cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--primary); }

.mobile-filter-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--r-lg);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  margin-bottom: 12px;
}
.mobile-filter-toggle svg { width: 16px; height: 16px; }
.filter-count {
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 20px;
}
@media (max-width: 900px) {
  .mobile-filter-toggle { display: flex; }
  .filter-card { display: none; }
  .tests-sidebar.mobile-open .filter-card { display: block; }
}

/* TOP BAR */
.tests-top-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.results-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.view-toggle { display: flex; gap: 4px; }
.view-btn {
  width: 34px; height: 34px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
}
.view-btn svg { width: 16px; height: 16px; }
.view-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* TESTS GRID */
.tests-grid[data-view="grid"] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.tests-grid[data-view="list"] {
  display: flex; flex-direction: column; gap: 12px;
}
@media (max-width: 540px) {
  .tests-grid[data-view="grid"] { grid-template-columns: 1fr; }
}

/* TEST CARD */
.test-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 18px;
  transition: all 0.25s ease;
  display: flex; flex-direction: column; gap: 10px;
}
.test-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.tests-grid[data-view="list"] .test-card {
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
}
.tests-grid[data-view="list"] .test-card .test-name { font-size: 1rem; }

.test-card-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
}
.test-icon {
  width: 44px; height: 44px;
  background: rgba(27,46,107,0.08);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.test-icon svg { width: 22px; height: 22px; color: var(--primary-text); }
.test-meta { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

.test-report-badge {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.7rem; font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 3px 8px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
}
.test-report-badge svg { width: 11px; height: 11px; }

.test-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  flex: 1;
}
.test-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.test-includes {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.test-includes span {
  font-size: 0.68rem;
  background: rgba(53,99,200,0.07);
  color: var(--primary-text);
  padding: 2px 8px;
  border-radius: var(--r-full);
  border: 1px solid rgba(53,99,200,0.15);
  font-weight: 500;
}

.test-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--border);
}
.test-price { display: flex; align-items: baseline; gap: 6px; }
.price-current { font-size: 1.1rem; font-weight: 800; color: var(--primary-text); }
.price-mrp { font-size: 0.75rem; color: var(--text-muted); text-decoration: line-through; }
.price-off { font-size: 0.7rem; font-weight: 700; color: var(--success); }

/* NO RESULTS */
.no-results {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 60px 20px; text-align: center;
}
.no-results svg { width: 48px; height: 48px; color: var(--text-muted); }
.no-results p { color: var(--text-muted); font-size: 0.95rem; }

/* LOAD MORE */
.load-more-wrap {
  display: flex; justify-content: center;
  margin-top: 32px;
}

/* dark mode handled globally via --primary-text in design-system.css */
