/* ===================== LAYOUT DEL CATÁLOGO ===================== */
.catalogo-container {
  max-width: var(--max, 1240px);
  margin: 1.25rem auto 2.5rem;
  padding: 0 16px;
}

.titulo-catalogo {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  color: var(--verde-oscuro);
  margin: 0;
}

/* Sidebar Filtros (si se usa) */
.filtros-sidebar {
  background: var(--blanco);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--sombra);
}

.filtros-titulo {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--fondo);
  padding-bottom: 0.5rem;
}

.filtro-grupo {
  margin-bottom: 1.2rem;
}

.filtro-grupo label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/* Encabezado del catálogo */
.catalogo-header {
  margin-bottom: 1rem;
}

.catalogo-breadcrumbs {
  max-width: none;
  margin: 0 0 1rem;
  padding: 0;
}

.catalogo-breadcrumbs ol {
  border-radius: 16px;
  padding: 0.7rem 0.85rem;
}

.catalogo-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 1.2rem;
  align-items: stretch;
  padding: 1.45rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(243, 156, 18, 0.12), transparent 25%),
    linear-gradient(160deg, #ffffff 0%, #f3f8fa 100%);
  border: 1px solid #dfecee;
  box-shadow: 0 16px 34px rgba(2, 50, 56, 0.1);
  min-width: 0;
}

.catalogo-hero-copy,
.catalogo-hero-aside {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(223, 236, 238, 0.9);
  border-radius: 20px;
  padding: 1.3rem 1.35rem;
  min-width: 0;
}

.catalogo-kicker {
  margin: 0 0 0.6rem;
  color: var(--verde-claro);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 800;
}

.titulo-catalogo {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  color: var(--verde-oscuro);
  margin-bottom: 0.85rem;
  line-height: 1.08;
}

.catalogo-lead {
  margin: 0;
  max-width: 62ch;
  color: #405566;
  font-size: 1.03rem;
  line-height: 1.7;
}

.catalogo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.2rem;
}

.catalogo-actions .btn-principal,
.catalogo-actions .btn-secundario {
  width: auto;
  min-width: 210px;
  padding-inline: 1.35rem;
}

.catalogo-highlights {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}

.catalogo-highlights li {
  position: relative;
  padding: 0.85rem 0.95rem 0.85rem 2.1rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e4eef1;
  color: #23404b;
  font-weight: 700;
  line-height: 1.45;
}

.catalogo-highlights li::before {
  content: "•";
  position: absolute;
  left: 0.95rem;
  top: 0.82rem;
  color: var(--naranja);
  font-size: 1.15rem;
  line-height: 1;
}

.catalogo-hero-note {
  margin: 0.9rem 0 0;
  color: #526579;
  line-height: 1.65;
  font-size: 0.95rem;
}

.catalogo-nav-block {
  margin-bottom: 1.35rem;
}

.catalogo-nav-after {
  margin-top: 1.5rem;
}

.catalogo-nav-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.95rem;
}

.catalogo-nav-kicker {
  margin: 0 0 0.32rem;
  color: #5f7384;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 800;
}

.catalogo-nav-title {
  margin: 0;
  color: #123842;
  font-size: 1.12rem;
  line-height: 1.35;
}

.catalogo-reset-link {
  color: var(--verde-oscuro);
  font-weight: 700;
  text-decoration: none;
}

.catalogo-reset-link:hover {
  text-decoration: underline;
}

.categoria-descripcion {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem 1.8rem;
  margin: -1.5rem auto 2rem;
  box-shadow: var(--sombra-suave);
  color: #3c3c3c;
  line-height: 1.65;
}

.categoria-descripcion h2,
.categoria-descripcion h3 {
  color: var(--verde-oscuro);
  margin-top: 0;
}

.categoria-descripcion table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.categoria-descripcion th,
.categoria-descripcion td {
  border: 1px solid #e4e4e4;
  padding: 0.6rem;
  text-align: left;
}

.categoria-descripcion ul,
.categoria-descripcion ol {
  padding-left: 1.2rem;
}

.catalogo-seo-block {
  margin: 0 auto 2rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfc 100%);
  border: 1px solid #e3edf0;
  border-radius: 18px;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 10px 24px rgba(2, 50, 56, 0.09);
  color: #334155;
}

.catalogo-seo-intro {
  margin-top: 1.5rem;
}

.catalogo-seo-block h2 {
  margin: 0 0 0.95rem;
  color: var(--verde-oscuro);
  font-size: 1.4rem;
  letter-spacing: 0.2px;
}

.catalogo-seo-block p {
  margin: 0.85rem 0;
  line-height: 1.7;
}

.catalogo-seo-html {
  line-height: 1.7;
  color: #243443;
}

.catalogo-seo-html > *:first-child {
  margin-top: 0;
}

.catalogo-seo-html > *:last-child {
  margin-bottom: 0;
}

.catalogo-seo-html h2,
.catalogo-seo-html h3,
.catalogo-seo-html h4 {
  margin: 1.2rem 0 0.7rem;
  color: #114048;
  line-height: 1.35;
}

.catalogo-seo-html h2 {
  font-size: 1.45rem;
}

.catalogo-seo-html h3 {
  font-size: 1.16rem;
}

.catalogo-seo-html ul,
.catalogo-seo-html ol {
  margin: 0.7rem 0 1rem;
  padding-left: 1.3rem;
}

.catalogo-seo-html li {
  margin-bottom: 0.45rem;
}

.catalogo-seo-html strong {
  color: #0f4d56;
}

.catalogo-seo-html table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0 0.5rem;
  font-size: 0.95rem;
  min-width: 620px;
  display: block;
  overflow-x: auto;
  border: 1px solid #d4e3e8;
  border-radius: 12px;
  background: #ffffff;
}

.catalogo-seo-html thead th {
  background: #e8f4f6;
  color: #143741;
  font-weight: 700;
}

.catalogo-seo-html th,
.catalogo-seo-html td {
  padding: 0.72rem 0.78rem;
  border-right: 1px solid #e6eef2;
  border-bottom: 1px solid #e6eef2;
  text-align: left;
  vertical-align: top;
}

.catalogo-seo-html tr:last-child td {
  border-bottom: none;
}

.catalogo-seo-html tr th:last-child,
.catalogo-seo-html tr td:last-child {
  border-right: none;
}

.catalogo-seo-html tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.catalogo-insights {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e3edf0;
  border-radius: 14px;
  margin: 0 0 1.5rem;
  background: #f6fafb;
}

.catalogo-insights-main {
  margin: 0;
  color: #24404b;
  font-size: 0.98rem;
}

.catalogo-insights-main strong {
  color: var(--verde-oscuro);
  font-size: 1.18rem;
  margin-right: 0.25rem;
}

.catalogo-insights-note {
  margin: 0;
  color: #516577;
  font-size: 0.9rem;
}

.catalogo-seo-faq {
  margin-top: 1.2rem;
  border-top: 1px solid #e7eef1;
  padding-top: 1.1rem;
}

.catalogo-seo-faq-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: #123842;
}

.catalogo-seo-faq .faq-item + .faq-item {
  margin-top: 0.7rem;
}

.catalogo-seo-faq .faq-item {
  border: 1px solid #d7e5ea;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.15rem 0.85rem;
}

.catalogo-seo-faq .faq-item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  color: #193842;
  padding: 0.65rem 1.45rem 0.65rem 0;
  position: relative;
}

.catalogo-seo-faq .faq-item summary::-webkit-details-marker {
  display: none;
}

.catalogo-seo-faq .faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #2c6771;
  font-size: 1.15rem;
  font-weight: 700;
}

.catalogo-seo-faq .faq-item[open] summary::after {
  content: "-";
}

.catalogo-seo-faq .faq-answer {
  padding-bottom: 0.7rem;
}

.catalogo-seo-faq .faq-answer p {
  margin: 0;
  color: #334155;
  line-height: 1.65;
}

/* Navegación de Categorías (Chips) */
.categorias-nav {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.categorias-nav .chip {
  min-height: 44px;
}

.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9rem;
  height: 1.9rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: rgba(5, 104, 110, 0.1);
  color: inherit;
  font-size: 0.82rem;
  font-weight: 800;
}

.chip.active .chip-count {
  background: rgba(255, 255, 255, 0.22);
}

/* Barra de controles */
.barra-controles {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border: 1px solid #e3edf0;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff, #f4f8fa);
  box-shadow: 0 8px 18px rgba(2, 50, 56, 0.06);
}

.buscador-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.buscador-wrapper .lupa {
  position: absolute;
  left: 14px;
  opacity: 0.55;
  font-size: 1rem;
  pointer-events: none;
}

#buscador {
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem 0.8rem 2.45rem;
  border-radius: 12px;
  border: 1px solid #c7d8de;
  background: #ffffff;
  color: #1f2937;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#buscador::placeholder {
  color: #64748b;
  font-weight: 500;
}

#orden-precio {
  min-height: 52px;
  width: 280px;
  border-radius: 12px;
  border: 1px solid #c7d8de;
  cursor: pointer;
  padding: 0.8rem 1rem;
  background: #ffffff;
  color: #1f2937;
  font-weight: 600;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#orden-precio:hover,
#buscador:hover {
  border-color: var(--verde-claro);
}

#orden-precio:focus,
#buscador:focus {
  border-color: var(--verde-claro);
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 141, 149, 0.16);
}

.catalogo-empty {
  text-align: center;
  margin-top: 0.8rem;
  margin-bottom: 1.4rem;
  color: #64748b;
  font-size: 1rem;
}

.catalogo-empty p {
  margin: 0;
}

@media (max-width: 650px) {
  .catalogo-container {
    margin-top: 1rem;
    padding: 0 14px;
  }

  .catalogo-breadcrumbs ol {
    border-radius: 14px;
    padding: 0.65rem 0.8rem;
  }

  .catalogo-hero-panel {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .catalogo-hero-copy,
  .catalogo-hero-aside {
    padding: 1rem;
  }

  .catalogo-actions .btn-principal,
  .catalogo-actions .btn-secundario {
    width: 100%;
    min-width: 0;
  }

  .catalogo-nav-top {
    align-items: start;
    flex-direction: column;
  }

  .categorias-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
  }

  .categorias-nav .chip {
    flex: 0 0 auto;
  }

  .barra-controles {
    grid-template-columns: 1fr;
    padding: 0.9rem;
  }
  #orden-precio {
    width: 100%;
  }

  .catalogo-seo-block {
    padding: 1rem 1rem;
  }

  .catalogo-seo-block h2 {
    font-size: 1.2rem;
  }

  .catalogo-insights {
    padding: 0.75rem 0.85rem;
    margin-top: 0;
  }

  .catalogo-insights-note {
    font-size: 0.84rem;
  }

  .catalogo-seo-html table {
    min-width: 520px;
  }
}

/* Grid principal del catálogo */
#productos,
.productos-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 25px;
}

@media (max-width: 1180px) {
  #productos,
  .productos-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  #productos,
  .productos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 560px) {
  #productos,
  .productos-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
}

.producto-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8ecef;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.producto-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

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

.card-link * {
  text-decoration: none;
}

.card-image-container {
  position: relative;
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at top, #fdfdfd 0%, #f3f6f8 70%);
  overflow: hidden;
}

.img-base, .img-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: opacity 0.3s ease-in-out;
}

.img-hover { opacity: 0; }

.producto-card:hover .img-base { opacity: 0; }
.producto-card:hover .img-hover { opacity: 1; }

.card-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(5, 104, 110, 0.92);
  color: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.producto-card:hover .card-overlay {
  opacity: 1;
  transform: translateY(0);
}

.btn-ver {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.4px;
}

.card-info {
  padding: 16px 16px 10px;
}

.card-title {
  font-size: 1.02rem;
  color: #1c2b2f;
  margin: 0 0 10px;
  line-height: 1.35;
  font-weight: 700;
  min-height: 3.9em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.price-current {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--verde-oscuro);
}

.price-old {
  font-size: 0.95rem;
  color: #888;
  text-decoration: line-through;
}

.status-msg {
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.stock-ok { color: #27ae60; }
.stock-low { color: #e67e22; }
.stock-out { color: #c0392b; }

.badge {
  position: absolute;
  top: 10px;
  z-index: 5;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
}

.oferta-badge { right: 10px; background: #F39C12; color: #fff; }
.agotado-badge { left: 10px; background: #333; color: #fff; }

.badge-oferta {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--naranja);
  color: white;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 6px;
  z-index: 15;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  pointer-events: none;
}

.badge-oferta::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: 0.5s;
}

.producto:hover .badge-oferta::after {
  left: 100%;
  transition: 0.6s;
}

.badge-agotado-grid {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(231, 76, 60, 0.9);
  color: white;
  padding: 5px 12px;
  border-radius: 5px;
  font-weight: bold;
  z-index: 10;
  font-size: 0.8rem;
}

.img-sepia {
  filter: grayscale(1) opacity(0.6);
}

.card-actions {
  padding: 0 16px 16px;
  margin-top: auto;
}

.btn-add-cart {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 13px 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
  background: linear-gradient(135deg, #0b7a7f, #21b573);
  box-shadow: 0 8px 16px rgba(10, 122, 127, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-add-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(10, 122, 127, 0.3);
}

.btn-add-cart:active {
  transform: translateY(0);
}

.btn-add-cart:disabled {
  background: #cfd6dd;
  color: #6b7280;
  cursor: not-allowed;
  box-shadow: none;
}

@media (hover: none) {
  .card-overlay {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estado de No Resultados */
.no-resultados {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 15px;
  border: 2px dashed #ddd;
}

.btn-reset {
  margin-top: 1rem;
  background: var(--verde-oscuro);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

.btn-reset:hover {
  background: var(--naranja);
}

@media (max-width: 899px) {
  .filtros-sidebar {
    position: relative;
    top: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .filtros-titulo { grid-column: 1 / -1; }
  .filtro-grupo { margin-bottom: 0; }
}
