/* ============================= */
/* SECCIÓN CATÁLOGO              */
/* ============================= */

.catalogo {
  position: relative;
  padding: 80px 5% 100px;
  background: #f8fafc;
  overflow: hidden;
}

.catalogo::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 320px; height: 320px;
  background: linear-gradient(135deg, rgba(0,194,255,0.08), rgba(10,31,68,0.02));
  clip-path: polygon(0 0, 100% 0, 0 100%);
  pointer-events: none;
}

.catalogo-header {
  position: relative;
  z-index: 2;
  margin-bottom: 40px;
  text-align: center;
}

.catalogo-header h2 {
  font-size: 32px;
  color: var(--azul-principal);
  font-weight: 800;
}

.catalogo-header p {
  margin-top: 8px;
  color: var(--gris-texto);
  font-size: 15px;
}

/* ============================= */
/* LAYOUT: SIDEBAR + MAIN        */
/* ============================= */

.catalogo-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  align-items: start;
}

/* ============================= */
/* SIDEBAR DE FILTROS            */
/* ============================= */

.catalogo-filtros {
  background: white;
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 4px 20px rgba(10, 31, 68, 0.07);
  position: sticky;
  top: 90px;
}

.filtros-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef2f7;
}

.filtros-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--azul-principal);
  display: flex;
  align-items: center;
  gap: 6px;
}

.filtros-limpiar {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--celeste-acento);
  font-weight: 600;
  padding: 0;
  transition: color 0.2s;
}

.filtros-limpiar:hover {
  color: var(--azul-principal);
}

.filtro-grupo {
  margin-bottom: 22px;
}

.filtro-grupo h4 {
  font-size: 12px;
  font-weight: 700;
  color: #8a9bb5;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.filtro-opciones {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filtro-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid #e8eef6;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #4a5568;
  transition: all 0.2s;
}

.filtro-btn:hover {
  border-color: var(--celeste-acento);
  color: var(--azul-principal);
  background: rgba(0, 194, 255, 0.04);
}

.filtro-btn.active {
  background: var(--azul-principal);
  border-color: var(--azul-principal);
  color: white;
  font-weight: 600;
}

.filtro-select {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1.5px solid #e8eef6;
  font-size: 13px;
  color: #4a5568;
  background: white;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.filtro-select:focus {
  border-color: var(--celeste-acento);
}

/* ============================= */
/* MAIN CONTENT                  */
/* ============================= */

.catalogo-main {
  min-width: 0;
}

.catalogo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.catalogo-contador {
  font-size: 14px;
  color: var(--gris-texto);
  font-weight: 500;
}

.filtros-toggle-mobile {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--azul-principal);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

/* Botón cerrar filtros (solo visible en móvil) */
.filtros-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(10, 31, 68, 0.06);
  border: 1px solid #e8eef6;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: var(--azul-principal);
  flex-shrink: 0;
  transition: background 0.2s;
}

.filtros-close:hover {
  background: rgba(10, 31, 68, 0.12);
}

/* Backdrop para el panel de filtros */
.filtros-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.filtros-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* ============================= */
/* CHIPS DE FILTROS ACTIVOS      */
/* ============================= */

.catalogo-chips {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}

.filtro-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 12px;
  background: rgba(0, 194, 255, 0.1);
  border: 1px solid rgba(0, 194, 255, 0.3);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  color: var(--azul-principal);
}

.chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  color: var(--azul-principal);
  padding: 0;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.chip-remove:hover { opacity: 1; }

.chip-limpiar-todo {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: #e53e3e;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}

.chip-limpiar-todo:hover {
  background: rgba(229, 62, 62, 0.08);
}

/* ============================= */
/* GRID DE PRODUCTOS             */
/* ============================= */

.catalogo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Mensaje sin resultados */
.catalogo-sin-resultados {
  text-align: center;
  margin-top: 40px;
  color: var(--gris-texto);
  font-size: 16px;
}

/* ============================= */
/* PRODUCTO CARD — REDISEÑO      */
/* ============================= */

.producto-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(10, 31, 68, 0.07);
  transition: box-shadow 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
  border: 1px solid #f0f4f8;
}

.producto-card:hover {
  box-shadow: 0 12px 32px rgba(10, 31, 68, 0.14);
  transform: translateY(-4px);
}

/* Imagen */
.producto-img-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.producto-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 16px;
  transition: transform 0.3s;
}

.producto-card:hover .producto-img-wrap img {
  transform: scale(1.05);
}

/* Badge */
.producto-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  z-index: 2;
}

.producto-badge--popular {
  background: var(--celeste-acento);
  color: white;
}

.producto-badge--nuevo {
  background: #48bb78;
  color: white;
}

/* Wishlist */
.btn-wishlist {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  z-index: 2;
  transition: transform 0.2s, background 0.2s;
}

.btn-wishlist svg {
  width: 16px;
  height: 16px;
  stroke: #a0aec0;
  fill: none;
  transition: stroke 0.2s, fill 0.2s;
}

.btn-wishlist:hover {
  transform: scale(1.1);
}

.btn-wishlist:hover svg {
  stroke: #e53e3e;
}

.btn-wishlist.active svg {
  stroke: #e53e3e;
  fill: #e53e3e;
}

/* Info del producto */
.producto-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}

.producto-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--azul-principal);
  line-height: 1.3;
}

.producto-desc {
  font-size: 11px;
  color: var(--gris-texto);
  line-height: 1.4;
}

.precio {
  font-size: 16px;
  font-weight: 700;
  color: var(--azul-principal);
  margin: 2px 0 4px;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

.precio--consultar {
  font-size: 13px;
  font-weight: 600;
  color: var(--gris-texto);
}

/* Botón carrito */
.btn-carrito {
  margin-top: auto;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: var(--azul-principal);
  color: white;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.btn-carrito svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  flex-shrink: 0;
}

.btn-carrito:hover {
  background: var(--azul-hover);
  transform: translateY(-1px);
}

.btn-carrito.agregado {
  background: #38a169;
}

/* Botón cotizar producto */
.btn-cotizar-producto {
  margin-top: auto;
  width: 100%;
  padding: 10px 16px;
  border: 2px solid var(--azul-principal);
  background: transparent;
  color: var(--azul-principal);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.btn-cotizar-producto svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  flex-shrink: 0;
}

.btn-cotizar-producto:hover {
  background: var(--azul-principal);
  color: white;
  transform: translateY(-1px);
}

/* ============================= */
/* MÁS VENDIDOS                  */
/* ============================= */

.mas-vendidos {
  padding: 70px 5%;
  background: white;
}

.mas-vendidos-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.mas-vendidos-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--celeste-acento);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.mas-vendidos-header h2 {
  font-size: 28px;
  color: var(--azul-principal);
  font-weight: 800;
  line-height: 1.1;
}

.mas-vendidos-ver-todos {
  font-size: 14px;
  font-weight: 600;
  color: var(--celeste-acento);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.mas-vendidos-ver-todos:hover {
  color: var(--azul-principal);
}

.mas-vendidos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ============================= */
/* TRUST STRIP                   */
/* ============================= */

.trust-strip {
  background: linear-gradient(135deg, #07152f 0%, #0a1f44 60%, #0d2556 100%);
  padding: 28px 5%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--celeste-acento);
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  position: relative;
  overflow: hidden;
}

/* Destello radial decorativo */
.trust-strip::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 160px;
  background: radial-gradient(ellipse, rgba(0, 194, 255, 0.10) 0%, transparent 70%);
  pointer-events: none;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 36px;
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  transition: transform 0.2s ease;
}

.trust-item:hover {
  transform: translateY(-2px);
}

.trust-item-icon {
  width: 52px;
  height: 52px;
  background: rgba(0, 194, 255, 0.12);
  border: 1px solid rgba(0, 194, 255, 0.25);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.trust-item:hover .trust-item-icon {
  background: rgba(0, 194, 255, 0.22);
  border-color: rgba(0, 194, 255, 0.5);
}

.trust-item-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--celeste-acento);
}

.trust-item-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: white;
  line-height: 1.3;
  letter-spacing: 0.1px;
}

.trust-item-text span {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
  display: block;
}

.trust-divider {
  width: 1px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

/* ============================= */
/* RESPONSIVE CATÁLOGO           */
/* ============================= */

@media (max-width: 1200px) {
  .catalogo-layout {
    grid-template-columns: 210px 1fr;
  }
  .catalogo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mas-vendidos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .catalogo-layout {
    grid-template-columns: 1fr;
    /* Neutralizar el stacking context para que el panel fijo pueda
       aparecer por encima de navbar, footer y otras secciones */
    z-index: auto;
    position: static;
  }

  .catalogo-filtros {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    overflow-y: auto;
    border-radius: 0;
    z-index: 1200;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .catalogo-filtros.open {
    transform: translateX(0);
  }

  .filtros-toggle-mobile {
    display: flex;
  }

  .filtros-close {
    display: flex;
  }

  .filtros-backdrop {
    display: block;
  }

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

  .trust-divider {
    display: none;
  }

  .trust-item {
    min-width: 160px;
    padding: 10px 16px;
  }
}

@media (max-width: 600px) {
  .catalogo {
    padding: 60px 4% 80px;
  }

  .catalogo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

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

  .producto-img-wrap {
    height: 150px;
  }

  .trust-strip {
    padding: 16px 4%;
    justify-content: flex-start;
    gap: 4px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .trust-item {
    min-width: 180px;
    flex-shrink: 0;
  }
}

@media (max-width: 400px) {
  .catalogo-grid {
    grid-template-columns: 1fr;
  }
}
