/* ============================================================
   Seguí Clima – Catalog Page
   Custom styles for the full product catalog (PAGE_CUSTOM + customType=catalog)
   ============================================================ */

/* ---- Hero -------------------------------------------------- */
.catalog-hero {
  background: linear-gradient(135deg, var(--sc-primary) 0%, var(--sc-primary-light) 60%, #026cd1 100%);
  color: #fff;
  padding: 2.5rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.catalog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.catalog-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.catalog-hero-text {
  flex: 1;
  min-width: 200px;
}

.catalog-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.catalog-hero-eyebrow svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

.catalog-hero-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.5rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.catalog-hero-subtitle {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  line-height: 1.5;
}

.catalog-hero-stats {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.catalog-stat-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
  min-width: 110px;
  text-align: center;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease;
}

.catalog-stat-card:hover {
  background: rgba(255, 255, 255, 0.15);
}

.catalog-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.catalog-stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.2rem;
}

/* ---- Category Quick Nav ------------------------------------ */
.catalog-categories-nav {
  background: #fff;
  border-bottom: 1px solid var(--sc-border);
  padding: 1.25rem 0;
}

.catalog-categories-nav-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sc-text-muted);
  margin-bottom: 0.875rem;
}

.catalog-categories-scroll {
  display: flex;
  gap: 0.625rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.catalog-categories-scroll::-webkit-scrollbar {
  display: none;
}

.catalog-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  scroll-snap-align: start;
  padding: 0.5rem 0.875rem;
  border-radius: 2rem;
  border: 1.5px solid var(--sc-border);
  background: #fff;
  color: var(--sc-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--sc-transition);
  flex-shrink: 0;
}

.catalog-category-chip:hover,
.catalog-category-chip:focus {
  background: var(--sc-primary);
  border-color: var(--sc-primary);
  color: #fff;
  text-decoration: none;
}

.catalog-category-chip img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
}

.catalog-category-chip-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tb-primary-100);
  border-radius: 4px;
  color: var(--sc-primary);
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.catalog-category-chip:hover .catalog-category-chip-icon,
.catalog-category-chip:focus .catalog-category-chip-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.catalog-category-chip-icon svg {
  width: 12px;
  height: 12px;
}

/* Subcategories expandable section */
.catalog-subcategories-bar {
  padding: 1rem 0 0.25rem;
}

.catalog-subcategories-heading {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.catalog-subcategories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
}

.catalog-subcat-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--sc-border);
  background: #fff;
  color: #2d3748;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--sc-transition);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-subcat-link:hover {
  background: var(--tb-primary-100);
  border-color: var(--tb-primary-300);
  color: var(--sc-primary);
  text-decoration: none;
}

.catalog-subcat-link svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--sc-text-muted);
}

/* ---- Responsive -------------------------------------------- */
@media (max-width: 575.98px) {
  .catalog-hero {
    padding: 1.75rem 0 1.5rem;
  }

  .catalog-hero-inner {
    flex-direction: column;
    gap: 1.25rem;
  }

  .catalog-hero-stats {
    width: 100%;
    justify-content: flex-start;
  }

  .catalog-stat-card {
    padding: 0.625rem 1rem;
    min-width: 90px;
  }

  .catalog-stat-value {
    font-size: 1.25rem;
  }
}

@media (min-width: 992px) {
  .catalog-hero {
    padding: 3rem 0 2.5rem;
  }

  .catalog-hero-inner {
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .catalog-categories-nav {
    padding: 1.5rem 0;
  }
}

/* Mobile/touch performance guard — backdrop-filter (ver components.css).
   Evita el crash del proceso GPU en Android (pestaña en blanco al hacer scroll)
   desactivando el blur en táctil y usando un fondo más opaco. */
@media (hover: none) and (pointer: coarse) {
  .catalog-stat-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.25);
  }
}
