/* =========================
   catalogo.css - estilos para catálogo y marcas
   Tonos azules, tarjetas uniformes, carrusel de marcas
   ========================= */

/* Contenedor general (si no existe .container en tu CSS global) */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* -------------------------
   RECOMENDACIONES / CATALOGO
   ------------------------- */
.recommendations {
  padding: 28px 0;
  background: transparent;
}

.recommendations__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.recommendations__title {
  margin: 0;
  font-size: 20px;
  color: #003057;
}

.recommendations__controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Flechas de control del catálogo */
.rec-arrow {
  background: #0055cc;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rec-arrow:hover { background: #003d99; }

/* Viewport (contiene la pista) */
.recommendations__viewport {
  overflow: hidden; /* ocultamos scroll y controlamos por JS */
}

/* Pista de productos (fila centrada) */
.recommendations__track {
  display: flex;
  gap: 15px;
  padding: 10px 0;
  justify-content: center; /* centra tarjetas */
  align-items: stretch;
  transition: transform 320ms ease;
  will-change: transform;
}

/* Paginador (dots) */
.recommendations__pager {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0,48,87,0.15);
  display: inline-block;
}
.rec-dot.active { background: #0055cc; }

/* -------------------------
   TARJETA DE PRODUCTO
   ------------------------- */
.producto-card {
  flex: 0 0 220px;
  background: #f0f4ff;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: center;
  font-family: Arial, sans-serif;
  color: #003057;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  min-height: 380px; /* altura uniforme */
  max-width: 240px;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}
.producto-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.10);
}

/* Imagen: ocupa un área fija para mantener consistencia */
.producto-img {
  flex-shrink: 0;
  text-align: center;
  margin-bottom: 10px;
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.producto-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

/* Nombre: max 2 renglones, con puntos suspensivos */
.producto-nombre {
  font-size: 14px;
  line-height: 1.15em;
  height: 2.3em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 6px 0;
  color: #002e4a;
  font-weight: 600;
}

/* Precio */
.producto-precio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 8px 0 10px 0;
}
.precio-original {
  font-size: 12px;
  color: #004080;
  text-decoration: line-through;
  opacity: 0.9;
}
.precio-descuento {
  font-size: 20px;
  font-weight: 700;
  color: #003057;
  letter-spacing: -0.5px;
}
.porcentaje-descuento {
  font-size: 12px;
  color: #0066cc;
  font-weight: 700;
}

/* Envío gratis */
.envio-gratis {
  font-size: 12px;
  color: #0073e6;
  margin-top: 6px;
}

/* Botón Cotízalo */
.btn-cotizar {
  background-color: #0055cc;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: auto;
  cursor: pointer;
  font-weight: 700;
  transition: background-color 0.18s ease;
}
.btn-cotizar:hover { background-color: #003d99; }

/* Small details */
.producto-card .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #0066cc;
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
}

/* -------------------------
   MARCAS (carrusel tipo arreglo)
   ------------------------- */
.marcas {
  width: 100%;
  margin: 20px 0 30px 0;
}

.marcas-container {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* Wrapper oculto */
.marcas-track-wrapper {
  overflow: hidden;
  flex: 1;
}

/* Track flexible */
.marcas-track {
  display: flex;
  gap: 0;
  align-items: center;
  transition: transform 320ms ease;
  will-change: transform;
}

/* Cada logo */
.marca-card {
  flex: 0 0 auto;
  margin: 0 12px;
  width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 6px;
  border-radius: 6px;
}
.marca-card img {
  max-width: 100%;
  height: 60px;
  object-fit: contain;
  display: block;
}

/* Flechas para marcas */
.marcas-arrow {
  background: #0055cc;
  color: #fff;
  border: none;
  border-radius: 50%;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 20px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.marcas-arrow:hover { background: #003d99; }
.marcas-arrow.left { margin-right: 8px; }
.marcas-arrow.right { margin-left: 8px; }

/* -------------------------
   ANIMACIONES / EFECTOS
   ------------------------- */
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
.fadeInRight {
  animation: fadeInRight 0.36s cubic-bezier(.2,.8,.2,1) both;
}
.fadeInLeft {
  animation: fadeInLeft 0.36s cubic-bezier(.2,.8,.2,1) both;
}

/* -------------------------
   HIDE SCROLLBARS
   ------------------------- */
.recommendations__track::-webkit-scrollbar,
.marcas-track::-webkit-scrollbar { display: none; }
.recommendations__track { -ms-overflow-style: none; scrollbar-width: none; }
.marcas-track { -ms-overflow-style: none; scrollbar-width: none; }


/* =========================
   CATALOGO - responsive móvil centrado con margen mínimo
   ========================= */
   @media (max-width: 1000px) {
    .recommendations__viewport {
      padding: 0 8px;  /* margen mínimo a los lados */
    }
  
    .recommendations__track {
      justify-content: center; /* centra los productos */
      gap: 15px;              /* separación entre tarjetas */
    }
  
    .producto-card {
      flex: 0 0 calc(25% - 15px); /* 4 productos visibles máximo */
      min-width: 160px;
      max-width: 100%;
    }
  
    .rec-arrow {
      font-size: 22px;
      padding: 8px 12px;
    }
  }
  .marca-card.selected {
    outline: 2px solid #0055cc;
    transform: scale(1.05);
    background: #eaf2ff;
  }
  
  .marca-card {
    /* Añadimos una transición para que el efecto sea suave */
    transition: transform 0.2s ease, outline 0.2s ease, background-color 0.2s ease;
  }