/* Estilos personalizados para TecnoRed */

/* Variables globales */
:root {
  --tecnored-red: #e30613;
  --tecnored-blue: #004aad;
  --tecnored-dark: #0a192f;
  --tecnored-light: #e0e7ff;
  --tecnored-accent: #64ffda;
  --tecnored-gradient: linear-gradient(135deg, var(--tecnored-dark) 0%, var(--tecnored-blue) 100%);
  --white: #ffffff;
  --black: #000000;
  /* Variables de texto por defecto (antes venían del tema) */
  --text-primary: #e0e7ff; /* texto claro por defecto */
  --text-secondary: #a8b2d1; /* secundario con buen contraste */
  --text-accent: var(--tecnored-accent);
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
  /* Admin layout tamaños fijos */
  --admin-panel-height: 600px;
  --admin-sidebar-width: 300px;
}

/* Estilos generales */
html {
  scroll-behavior: auto;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-primary);
  overflow-x: hidden;
  background-color: var(--tecnored-dark);
  background-image:
    radial-gradient(circle at 25% 25%, rgba(4, 74, 173, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(227, 6, 19, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
  position: relative;
}

/* Animación de fondo con partículas flotantes */
.background-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

/* Asegurar que los elementos de la página tengan un z-index mayor */
.glass-effect,
.tech-border,
.btn-primary,
.btn-secondary,
header,
section,
.product-card,
.service-card,
.testimonial-card,
.contact-form,
.info-card {
  position: relative;
  z-index: 1;
}

.floating-particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
  pointer-events: none;
  box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.2);
}

.floating-particle.small {
  width: 5px;
  height: 5px;
  background: var(--tecnored-blue);
}

.floating-particle.medium {
  width: 10px;
  height: 10px;
  background: var(--tecnored-red);
}

.floating-particle.large {
  width: 15px;
  height: 15px;
  background: var(--tecnored-accent);
}

.floating-particle.glow {
  background: transparent;
  border: 2px solid var(--tecnored-accent);
  box-shadow: 0 0 20px 5px rgba(0, 255, 204, 0.3);
}

.floating-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, var(--tecnored-accent), transparent);
  height: 1px;
  width: 100px;
  opacity: 0.3;
  transform-origin: center;
}

@keyframes float-up {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes float-diagonal {
  0% {
    transform: translate(-100px, 100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translate(100vw, -100px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
}

/* Animaciones generales */
.fade-in {
  opacity: 1;
  transform: none;
}

.fade-in.active {
  opacity: 1;
  transform: none;
}

/* Efecto de glassmorphism */
.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 15px;
}

/* Variante más visible para cards de productos: "blanco hielo" semitransparente */
.product-card.glass-effect {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Efecto de glassmorphism específico para el header - recto arriba, curvo abajo */
header.glass-effect {
  border-radius: 0 0 15px 15px; /* Solo esquinas inferiores redondeadas */
}

/* Bordes angulares futuristas */
.tech-border {
  position: relative;
  border-radius: 8px;
  /* overflow: hidden; */
}

.tech-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--tecnored-blue), transparent, var(--tecnored-red))
    border-box;
  -webkit-mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}

/* Efecto de líneas tecnológicas */
.tech-lines {
  position: relative;
  overflow: hidden;
}

.tech-lines::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(90deg, transparent 99%, rgba(100, 255, 218, 0.2) 100%),
    linear-gradient(0deg, transparent 99%, rgba(100, 255, 218, 0.2) 100%);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 0; /* asegurar que no tape contenido */
}

/* Asegurar que el overlay no tape el contenido en tarjetas de servicios */
.service-card {
  position: relative;
}
.service-card .tech-lines {
  pointer-events: none;
}
.service-card .tech-lines::after {
  z-index: 0;
}
.service-card > *:not(.tech-lines) {
  position: relative;
  z-index: 1;
}

/* Panel admin: sin scroll interno, contenido completo visible */
.admin-layout {
  align-items: stretch;
}
.admin-fixed-height {
  min-height: var(--admin-panel-height);
  /* Sin max-height ni overflow para que todo el contenido sea visible */
  overflow: visible;
}
#panel-box {
  position: relative;
  overflow: visible;
}

/* Admin layout - sin sidebar, contenido completo */
.admin-tab {
  transition: all 0.3s ease;
  white-space: nowrap;
}
.admin-tab:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 255, 255, 0.3);
}
.admin-tab.active {
  background: linear-gradient(135deg, var(--tecnored-blue), var(--tecnored-red));
  border-color: var(--tecnored-accent);
}

/* Formulario compacto */
#view-add form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
#view-add form > div:last-child {
  grid-column: 1/-1;
}
#view-add label {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}
#view-add input,
#view-add textarea {
  padding: 0.5rem;
  font-size: 0.875rem;
}
#view-add textarea {
  resize: vertical;
  min-height: 2.5rem;
}

/* Estilos para elementos select - hacer visibles los dropdowns */
select {
  background-color: #1f2937 !important; /* gray-800 sólido */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 12px !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 4px;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
  z-index: 1000;
  font-size: 0.875rem;
  line-height: 1.5;
}

select:hover {
  border-color: rgba(255, 255, 255, 0.3) !important;
  background-color: #374151 !important; /* gray-700 */
}

select:focus {
  outline: none !important;
  border-color: var(--tecnored-accent) !important;
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.3) !important;
  background-color: #374151 !important;
}

/* Estilos para las opciones del dropdown */
select option {
  background-color: #1f2937 !important; /* gray-800 */
  color: #ffffff !important;
  padding: 0.75rem 1rem !important;
  border: none !important;
  font-size: 0.875rem;
}

/* Hover y selección de opciones */
select option:hover {
  background-color: #004aad !important; /* tecnored-blue */
  color: #ffffff !important;
}

select option:checked,
select option:focus {
  background-color: #004aad !important; /* tecnored-blue */
  color: #ffffff !important;
  font-weight: 500;
}

/* Asegurar que los select en el admin sean visibles con z-index alto */
#view-add select,
#view-images select,
.admin-panel select,
form select {
  background-color: #1f2937 !important;
  color: #ffffff !important;
  z-index: 1000 !important;
  position: relative;
}

#view-add select option,
#view-images select option,
.admin-panel select option,
form select option {
  background-color: #1f2937 !important;
  color: #ffffff !important;
}

/* Para navegadores que no respetan option styles */
select::-ms-expand {
  display: none;
}

/* Asegurar que los contenedores no oculten los dropdowns */
#view-add,
#view-images,
.admin-panel,
form {
  overflow: visible !important;
}

/* Contenedor del panel admin - permitir que los dropdowns se muestren */
#panel-box {
  overflow: visible !important;
}

/* Header y navegación */
header {
  transition: all 0.3s ease;
}

header.scrolled {
  background-color: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
}

.logo-container {
  position: relative;
}

.logo-container::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--tecnored-blue), var(--tecnored-red));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

header:hover .logo-container::after {
  transform: scaleX(1);
}

/* Estilo de navegación futurista */
header nav a {
  position: relative;
  color: var(--white);
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 0.5rem 0;
  margin: 0 1rem;
  transition: all 0.3s ease;
}

header nav a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--tecnored-blue), var(--tecnored-red));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

header nav a:hover {
  color: var(--tecnored-accent);
}

header nav a:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.hamburger-menu span {
  transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: var(--tecnored-dark);
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 30%, rgba(4, 74, 173, 0.15) 0%, transparent 70%),
    radial-gradient(circle at 80% 70%, rgba(227, 6, 19, 0.1) 0%, transparent 70%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--white), var(--tecnored-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.3;
  letter-spacing: -1px;
  margin-bottom: 1.5rem;
  position: relative;
  word-wrap: break-word;
  overflow: visible;
}

.hero-title::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--tecnored-blue), var(--tecnored-red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  z-index: -1;
  filter: blur(8px);
  opacity: 0.8;
}

.hero-image {
  position: relative;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}

.hero-image::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 10px;
  background: radial-gradient(ellipse at center, rgba(100, 255, 218, 0.5) 0%, transparent 70%);
  border-radius: 50%;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(2deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

.particles-container {
  overflow: hidden;
  z-index: 1;
}

/* Botones */
.btn-primary,
.btn-secondary {
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%);
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--tecnored-gradient);
  color: var(--white);
  border: none;
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--tecnored-accent);
}

.btn-primary::before,
.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(100, 255, 218, 0.3), transparent);
  transition: 0.5s;
  z-index: -1;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
  left: 100%;
}

/* Productos */
.products-section {
  background-color: var(--tecnored-dark);
  position: relative;
  overflow-x: visible;
}

/* Permitir scroll en páginas que usen secciones largas */
html,
body {
  min-height: 100%;
}

.products-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 10% 10%, rgba(4, 74, 173, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 90% 90%, rgba(227, 6, 19, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0; /* asegurar que quede detrás del contenido */
}

.section-title {
  position: relative;
  display: inline-block;
  color: var(--white);
  margin-bottom: 3rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, var(--tecnored-blue), var(--tecnored-red));
}

.product-card {
  transition: all 0.3s ease;
  border-radius: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card .product-image {
  transition: transform 0.5s ease;
}

.product-card:hover .product-image {
  transform: scale(1.1);
}

.product-content {
  padding: 1.5rem;
  position: relative;
  z-index: 1;
  color: var(--white);
}

.product-title {
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.product-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(100, 255, 218, 0.1);
  color: var(--tecnored-accent);
  border-radius: 20px;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.product-price {
  font-weight: 700;
  color: var(--tecnored-accent);
  font-size: 1.5rem;
  margin-top: 0.5rem;
}

.product-card .product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none; /* Evitar capturar clics cuando está oculto */
}

.product-card:hover .product-overlay {
  opacity: 1;
  pointer-events: auto; /* Habilitar interacción solo al hacer hover */
}

/* Filtros de productos */
.filter-btn {
  transition: all 0.3s ease;
}

/* Carrusel de ofertas */
.offers-carousel {
  position: relative;
}

.hide-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Marcas - animación de scroll horizontal */
.brands-carousel {
  position: relative;
  z-index: 0;
}
.brands-carousel .animate-scroll {
  display: flex;
  will-change: transform;
  animation: brands-scroll 60s linear infinite;
  position: relative; /* necesario para que z-index tenga efecto */
  z-index: 0; /* evitar que solape secciones siguientes */
  width: max-content; /* evita colapsos al duplicar logos */
}

@keyframes brands-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Asegurar que las tarjetas del catálogo queden por encima de cualquier overlay anterior */
#catalog-products,
#catalog-products .product-card {
  position: relative;
  z-index: 100; /* elevar para evitar cualquier superposición visual */
}
.brands-carousel .brand-logo {
  overflow: hidden;
}
.brands-carousel .brand-logo img {
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Estilos mejorados para tarjetas del catálogo */
#catalog-products .product-card {
  background: white;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-md */
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 420px !important; /* Altura fija para todas las tarjetas */
  opacity: 1 !important; /* visible */
  transform: translateY(0) !important;
  position: relative;
  overflow: hidden;
}

/* Asegurar que line-clamp funcione */
#catalog-products .product-card .line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

#catalog-products .product-card > .tech-lines {
  z-index: 1;
}

#catalog-products .product-card > .relative {
  z-index: 10;
  position: relative;
}

#catalog-products .product-card > .p-6 {
  z-index: 10;
  position: relative;
}

#catalog-products .product-card .product-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none; /* sin interacción cuando está oculto */
}

#catalog-products .product-card:hover .product-overlay {
  opacity: 1;
  pointer-events: auto; /* interacción habilitada al hacer hover */
}

/* Puntas recortadas estilo tecnológico */
.tech-card {
  clip-path: polygon(
    0 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% 100%,
    12px 100%,
    0 calc(100% - 12px)
  );
}

/* Utilidades para truncar texto */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  /* Fallback para navegadores sin -webkit-line-clamp (ej. Firefox) */
  line-height: 1.3em;
  max-height: calc(2 * 1.3em);
  display: block;
  line-clamp: 2; /* no estándar, ignorado donde no aplique */
  overflow-wrap: anywhere; /* evitar desbordes por palabras largas */
  overflow: hidden;
  text-overflow: ellipsis;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.3em;
  max-height: calc(3 * 1.3em);
  display: block;
  line-clamp: 3;
  overflow-wrap: anywhere;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre-line;
  line-height: 1.3em;
  word-break: normal;
}

.carousel-control {
  opacity: 0;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.offers-carousel:hover .carousel-control {
  opacity: 1;
}

/* Servicios */
.service-card {
  transition: all 0.3s ease;
}

/* Refuerzo de contraste en sección Servicios */
#servicios .service-card {
  background: rgba(255, 255, 255, 0.12); /* antes 0.05 por glass-effect */
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

#servicios .service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
}

/* Aumentar legibilidad de textos dentro de la tarjeta */
#servicios .service-card h3 {
  color: #ffffff;
}
#servicios .service-card p {
  color: var(--text-secondary) !important;
}

.service-card .icon-container {
  transition: all 0.3s ease;
}

.service-card:hover .icon-container {
  background-color: rgba(0, 74, 173, 0.25);
  transform: scale(1.1);
}

/* Testimonios */
.testimonial-card {
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Formulario de contacto */
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--tecnored-red);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.2);
}

/* Botón de WhatsApp */
.whatsapp-btn {
  position: fixed; /* asegurar posicionamiento consistente */
  right: 0.5rem !important;
  bottom: 0.5rem !important;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Botón flotante de acceso (CTA) */
.login-fab {
  position: fixed;
  right: 0.5rem;
  bottom: 9.5rem; /* encima de WhatsApp */
  z-index: 50;
}

/* Sin animaciones - botones estáticos */
.login-fab,
.whatsapp-btn {
  transform: none;
  opacity: 1;
}

/* Badge de carrito en el header */
.cart-btn {
  position: relative;
}
.cart-badge {
  position: absolute;
  top: 7px;
  right: 9px;
  background: var(--tecnored-red);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 9999px;
  border: 1px solid var(--glass-border);
}
.login-fab .fab-inner {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--tecnored-blue), var(--tecnored-red));
  color: #fff;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
}
.login-fab .fab-label {
  position: absolute;
  right: 64px;
  bottom: 14px;
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  padding: 6px 10px;
  font-size: 12px;
  box-shadow: var(--glass-shadow);
  pointer-events: none;
  display: none; /* oculto por defecto */
}

/* Footer */
footer a {
  transition: color 0.3s ease;
}

/* Efectos de neón para botones en hover */
.neon-effect:hover {
  box-shadow:
    0 0 10px var(--tecnored-red),
    0 0 20px var(--tecnored-red),
    0 0 30px var(--tecnored-red);
  text-shadow: 0 0 5px var(--white);
}

/* Scrollbar personalizada simple */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--tecnored-blue), var(--tecnored-red));
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #1e40af, #dc2626);
  box-shadow: 0 0 8px rgba(0, 74, 173, 0.5);
}

::-webkit-scrollbar-corner {
  background: rgba(0, 0, 0, 0.3);
}

/* Para Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--tecnored-blue) rgba(0, 0, 0, 0.3);
}

/* Media queries para responsive */
@media (max-width: 768px) {
  .hero-section {
    min-height: auto;
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .hero-image {
    max-width: 80%;
    margin: 0 auto;
  }

  .offers-carousel .carousel-control {
    display: none;
  }
}

/* Animaciones para el menú móvil */
.mobile-menu {
  transition: all 0.3s ease;
  max-height: 0;
  overflow: hidden;
}

.mobile-menu.active {
  max-height: 300px;
}

/* Estilos para paginación del panel administrativo */
#admin-pagination {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding: 1rem;
  width: 100%;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#admin-pagination .pagination-btn,
#admin-pagination .pagination-number {
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#admin-pagination .pagination-btn:hover:not(:disabled),
#admin-pagination .pagination-number:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 74, 173, 0.4);
}

#admin-pagination .pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Reutilizar estilos para paginación de notificaciones */
#alerts-pagination {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding: 1rem;
  width: 100%;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Estilos para Carrusel de Promociones */
.promotion-carousel {
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.promotion-carousel::-webkit-scrollbar {
  display: none;
}

/* Scroll fino y gris para descripciones en cards */
.desc-scroll {
  scrollbar-width: thin;
  scrollbar-color: #9ca3af transparent;
}
.desc-scroll::-webkit-scrollbar {
  width: 6px;
}
.desc-scroll::-webkit-scrollbar-thumb {
  background: #9ca3af;
  border-radius: 9999px;
}
.desc-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.promotion-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.promotion-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 123, 255, 0.15);
}

.thin-tech-border.tech-border::before {
  border-width: 1px;
  background: linear-gradient(90deg, var(--tecnored-blue), var(--tecnored-red)) border-box;
  opacity: 0.6;
}

/* ========================================
   Estilos para Rango de Precio Dual
   ======================================== */
.price-range-container {
  position: relative;
  height: 40px;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.price-range-track {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 8px;
  right: 8px;
  height: 4px;
  background: #374151; /* gray-700 */
  border-radius: 2px;
  pointer-events: none;
}

.price-range-fill {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, var(--tecnored-blue), var(--tecnored-red));
  border-radius: 2px;
  transition: all 0.15s ease;
}

.price-range-thumb {
  position: absolute;
  width: 100%;
  height: 4px;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.price-range-thumb::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--tecnored-blue);
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.price-range-thumb::-webkit-slider-thumb:hover {
  background: var(--tecnored-blue);
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 74, 173, 0.4);
}

.price-range-thumb::-webkit-slider-thumb:active {
  transform: scale(1.05);
}

.price-range-thumb::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--tecnored-blue);
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.price-range-thumb::-moz-range-thumb:hover {
  background: var(--tecnored-blue);
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 74, 173, 0.4);
}

.price-range-thumb::-moz-range-thumb:active {
  transform: scale(1.05);
}

/* Diferentes colores para el thumb máximo */
.price-range-thumb-max::-webkit-slider-thumb {
  border-color: var(--tecnored-red);
}

.price-range-thumb-max::-webkit-slider-thumb:hover {
  background: var(--tecnored-red);
  box-shadow: 0 4px 12px rgba(227, 6, 19, 0.4);
}

.price-range-thumb-max::-moz-range-thumb {
  border-color: var(--tecnored-red);
}

.price-range-thumb-max::-moz-range-thumb:hover {
  background: var(--tecnored-red);
  box-shadow: 0 4px 12px rgba(227, 6, 19, 0.4);
}

/* Z-index para asegurar que los thumbs estén por encima */
.price-range-thumb-min {
  z-index: 3;
}

.price-range-thumb-max {
  z-index: 4;
}
