/* ===== CATÁLOGO ===== */

.catalog-page {
  background: var(--color-bg);
  min-height: calc(100vh - var(--header-height));
  padding-bottom: 24px;
}

.catalog-header {
  padding: 40px 0 8px;
}

.catalog-header h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.catalog-header p {
  color: var(--color-text-muted);
  margin-top: 8px;
}

.catalog-sim-banner {
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--color-primary-dark);
  font-weight: 500;
}

.filter-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
  padding: 0 4px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding-bottom: 64px;
}

.sidebar {
  background: var(--color-sidebar);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  height: fit-content;
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.filter-section {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.filter-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 4px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
}

.filter-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
  color: var(--color-text-muted);
}

.filter-section.collapsed .filter-toggle svg {
  transform: rotate(-90deg);
}

.filter-section.collapsed .filter-options {
  display: none;
}

.filter-options {
  padding: 4px 0 8px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.filter-option:hover {
  color: var(--color-text);
}

.filter-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.catalog-main {
  min-width: 0;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.catalog-toolbar h2 {
  font-size: 1.125rem;
  font-weight: 700;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pill-btn {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: all 0.2s;
}

.pill-btn:hover,
.pill-btn.active {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.dropdown-select {
  padding: 8px 32px 8px 16px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  appearance: none;
  background-image: 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='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.products-count {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.products-carousel {
  position: relative;
  padding: 0 40px;
}

.catalog-pagination {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 4px;
}

.catalog-pagination[hidden] {
  display: none !important;
}

.catalog-page-info {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  min-width: 7rem;
  text-align: center;
}

.catalog-page-btn {
  padding: 10px 18px;
  font-size: 0.875rem;
  min-width: 0;
}

.catalog-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  color: var(--color-text-muted);
}

.carousel-nav:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.carousel-nav.prev { left: 0; }
.carousel-nav.next { right: 0; }
.carousel-nav svg { width: 18px; height: 18px; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Tarjetas de producto (compartidas home + catálogo) */
.product-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.product-card-link {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.92);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.product-image-wrap {
  position: relative;
  padding: 20px 16px 12px;
  background: #fafbfc;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.product-image-wrap img {
  max-height: 130px;
  object-fit: contain;
}

.product-info {
  padding: 12px 14px 8px;
  flex: 1;
}

.product-name {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.3;
}

.product-spec {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.product-daily {
  font-size: 0.8125rem;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.product-daily strong {
  font-weight: 800;
  color: var(--color-accent-dark);
}

.product-price {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.product-cta {
  margin: 0 14px 14px;
  padding: 10px;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px;
  color: var(--color-text-muted);
}

@media (max-width: 1100px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .catalog-layout { grid-template-columns: 1fr; }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .filter-section { border-bottom: none; margin-bottom: 0; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .products-carousel { padding: 0; }
  .carousel-nav { display: none; }
  .catalog-pagination { display: flex; }
}

@media (max-width: 480px) {
  .sidebar { grid-template-columns: 1fr; }
  .products-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    margin: 0;
  }

  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .dropdown-select {
    width: 100%;
    max-width: 100%;
  }

  .catalog-pagination {
    gap: 8px;
  }

  .catalog-page-btn {
    flex: 1;
    min-width: 0;
  }
}
