/* ==========================================================================
   1. VARIABLES DE ESTILO Y RESET (Estilo Cuadrofilia / E-commerce Dark)
   ========================================================================== */
:root {
  --bg-dark: #0a0a0a;
  --card-bg: #121212;
  --card-border: #242424;
  --yellow-accent: #ffcc00;
  --yellow-hover: #e6b800;
  --text-main: #ffffff;
  --text-muted: #a1a1aa;
  --font-family: 'Plus Jakarta Sans', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
}

/* ==========================================================================
   2. BANNER SUPERIOR PROMOCIONAL
   ========================================================================== */
.promo-bar {
  background-color: var(--yellow-accent);
  color: #000;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  text-align: center;
  flex-wrap: wrap;
}

.promo-bar i {
  margin-right: 5px;
}

/* ==========================================================================
   3. HEADER Y BUSCADOR PRINCIPAL
   ========================================================================== */
.main-header {
  background-color: #000000;
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

/* Logo */
.logo {
  text-decoration: none;
}

.logo-text {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-text .logo-brand {
  color: var(--yellow-accent);
}

/* Clase de accesibilidad: solo legible por lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Buscador Central */
.search-box {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 25px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  flex-grow: 1;
  max-width: 480px;
  transition: border-color 0.2s;
}

.search-box:focus-within {
  border-color: var(--yellow-accent);
}

.search-box i {
  color: var(--text-muted);
  margin-right: 10px;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  width: 100%;
  font-size: 0.9rem;
}

.header-icons {
  display: flex;
  gap: 18px;
}

.header-icons a {
  color: #fff;
  font-size: 1.2rem;
  transition: color 0.2s;
}

.header-icons a:hover {
  color: var(--yellow-accent);
}

/* ==========================================================================
   4. NAVEGACIÓN Y DROPDOWNS
   ========================================================================== */
.main-nav {
  border-top: 1px solid #1a1a1a;
  background-color: #050505;
}

.main-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li {
  position: relative; /* Clave para que el submenú se posicione justo debajo */
}

.nav-link {
  color: #d4d4d8;
  text-decoration: none;
  padding: 12px 22px;
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--yellow-accent);
}

.sale-tag {
  color: var(--yellow-accent);
}

/* Menú Desplegable */
.dropdown-menu {
  display: none !important; /* Forzamos que esté oculto */
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #121212;
  border: 1px solid #27272a;
  border-radius: 8px;
  min-width: 200px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  padding: 8px 0;
  list-style: none;
}

.dropdown:hover .dropdown-menu {
  display: flex !important;
  flex-direction: column;
}

.dropdown-menu a {
  color: #e4e4e7;
  padding: 10px 18px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.2s, color 0.2s;
}

.dropdown-menu a:hover {
  background: #242424;
  color: var(--yellow-accent);
}
.dropdown-menu li {
  width: 100%;
}

.dropdown-menu a, 
.dropdown-menu .btn-filter, 
.dropdown-menu .btn-tag {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  color: #e4e4e7 !important;
  padding: 10px 18px !important;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.dropdown-menu a:hover, 
.dropdown-menu .btn-filter:hover, 
.dropdown-menu .btn-tag:hover {
  background: #242424 !important;
  color: var(--yellow-accent) !important;
}

/* ==========================================================================
   5. FILTROS RÁPIDOS (PILLS)
   ========================================================================== */
.filters-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 20px;
}

.quick-filters {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pills-wrapper {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-filter, .btn-tag {
  background: #18181b;
  border: 1px solid #27272a;
  color: #e4e4e7;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-filter:hover, .btn-tag:hover {
  border-color: var(--yellow-accent);
  color: var(--yellow-accent);
}

.btn-filter.active, .btn-tag.active {
  background: var(--yellow-accent);
  color: #000;
  border-color: var(--yellow-accent);
  font-weight: 700;
}

/* ==========================================================================
   6. GRILLA DE PRODUCTOS Y TARJETAS E-COMMERCE
   ========================================================================== */
.catalog-container {
  max-width: 1200px;
  margin: 0 auto 4rem auto;
  padding: 0 20px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--yellow-accent);
  box-shadow: 0 10px 20px rgba(255, 204, 0, 0.08);
}

.card-img {
  position: relative;
  width: 100%;
  height: 250px;
  background: #000;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

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

.badge-piezas {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--yellow-accent);
  color: var(--yellow-accent);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.card-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tag-mini {
  font-size: 0.7rem;
  background: #1f1f23;
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.size-selector {
  margin-bottom: 1rem;
}

.size-selector label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.size-select {
  width: 100%;
  background: #18181b;
  border: 1px solid #27272a;
  color: #fff;
  padding: 0.55rem;
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.size-select:focus {
  border-color: var(--yellow-accent);
}

.card-specs {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  min-height: 2.2em;
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--card-border);
  padding-top: 1rem;
}

.price-container {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.price-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--yellow-accent);
}

.btn-buy {
  background: var(--yellow-accent);
  color: #000;
  font-weight: 700;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s, transform 0.1s;
}

.btn-buy:hover {
  background: var(--yellow-hover);
  transform: scale(1.03);
}

/* Responsivo para celulares */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 12px;
  }
  .search-box {
    width: 100%;
    max-width: 100%;
  }
  .promo-bar {
    gap: 10px;
    font-size: 0.75rem;
  }
}

/* ==========================================================================
   ESPECIFICACIONES Y ACORDEONES (ESTILO CUADROFILIA)
   ========================================================================== */

/* Puntos clave / Highlights */
.product-highlights {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  background: #18181b;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #27272a;
}

.product-highlights span {
  font-size: 0.72rem;
  color: var(--yellow-accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Selectores de acabado y medida */
.option-selector, .size-selector {
  margin-bottom: 10px;
}

.option-selector label, .size-selector label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.finish-select, .size-select {
  width: 100%;
  background: #18181b;
  border: 1px solid #27272a;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.finish-select:focus, .size-select:focus {
  border-color: var(--yellow-accent);
}

/* Acordeones desplegables para Especificaciones */
.specs-accordion {
  background: #151518;
  border: 1px solid #27272a;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.specs-accordion summary {
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #e4e4e7;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, color 0.2s;
}

.specs-accordion summary::-webkit-details-marker {
  display: none;
}

.specs-accordion summary:hover {
  background: #242424;
  color: var(--yellow-accent);
}

.specs-accordion p {
  padding: 8px 12px 12px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  border-top: 1px solid #27272a;
}

/* ==========================================
   PREVISUALIZACIÓN DE IMÁGENES
   ========================================== */

.card-img img {
  cursor: pointer;
}

/* Fondo oscuro */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

/* Imagen ampliada */
.image-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
}

/* Botón cerrar */
.image-modal .close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
}

/* correccion de stilos moviles */
/* ==========================
   VISOR DE IMÁGENES
   ========================== */

.card-img img {
  cursor: pointer;
}

.image-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.image-modal img {
  max-width: 95%;
  max-height: 95%;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0,0,0,.5);
}

.image-modal .close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: white;
  font-size: 45px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
}

.image-modal .close:hover {
  color: #ffcc00;
}

/* estilos para abrir la imagen
/* Modal de Imagen Ampliada */
.modal-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

.modal-content {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  transition: transform 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
}

/* Indicador visual de que la imagen de la tarjeta es clickeable */
.card-img {
  cursor: zoom-in;
}

/* footer */
/* Footer & Redes Sociales */
.site-footer {
  background-color: var(--card-bg, #1e1e1e);
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  padding: 2.5rem 1rem;
  margin-top: 4rem;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.footer-text {
  color: var(--text-muted, #a0a0a0);
  font-size: 0.95rem;
  margin: 0;
}

.dev-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.dev-link:hover {
  color: var(--accent-color, #00d2ff);
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

/* Estilos base para los botones del footer */
.btn-dev-social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Botón Sitio Web 360Digital */
.btn-web {
  background-color: transparent;
  color: #00d2ff;
  border: 1px solid #00d2ff;
}

.btn-web:hover {
  background-color: #00d2ff;
  color: #000;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.35);
  transform: translateY(-2px);
}

/* Botón Portafolio Samdersson */
.btn-portfolio {
  background-color: transparent;
  color: #a855f7;
  border: 1px solid #a855f7;
}

.btn-portfolio:hover {
  background-color: #a855f7;
  color: #fff;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.35);
  transform: translateY(-2px);
}

/* Botón Instagram */
.btn-instagram {
  background-color: transparent;
  color: #e1306c;
  border: 1px solid #e1306c;
}

.btn-instagram:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(225, 48, 108, 0.35);
  transform: translateY(-2px);
}

/* Botón WhatsApp */
.btn-whatsapp {
  background-color: transparent;
  color: #25d366;
  border: 1px solid #25d366;
}

.btn-whatsapp:hover {
  background-color: #25d366;
  color: #000;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
  transform: translateY(-2px);
}

/* Ajuste responsivo para pantallas medianas/grandes */
@media (min-width: 768px) {
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* 📜 Scroll Vertical para el menú de categorías */
#dropdown-categorias {
  max-height: 300px; /* Altura máxima visible (ajusta este valor a tu gusto) */
  overflow-y: auto;  /* Activa la barra de desplazamiento vertical */
}

/* 🎨 Opcional: Estilo elegante y discreto para la barra de scroll */
#dropdown-categorias::-webkit-scrollbar {
  width: 6px;
}

#dropdown-categorias::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

#dropdown-categorias::-webkit-scrollbar-thumb {
  background: #333333;
  border-radius: 4px;
}

#dropdown-categorias::-webkit-scrollbar-thumb:hover {
  background: #ff0000; /* Resalta con el rojo de tu marca */
}

/* ==========================================
   ESTILOS DE PAGINACIÓN - 360 DIGITAL
   ========================================== */

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0 20px 0;
  padding: 10px;
  flex-wrap: wrap;
}

/* Botón general de página */
.btn-page {
  background-color: #121212;
  color: #e0e0e0;
  border: 1px solid #2a2a2a;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  user-select: none;
}

/* Estado Hover (Al pasar el cursor) */
.btn-page:hover:not(.disabled):not(.active) {
  background-color: #ff0000;
  color: #ffffff;
  border-color: #ff0000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

/* Estado Activo (Página actual) */
.btn-page.active {
  background: linear-gradient(135deg, #ff0000 0%, #b30000 100%);
  color: #ffffff;
  border-color: #ff0000;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
  cursor: default;
}

/* Estado Deshabilitado (Flechas en extremos) */
.btn-page.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background-color: #0a0a0a;
  border-color: #1f1f1f;
  color: #666666;
}

/* Animación sutil al hacer clic */
.btn-page:active:not(.disabled) {
  transform: translateY(0);
}

/* Ajustes Responsivos para Celulares */
@media (max-width: 576px) {
  .pagination-container {
    gap: 5px;
    margin: 25px 0 15px 0;
  }

  .btn-page {
    padding: 8px 12px;
    font-size: 0.85rem;
    min-width: 36px;
    min-height: 36px;
  }
}