/**
 * electronica.css - Estilos para la página de Electrónica
 * Catálogo de productos con diseño similar a solar.css
 */

/* ============================================================================
   LAYOUT GENERAL Y HERO
   ============================================================================ */

:root {
  --electronica-500: #0d6efd;
  --elec-100: #e7f1ff;
  --muted: #6c757d;
  --card-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

.hero-elec {
  background: linear-gradient(180deg, rgba(13, 110, 253, 0.06) 0%, rgba(255, 255, 255, 0) 60%);
  padding: 4rem 0;
}

.hero-elec h1 {
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.03;
  color: #0e1720;
}

.hero-elec .lead {
  color: var(--muted);
  font-size: 1.0625rem;
}

.hero-right-card {
  background: #fff;
  border-radius: 0.9rem;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(17, 24, 39, 0.03);
}

.hero-right-card h6 {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.list-check {
  padding-left: 0.9rem;
  color: var(--muted);
}

.list-check li {
  margin-bottom: 0.5rem;
}

.years-badge {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e7f1ff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--electronica-500);
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 8px 24px rgba(13, 110, 253, 0.06);
  border: 1px solid rgba(13, 110, 253, 0.12);
}

.years-badge .years-small {
  font-size: 0.65rem;
  line-height: 1;
  margin-top: -2px;
  color: #0b5ed7;
  font-weight: 600;
}

.btn-electronica {
  background: var(--electronica-500);
  color: #fff;
  border: none;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  display: inline-block;
  text-decoration: none;
  font-size: 1rem;
}

.btn-electronica:hover {
  filter: brightness(0.95);
  text-decoration: none;
  color: #fff;
}

.icon-accent-electronica {
  color: var(--electronica-500);
}

/* Modo oscuro */
body.theme-nocturne .hero-elec {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.6) 100%);
}

body.theme-nocturne .hero-elec h1,
body.theme-nocturne .hero-elec p,
body.theme-nocturne .hero-elec .lead {
  color: #f8fafc;
}

body.theme-nocturne .hero-right-card,
body.theme-nocturne .catalog-left-card,
body.theme-nocturne .catalog-left-wrapper,
body.theme-nocturne .catalog-grid .card,
body.theme-nocturne .product-card,
body.theme-nocturne .contact-card {
  background: #111827;
  color: #e2e8f0;
  border-color: rgba(226, 232, 240, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

body.theme-nocturne .catalog-left-wrapper {
  background: #0f172a;
  border-color: rgba(15, 23, 42, 0.8);
}

body.theme-nocturne .list-check li,
body.theme-nocturne .catalog-left-card p,
body.theme-nocturne .partner-name,
body.theme-nocturne .contact-card .contact-card-subtitle {
  color: #cbd5f5;
}

body.theme-nocturne .years-badge {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0.3) 100%);
  color: #e2e8f0;
  border-color: rgba(226, 232, 240, 0.2);
}

body.theme-nocturne .btn-store {
  background: rgba(13, 110, 253, 0.12);
  color: #e0ebff;
  border-color: rgba(13, 110, 253, 0.5);
}

body.theme-nocturne .btn-store:hover {
  background: var(--electronica-500);
  color: #fff;
}

body.theme-nocturne .contact-cta-btn {
  border-color: rgba(255, 255, 255, 0.2);
  color: #dbeafe;
}

body.theme-nocturne .contact-cta-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ============================================================================
   CATÁLOGO Y TARJETAS DE CONTENIDO
   ============================================================================ */

.catalog-grid .card {
  border: none;
  border-radius: 0.6rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catalog-grid .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.12);
}

.catalog-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.catalog-card-body {
  padding: 0.75rem;
}

.btn-producto {
  background: var(--electronica-500);
  color: #fff;
  border: none;
}

.btn-producto:hover {
  background: #0b5ed7;
  color: #fff;
}

.btn-store {
  background: #fff;
  color: var(--electronica-500);
  border: 1px solid var(--electronica-500);
}

.btn-store:hover {
  background: var(--electronica-500);
  color: #fff;
}

.catalog-left-wrapper {
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(17, 24, 39, 0.03);
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.catalog-hero-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.catalog-left-card {
  background: #fff;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.catalog-left-card h5 {
  font-weight: 700;
}

.catalog-left-card .cta-row {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
}

.catalog-metric {
  flex: 1;
}

.catalog-wave-separator {
  display: block;
  margin-top: -1px;
}

/* ============================================================================
   PARTNERS
   ============================================================================ */

.partners-carousel-wrapper {
  overflow: hidden;
  position: relative;
  padding: 2rem 0;
}

.partners-carousel {
  display: flex;
  gap: 2rem;
  animation: scroll-partners 40s linear infinite;
}

.partners-carousel:hover {
  animation-play-state: paused;
}

.partner-item {
  flex: 0 0 auto;
  text-align: center;
  width: 140px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.partner-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(13, 110, 253, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.06);
}

.partner-item:hover .partner-circle {
  border-color: var(--electronica-500);
  box-shadow: 0 8px 24px rgba(13, 110, 253, 0.15);
  transform: translateY(-4px);
}

.partner-logo {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.partner-name {
  text-align: center;
  font-weight: 600;
  color: #1e293b;
  margin-top: 0.5rem;
}

@keyframes scroll-partners {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ============================================================================
   TARJETAS DE PRODUCTOS
   ============================================================================ */

.product-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border-radius: 0.85rem;
  border: 1px solid rgba(13, 110, 253, 0.08);
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(13, 110, 253, 0.18) !important;
}

.product-card .card-body {
  padding: 1.25rem;
}

.product-card .card-title {
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--electronica-500, #0d6efd);
  font-weight: 600;
}

.product-card img {
  transition: transform 0.3s ease;
}

.product-card:hover img {
  transform: scale(1.05);
}

/* Badges personalizados */
.product-card .badge {
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

/* Botones de acción */
.product-card .btn-primary {
  background: linear-gradient(135deg, var(--electronica-500, #0d6efd), #0b5ed7);
  border: none;
  color: white;
  font-weight: 600;
  transition: all 0.2s ease;
}

.product-card .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Estado vacío */
.empty-state {
  padding: 3rem 1rem;
}

.empty-state i {
  opacity: 0.3;
}

/* ============================================================================
   DETALLE DE PRODUCTO
   ============================================================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-detail-content h3 {
  color: var(--electronica-500, #0d6efd);
  font-weight: 700;
}

.product-detail-content .list-unstyled li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.product-detail-content .list-unstyled li:last-child {
  border-bottom: none;
}

/* ============================================================================
   MODAL DE CATÁLOGO
   ============================================================================ */

#catalogModal .modal-header {
  background: linear-gradient(135deg, #f0f7ff 0%, #e7f1ff 100%);
  border-bottom: 1px solid rgba(13, 110, 253, 0.1);
}

#catalogModal .modal-title {
  color: var(--electronica-500, #0d6efd);
  font-weight: 700;
}

#catalogModal .modal-dialog {
  max-width: 1200px;
  width: 100%;
  height: 85vh;
  margin: auto;
  display: flex;
  align-items: center;
}

#catalogModal .modal-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.75rem;
}

#catalogModal .modal-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: visible !important;
  padding-bottom: 0 !important;
  min-height: 0;
}

.catalog-wrapper {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.products-list,
.product-detail {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  max-height: none;
}

.product-detail {
  animation: fadeIn 0.3s ease;
}

[data-catalog-pagination] {
  flex: 0 0 auto;
}

/* Scroll suave */
.products-list::-webkit-scrollbar {
  width: 8px;
}

.products-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.products-list::-webkit-scrollbar-thumb {
  background: var(--electronica-500, #0d6efd);
  border-radius: 4px;
}

.products-list::-webkit-scrollbar-thumb:hover {
  background: #0b5ed7;
}

/* ============================================================================
   BOTONES DE CATEGORÍA
   ============================================================================ */

.open-catalog-btn {
  background: var(--electronica-500, #0d6efd);
  border: none;
  color: white;
  transition: all 0.2s ease;
}

.open-catalog-btn:hover {
  background: #0b5ed7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* ============================================================================
   FOOTER ELECTRÓNICA
   ============================================================================ */

.site-footer-electronica {
  background: linear-gradient(135deg, #0b5ed7 0%, #0d6efd 100%);
  padding: 2rem 0;
  color: white;
}

.text-white-90 {
  color: rgba(255, 255, 255, 0.9);
}

/* ============================================================================
   PANEL DE CONTACTO (usa estilos unificados en common.css, solo define acento)
   ============================================================================ */

.contact-panel-electronica {
  --contact-accent: var(--electronica-500, #0d6efd);
  --contact-accent-strong: #0b5ed7;
}

/* ============================================================================
   RESPONSIVO
   ============================================================================ */

@media (max-width: 768px) {
  .product-card .row {
    flex-direction: column;
  }
  
  .product-card .col-md-3 {
    width: 100%;
  }
  
  .product-card img {
    border-radius: 0.375rem 0.375rem 0 0 !important;
    min-height: 200px;
  }
  
  .products-list {
    max-height: 500px;
  }
  
  .product-detail-content h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 767px) {
  .years-badge {
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }

  .catalog-card-img {
    height: 120px;
  }

  .partner-circle {
    width: 80px;
    height: 80px;
  }

  .partner-item {
    width: 120px;
  }
}
