/* ═══════════════════════════════════════════════════════════════
   NANUM LIGHT — Estilos Globales
   Fuente: Inter
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset y base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  scroll-behavior: smooth;
  overflow-x: hidden;
  background: #f4f5f8;
  color: #212529;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Inter", system-ui, sans-serif;
}

/* ── Scrollbar personalizada ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f3f5; }
::-webkit-scrollbar-thumb { background: #004e9f; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #003a77; }

/* ── Animaciones ── */
@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.animate-slide-up { animation: slideInUp 0.6s ease forwards; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Scroll reveal system ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
[data-reveal="left"]   { transform: translateX(-40px); }
[data-reveal="right"]  { transform: translateX(40px); }
[data-reveal="scale"]  { transform: scale(0.92); }
[data-reveal="fade"]   { transform: none; }

[data-reveal].is-visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Stagger children */
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal-stagger].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-stagger].is-visible > *:nth-child(1) { transition-delay: 0.08s; }
[data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: 0.16s; }
[data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: 0.24s; }
[data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: 0.32s; }

/* ── Respeto a preferencias de movimiento ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal], [data-reveal-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── Textura sección clara: mesh gradient + grid sutil ── */
.section-texture-light {
  position: relative;
  background-color: #f8f9fa;
}
.section-texture-light::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(ellipse 60% 40% at 15% 20%, rgba(0, 78, 159, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 35% at 85% 80%, rgba(0, 100, 200, 0.05) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(188, 220, 255, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.section-texture-light::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 78, 159, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 78, 159, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* ── Textura sección oscura: glows + grid + noise ── */
.section-texture-dark {
  position: relative;
  background-color: #040f1f;
}
.section-texture-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(ellipse 70% 50% at 25% 30%, rgba(0, 100, 200, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 55% 40% at 80% 75%, rgba(56, 173, 248, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 60% 10%, rgba(0, 78, 159, 0.10) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.section-texture-dark::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 20%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.section-texture-dark > *, .section-texture-light > * {
  position: relative;
  z-index: 1;
}

/* ── Patrón geométrico diagonal ── */
.pattern-diagonal {
  position: relative;
}
.pattern-diagonal::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 20px,
    rgba(0, 78, 159, 0.015) 20px,
    rgba(0, 78, 159, 0.015) 21px
  );
  pointer-events: none;
  z-index: 0;
}
.pattern-diagonal > * { position: relative; z-index: 1; }

/* ── Patrón de puntos con halo ── */
.pattern-dots {
  position: relative;
  background-color: #f8f9fa;
}
.pattern-dots::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0, 78, 159, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 100%, rgba(0, 100, 200, 0.04) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}
.pattern-dots::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0, 78, 159, 0.07) 1px, transparent 1.5px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}
.pattern-dots > * { position: relative; z-index: 1; }

/* ── Mesh gradient suave (para secciones intermedias) ── */
.section-mesh-light {
  position: relative;
  background:
    linear-gradient(180deg, #f8f9fa 0%, #eef4fa 50%, #f8f9fa 100%);
}
.section-mesh-light::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 50% 40% at 20% 30%, rgba(0, 78, 159, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 75% 60%, rgba(0, 100, 200, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 35% 25% at 50% 90%, rgba(188, 220, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.section-mesh-light > * { position: relative; z-index: 1; }

/* ── Sección premium con gradiente y brillo ── */
.section-premium {
  position: relative;
  background:
    linear-gradient(135deg, #f8f9fa 0%, #e8f0fa 40%, #f0f6fc 70%, #f8f9fa 100%);
}
.section-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 40% at 30% 20%, rgba(0, 78, 159, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 70% 80%, rgba(56, 173, 248, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.section-premium::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 78, 159, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 78, 159, 0.02) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, transparent, black 30%, black 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, black 30%, black 70%, transparent);
  pointer-events: none;
  z-index: 0;
}
.section-premium > * { position: relative; z-index: 1; }

/* ── Modal backdrop ── */
.modal-backdrop {
  backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.5);
}

/* ── Carousel con parallax ── */
.carousel-container {
  display: block;
  position: relative;
  height: 450px;
}
@media (min-width: 768px) {
  .carousel-container { height: 600px; }
}

.carousel-slide {
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  pointer-events: none;
}
.carousel-slide.active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}
.carousel-slide img {
  transition: transform 7s ease-out;
  transform: scale(1.0);
}
.carousel-slide.active img {
  transform: scale(1.06);
}

/* Animación del contenido del slide */
.carousel-slide .carousel-content > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.carousel-slide.active .carousel-content > * {
  opacity: 1;
  transform: translateY(0);
}
.carousel-slide.active .carousel-content > *:nth-child(1) { transition-delay: 0.3s; }
.carousel-slide.active .carousel-content > *:nth-child(2) { transition-delay: 0.45s; }
.carousel-slide.active .carousel-content > *:nth-child(3) { transition-delay: 0.6s; }
.carousel-slide.active .carousel-content > *:nth-child(4) { transition-delay: 0.75s; }

/* Badge con entrada animada */
.carousel-badge {
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 78, 159, 0.3); }
  50%      { box-shadow: 0 0 0 8px rgba(0, 78, 159, 0); }
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}
.carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.1);
}
.carousel-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
}
.carousel-dot.active {
  background: white;
  border-color: rgba(0, 78, 159, 0.5);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  transform: scale(1.2);
}
.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
  .carousel-arrow { display: none; }
  .carousel-dot   { width: 10px; height: 10px; }
}

/* ── Botón con efecto ripple ── */
.btn-ripple {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
  z-index: -1;
}
.btn-ripple:active::after {
  width: 300px;
  height: 300px;
  opacity: 1;
  transition: width 0s, height 0s, opacity 0s;
}

/* ── Botón con flecha animada ── */
.btn-arrow i {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-arrow:hover i {
  transform: translateX(4px);
}

/* ── Category card con capa deslizante ── */
.category-card .category-info {
  transform: translateY(8px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.category-card:hover .category-info {
  transform: translateY(0);
}
.category-card .category-arrow {
  transform: translateX(-8px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.category-card:hover .category-arrow {
  transform: translateX(0);
  opacity: 1;
}
.category-card .category-desc {
  max-height: 60px;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.4s ease;
  opacity: 1;
}
.category-card:hover .category-desc {
  max-height: 80px;
  opacity: 1;
}

/* ── Contador con animación ── */
.stat-number {
  display: inline-block;
}
.stat-number.counting {
  color: #0e91e9;
  transition: color 0.3s;
}

/* ── Badge flotante con animación ── */
.float-badge {
  animation: floatBadge 4s ease-in-out infinite;
}
@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ── Imagen con reveal ── */
.image-reveal {
  position: relative;
  overflow: hidden;
}
.image-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #004e9f;
  transform: translateX(0);
  transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
  z-index: 2;
}
.image-reveal.is-visible::after {
  transform: translateX(100%);
}

/* ── Contact items con borde lateral animado ── */
.contact-item {
  position: relative;
  overflow: hidden;
}
.contact-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 3px;
  height: 100%;
  background: #004e9f;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.contact-item:hover::before {
  transform: scaleY(1);
  transform-origin: top;
}
.contact-item .contact-icon {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.contact-item:hover .contact-icon {
  transform: scale(1.1) rotate(-4deg);
}

/* ── Mapa con hover sutil ── */
.map-container {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.map-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.4);
}

/* ── Heading con subrayado decorativo ── */
.section-heading {
  position: relative;
  display: inline-block;
}
.section-heading::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #004e9f 0%, #38adf8 100%);
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}
[data-reveal].is-visible .section-heading::after,
.section-heading.is-visible::after {
  width: 60%;
}

/* ── Scroll indicator ── */
.scroll-indicator {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  pointer-events: none;
}
.scroll-indicator::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollWheel 1.8s ease-in-out infinite;
}
@keyframes scrollWheel {
  0%   { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 14px); }
}
@media (max-width: 768px) {
  .scroll-indicator { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-indicator { display: none; }
}

/* ── Focus visible accesible ── */
*:focus-visible {
  outline: 3px solid #38adf8;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Carousel arrows focus */
.carousel-arrow:focus-visible {
  outline: 3px solid #38adf8;
  outline-offset: 3px;
}

/* Saltar al contenido */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: #004e9f;
  color: white;
  padding: 12px 24px;
  z-index: 9999;
  font-weight: 700;
  border-radius: 0 0 8px 0;
  transition: top 0.3s;
}
.skip-link:focus {
  top: 0;
}

/* ═══════════════════════════════════════════════════════════════
   CATÁLOGO — Productos, skeleton, paginación
   ═══════════════════════════════════════════════════════════════ */

/* ── Product Card ── */
.product-card {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 78, 159, 0.18);
}
.product-card .img-wrap img {
  transition: transform 0.6s ease;
}
.product-card:hover .img-wrap img {
  transform: scale(1.08);
}

/* ── Skeleton loader ── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Pagination ── */
.pagination-btn {
  min-width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
  border: 1px solid #dee2e6;
  background: white;
  color: #495057;
  padding: 0 8px;
}
.pagination-btn:hover:not(:disabled):not(.active) {
  border-color: #004e9f;
  color: #004e9f;
  background: #f0f7ff;
}
.pagination-btn.active {
  background: #004e9f;
  color: white;
  border-color: #004e9f;
}
.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Product tabs ── */
.nl-tab-panel { display: none; }
.nl-tab-panel.active { display: block; }

.nl-tab {
  border-bottom: 2px solid transparent;
  color: #868e96;
  transition: all 0.2s;
}
.nl-tab.active {
  color: #004e9f;
  border-bottom-color: #004e9f;
}
.nl-thumb { transition: all 0.2s; }
.nl-thumb.active {
  border-color: #004e9f !important;
  background: #f0f7ff !important;
}

/* ── WhatsApp Widget ── */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 999;
}

.whatsapp-button {
  width: 65px;
  height: 65px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  transition: all 0.3s;
  animation: pulse 2s infinite;
  position: relative;
}

.whatsapp-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
  color: white;
  text-decoration: none;
}

.whatsapp-tooltip {
  position: absolute;
  right: 75px;
  top: 50%;
  transform: translateY(-50%);
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  font-family: "Outfit", sans-serif;
  font-weight: 500;
}

.whatsapp-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #333;
}

.whatsapp-button:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5); }
  50%      { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7); }
}

.cursor-pointer {
    cursor: pointer;
}

/* ── Overlay degradado estilo MercadoLibre para descripción ── */
.desc-fade-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.85) 45%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 10;
}
.desc-fade-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}