/* ===================================
   CATALOG PAGE STYLES
   =================================== */

/* --- Hero --- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: visible;
  background: var(--color-bg);
}

/* Accent Color Banner */
.hero__banner {
  background: var(--color-accent);
  padding-top: calc(var(--nav-height) + var(--space-8));
  padding-bottom: var(--space-16);
  position: relative;
}

.hero__banner::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--color-accent);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
}

.hero__title {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: white;
  text-align: center;
  line-height: 1.25;
  font-weight: var(--weight-bold);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hero__title em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.9);
}

/* Search Card Panel */
.hero__search-panel {
  position: relative;
  z-index: 2;
  margin-top: -40px;
  padding-bottom: var(--space-8);
}

.hero__search-card {
  background: white;
  border-radius: var(--radius-2xl);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
}

/* Search Bar */
.hero__search {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.hero__search-field {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.hero__search-icon {
  position: absolute;
  left: var(--space-4);
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
}

.hero__search-input {
  width: 100%;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-12);
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  font-size: var(--text-base);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero__search-input::placeholder {
  color: var(--color-text-muted);
}

.hero__search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.hero__search-btn {
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-6);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
}

/* Trust Indicators */
.hero__trust {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-2);
}

.hero__trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: var(--weight-medium);
}

.hero__trust-item i, .hero__trust-item svg {
  color: #16A34A;
}

/* ============================
   HERO CATEGORY FILTERS (hf)
   ============================ */
.hf {
  margin-bottom: var(--space-4);
}

/* --- Filter Pill Tabs --- */
.hf__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.hf__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: white;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
}

.hf__tab i, .hf__tab svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.hf__tab-arrow {
  width: 14px !important;
  height: 14px !important;
  color: var(--color-text-muted) !important;
  margin-left: 2px;
  transition: transform 0.25s ease;
}

.hf__tab:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(220, 38, 38, 0.03);
}

.hf__tab:hover i, .hf__tab:hover svg {
  color: var(--color-accent);
}

.hf__tab--active {
  background: var(--color-accent) !important;
  border-color: var(--color-accent) !important;
  color: white !important;
}

.hf__tab--active i, .hf__tab--active svg {
  color: white !important;
}

.hf__tab--active .hf__tab-arrow {
  transform: rotate(180deg);
}

.hf__tab-label {
  font-size: var(--text-sm);
  font-weight: inherit;
  color: inherit;
}

/* --- Expandable Drawer --- */
.hf__drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease,
              margin-top 0.25s ease;
  opacity: 0;
  margin-top: 0;
}

.hf__drawer--open {
  max-height: 200px;
  opacity: 1;
  margin-top: var(--space-3);
}

.hf__drawer-inner {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  position: relative;
}

.hf__drawer-inner::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 30px;
  transform: rotate(45deg);
  width: 10px;
  height: 10px;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
}

/* --- Filter Chips --- */
.hf__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  animation: hfChipsFadeIn 0.25s ease forwards;
}

@keyframes hfChipsFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hf__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  background: white;
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.hf__chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(220, 38, 38, 0.04);
}

.hf__chip--active {
  background: var(--color-accent) !important;
  border-color: var(--color-accent) !important;
  color: white !important;
  font-weight: var(--weight-semibold);
}

.hf__chip--active:hover {
  background: #B91C1C !important;
}

/* --- Active Filter Badges --- */
.hf__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
  min-height: 0;
}

.hf__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-full);
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  animation: hfBadgeIn 0.25s ease forwards;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hf__badge:hover {
  background: rgba(220, 38, 38, 0.15);
}

.hf__badge i {
  width: 12px;
  height: 12px;
}

@keyframes hfBadgeIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* --- Filter Range Sliders --- */
.hf__range-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 450px;
  margin: 0 auto;
  padding: var(--space-2) 0;
  animation: hfChipsFadeIn 0.25s ease forwards;
}

.hf__range-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

.hf__range-value {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  background: white;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  min-width: 100px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.hf__range-sep {
  color: var(--color-text-muted);
  font-weight: var(--weight-medium);
}

.hf__range-track {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}

.hf__range-track input[type="range"] {
  width: 100%;
  accent-color: var(--color-accent);
  cursor: pointer;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  outline: none;
}

/* --- Mobile Responsive (hf) --- */
@media (max-width: 768px) {
  .hf__tabs {
    gap: 6px;
  }

  .hf__tab {
    padding: 8px 12px;
    font-size: var(--text-xs);
  }

  .hf__tab-arrow {
    display: none;
  }

  .hf__drawer-inner {
    padding: var(--space-3);
  }

  .hf__chip {
    padding: 6px 12px;
    font-size: var(--text-xs);
  }

  .hero__trust {
    flex-direction: row;
    justify-content: center;
    gap: var(--space-3);
    flex-wrap: nowrap;
  }

  .hero__trust-item {
    font-size: 10px;
    gap: 4px;
    white-space: nowrap;
  }

  .hero__trust-item i, .hero__trust-item svg {
    width: 12px !important;
    height: 12px !important;
  }
}

/* --- Catalog --- */
.catalog__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.catalog__title {
  margin-bottom: var(--space-1);
}

.catalog__filter-toggle {
  display: none;
}

.catalog__layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: var(--space-8);
  align-items: flex-start;
}

.catalog__filters {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-6));
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.filter-section {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.filter-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-section__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-section__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.range-display {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
  font-weight: var(--weight-medium);
}

.catalog__results {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.catalog__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.catalog__grid .card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.catalog__load-more {
  text-align: center;
  margin-top: var(--space-8);
}

/* Skeleton cards */
.skeleton-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
}

.skeleton-card__image {
  aspect-ratio: 16/10;
  background: linear-gradient(90deg, var(--color-muted) 25%, #f1f5f9 50%, var(--color-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-card__body {
  padding: var(--space-5);
}

.skeleton-card__line {
  height: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--color-muted) 25%, #f1f5f9 50%, var(--color-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: var(--space-3);
}

.skeleton-card__line--short { width: 60%; }
.skeleton-card__line--xs { width: 40%; height: 10px; }

/* --- Steps --- */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-4);
}

.step {
  text-align: center;
  padding: var(--space-8) var(--space-6);
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  flex: 1;
  max-width: 320px;
  position: relative;
  transition: all var(--transition-slow);
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.step__number {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}

.step__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  background: var(--color-accent-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.step__icon i { width: 28px; height: 28px; }

.step__title {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

.step__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

.step__connector {
  display: flex;
  align-items: center;
  padding-top: var(--space-16);
  color: var(--color-text-muted);
}

/* --- Trust --- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.trust-card {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl);
  transition: all var(--transition-slow);
}

.trust-card:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-4px);
}

.trust-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  background: var(--color-accent-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.trust-card__icon i { width: 28px; height: 28px; }

.trust-card__title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: white;
  margin-bottom: var(--space-2);
}

.trust-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* --- Tracker --- */
.tracker-form__row {
  display: flex;
  gap: var(--space-3);
  max-width: 500px;
  margin: 0 auto var(--space-3);
}

.tracker-success__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  background: var(--color-success-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-success);
}

.tracker-success__icon i { width: 32px; height: 32px; }

.tracker-success__text {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}

.tracker-success__dev {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--color-info-light);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  word-break: break-all;
}

/* --- Responsive --- */
@media (max-width: 1023px) {
  .catalog__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero__banner {
    padding-bottom: var(--space-12);
  }

  .hero__title {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
  }

  .hero__search-card {
    padding: var(--space-4);
  }

  .hero__search {
    flex-direction: column;
  }

  .catalog__filter-toggle {
    display: inline-flex;
  }

  .catalog__layout {
    grid-template-columns: 1fr;
  }

  .catalog__filters {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-overlay);
    border-radius: 0;
    overflow-y: auto;
    padding-bottom: var(--space-20);
  }

  .catalog__filters--open {
    display: block;
  }

  .catalog__grid {
    grid-template-columns: 1fr;
  }

  .steps {
    flex-direction: column;
    align-items: center;
  }

  .step { max-width: 100%; }
  .step__connector { display: none; }

  .trust-grid { grid-template-columns: 1fr; }

  .tracker-form__row {
    flex-direction: column;
  }
}
