/* ==========================================================================
   RESET & VARIABLES
   ========================================================================== */
:root {
  --primary-blue: #1e3a8a;
  --secondary-blue: #1e3a8a;
  --text-dark: #375A90;
  --text-muted: #6b7280;
  --bg-light: #f9fafb;
  --card-bg: #ffffff;
  --accent-yellow: #fcc44c;
  --accent-yellow-hover: #f5b72b;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.5;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
  background-color: #ffffff;
  border-bottom: 2px solid #2b4c7e;
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-icon {
  font-size: 2rem;
  color: #1e40af;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1e40af;
  line-height: 1;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 0.55rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--secondary-blue);
}

.arrow {
  font-size: 0.65rem;
  margin-left: 2px;
}

/* ==========================================================================
   MAIN CONTENT & TOOLBAR
   ========================================================================== */
.main-content {
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.results-count {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.sort-select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: #ffffff;
  color: var(--text-dark);
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.sort-select:focus {
  border-color: var(--secondary-blue);
}

/* ==========================================================================
   PRODUCT GRID & CARDS (MEJORADO)
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card-image-wrapper {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: #ffffff; /* O el color de fondo de tus imágenes si no es blanco */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px; /* Espacio alrededor para que la imagen respire y no toque los bordes */
}

.card-image-wrapper img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* 👈 ESTE ES EL CAMBIO CLAVE: Muestra la imagen entera sin recortar */
  transition: var(--transition);
}

.product-card:hover .card-image-wrapper img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.category-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: capitalize;
  margin-bottom: 0.5rem;
  display: block;
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  height: 2.8em; /* Mantiene la alineación de títulos con distinto largo */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Botón estilizado */
.btn-primary {
  display: inline-block;
  text-align: center;
  background-color: var(--accent-yellow);
  color: #111827;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 2rem;
  border-radius: 20px;
  text-decoration: none;
  width: fit-content;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  background-color: var(--accent-yellow-hover);
  transform: scale(1.03);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-links {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* ==========================================================================
   FOOTER (PIE DE PÁGINA)
   ========================================================================== */
.footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding-top: 4rem;
  margin-top: 5rem;
  border-top: 3px solid var(--secondary-blue);
}

a {
  text-decoration: none;
  color: #94a3b8;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem 1.5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
  gap: 2.5rem;
}

.footer-col .logo-title {
  color: #ffffff;
}

.footer-description {
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #94a3b8;
}

.footer-heading {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  position: relative;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 35px;
  height: 2px;
  background-color: var(--accent-yellow);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

/* Social links */
.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: #1e293b;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--secondary-blue);
  transform: translateY(-3px);
}

/* Contact info */
.contact-info {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}

.contact-info li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Formulario newsletter */
.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-form input {
  padding: 0.55rem 0.75rem;
  border: 1px solid #334155;
  background-color: #1e293b;
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.85rem;
  width: 100%;
  outline: none;
}

.newsletter-form input:focus {
  border-color: var(--secondary-blue);
}

.newsletter-form button {
  background-color: var(--accent-yellow);
  color: #0f172a;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-form button:hover {
  background-color: var(--accent-yellow-hover);
}

/* Copyright Bar */
.footer-bottom {
  background-color: #020617;
  padding: 1.25rem 0;
  border-top: 1px solid #1e293b;
  font-size: 0.825rem;
}

.footer-bottom-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.legal-links {
  display: flex;
  gap: 1.5rem;
}

.legal-links a {
  color: #64748b;
  text-decoration: none;
  transition: var(--transition);
}

.legal-links a:hover {
  color: #94a3b8;
}

/* Responsivo para Footer */
@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: 1fr;
  }

  .footer-bottom-container {
    flex-direction: column;
    text-align: center;
  }
}

/* Base para todos los botones sociales */
.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background-color: #1e293b; /* Fondo oscuro base */
  color: #94a3b8;            /* Color de icono base */
  border-radius: 50%;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
}

/* Efecto hover común: se eleva y el icono se vuelve blanco */
.social-btn:hover {
  color: #ffffff;
  transform: translateY(-3px);
}

/* ==========================================================================
   HOVER PERSONALIZADO POR RED SOCIAL
   ========================================================================== */

/* Facebook (Azul oficial) */
.social-btn.facebook:hover {
  background-color: #1877f2;
  box-shadow: 0 4px 10px rgba(24, 119, 242, 0.4);
}

/* LinkedIn (Azul corporativo) */
.social-btn.linkedin:hover {
  background-color: #0a66c2;
  box-shadow: 0 4px 10px rgba(10, 102, 194, 0.4);
}

/* tiktok (Negro/Gris oscuro con brillo) */
.social-btn.tiktok:hover {
  background-color: #0f1419;
  border: 1px solid #334155;
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.15);
}

/* Instagram (Degradado característico) */
.social-btn.instagram:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  box-shadow: 0 4px 10px rgba(220, 39, 67, 0.4);
}

/* Menu desplegable para los productos */

/* Posicionamiento básico del contenedor */
.dropdown {
  position: relative;
}

/* Ocultar el menú desplegable por defecto */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff; /* Ajusta al color de tu sitio */
  min-width: 260px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.15);
  list-style: none;
  padding: 10px 0;
  margin: 0;
  z-index: 1000;
  border-radius: 4px;
}

/* Estilo para cada enlace del submenú */
.dropdown-menu li a {
  color: #333333;
  padding: 10px 16px;
  text-decoration: none;
  display: block;
  font-size: 14px;
}

.dropdown-menu li a:hover {
  background-color: #f1f1f1; /* Cambio de color al pasar el mouse */
  color: #0056b3;
}

/* Mostrar el submenú cuando se pasa el cursor sobre 'Productos' */
.dropdown:hover .dropdown-menu {
  display: block;
}