/* =====================================================
   VENDO USADO - Estilos principales
   Paleta del logo: Naranja #F26822 + Gris oscuro #2D2D2D
   Mobile-first, responsive · Modo claro/oscuro
   ===================================================== */

/* ---------- VARIABLES Y RESET ---------- */
:root {
  /* Colores de marca (iguales en ambos modos) */
  --naranja: #F26822;
  --naranja-hover: #D85818;
  --naranja-claro: #FFF1E6;
  --naranja-suave: #FFEBDA;
  --naranja-oscuro: #FF6B1A;

  /* Paleta principal - MODO CLARO */
  --oscuro: #2D2D2D;
  --gris-texto: #4A4A4A;
  --gris-medio: #6B6B6B;
  --gris-claro: #B5B5B5;
  --gris-borde: #E5E5E5;
  --gris-bg: #F7F7F7;
  --blanco: #FFFFFF;
  --negro: #000000;

  /* Estados */
  --verde: #2BB673;
  --verde-claro: #E6F7EF;
  --verde-bg-dark: #1A3D2A;
  --rojo: #E74C3C;
  --rojo-claro: #FDEDEC;
  --rojo-bg-dark: #3D1A1A;
  --azul: #3498DB;
  --azul-claro: #E3F2FD;
  --azul-bg-dark: #1A2D3D;
  --amarillo: #FFC107;

  /* Sombras (con menos opacidad en dark) */
  --sombra-sm: 0 1px 3px rgba(0,0,0,0.06);
  --sombra: 0 2px 8px rgba(0,0,0,0.08);
  --sombra-md: 0 4px 16px rgba(0,0,0,0.10);
  --sombra-lg: 0 8px 32px rgba(0,0,0,0.12);
  --sombra-inset: inset 0 0 0 1px rgba(0,0,0,0.05);

  /* Gradientes */
  --gradiente-hero: linear-gradient(135deg, var(--naranja-claro) 0%, #fff 100%);
  --gradiente-eco: linear-gradient(135deg, #2BB673 0%, #1E8E5F 100%);

  /* Imagenes con filtro (para dark mode) */
  --filtro-img: none;

  /* Borders / sombras claras */
  --borde-input: var(--gris-borde);
  --texto-input: var(--oscuro);
  --placeholder: var(--gris-claro);

  /* Header / Footer */
  --bg-header: var(--blanco);
  --bg-footer: var(--oscuro);
  --color-logo-footer: filter: none;

  /* Secciones SIEMPRE oscuras (footer, CTA final, eco) */
  --bg-dark-section: #2D2D2D;
  --text-on-dark: #FFFFFF;

  /* Badge colores */
  --badge-bg: var(--naranja);
  --badge-texto: var(--blanco);

  /* Logo wrapper (claro) */
  --logo-wrapper-bg: #FFFFFF;
  --logo-wrapper-shadow: none;
  --logo-wrapper-border: transparent;

  /* Otros */
  --radio-sm: 8px;
  --radio: 12px;
  --radio-lg: 16px;
  --radio-xl: 24px;
  --container: 1200px;
  --transicion: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ---------- MODO OSCURO ---------- */
[data-theme="dark"] {
  --oscuro: #F1F1F1;
  --gris-texto: #D4D4D4;
  --gris-medio: #9A9A9A;
  --gris-claro: #6B6B6B;
  --gris-borde: #3A3A3A;
  --gris-bg: #1E1E1E;
  --blanco: #1A1A1A;
  --negro: #FFFFFF;

  --naranja-claro: #2A1810;
  --naranja-suave: #3A2418;

  --verde-claro: #1A3D2A;
  --verde-bg-dark: #0F2A1C;
  --rojo-claro: #3D1A1A;
  --rojo-bg-dark: #2A0F0F;
  --azul-claro: #1A2D3D;

  /* Sombras más fuertes para contraste */
  --sombra-sm: 0 1px 3px rgba(0,0,0,0.3);
  --sombra: 0 2px 8px rgba(0,0,0,0.4);
  --sombra-md: 0 4px 16px rgba(0,0,0,0.5);
  --sombra-lg: 0 8px 32px rgba(0,0,0,0.6);
  --sombra-inset: inset 0 0 0 1px rgba(255,255,255,0.05);

  /* Logo wrapper (oscuro) */
  --logo-wrapper-bg: transparent;
  --logo-wrapper-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  --logo-wrapper-border: rgba(255, 255, 255, 0.08);

  /* Gradientes oscuros */
  --gradiente-hero: linear-gradient(135deg, #2A1810 0%, #1A1A1A 100%);
  --gradiente-eco: linear-gradient(135deg, #1A5A40 0%, #0F2A1C 100%);

  /* Header / Footer */
  --bg-header: #1A1A1A;
  --bg-footer: #0A0A0A;
  --color-logo-footer: filter: none;
}

/* Aplicar transición a elementos clave */
body, .site-header, .site-footer, .producto-card, .cat-card, .form-publicar,
.form-grupo input, .form-grupo select, .form-grupo textarea, .btn, .alert,
.breadcrumbs, .modal, .stat-card, .empty-state, .chat-item, .test-card,
.step-card, .faq-item, .flash, .vendedor-card, .datos-rapidos,
.eco-section, .cta-final, .imagenes-actuales .img-actual, .search-form,
.search-form button, .galeria-thumbs .thumb {
  transition: var(--transicion);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--oscuro);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: env(safe-area-inset-bottom);
  transition: background-color 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--naranja); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--naranja-hover); }

button, input, select, textarea { font-family: inherit; font-size: 1rem; }
button { cursor: pointer; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.25; font-weight: 700; color: var(--oscuro); }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

ul, ol { margin: 0 0 1em; padding-left: 1.4em; }

.muted { color: var(--gris-medio); }
.small { font-size: 0.875rem; }
.lead { font-size: 1.15rem; color: var(--gris-medio); margin-bottom: 2rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}

.narrow { max-width: 800px; }

/* ---------- BOTONES ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radio);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  background: var(--gris-bg);
  color: var(--oscuro);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-align: center;
  white-space: nowrap;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sombra); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--naranja);
  color: var(--blanco);
  border-color: var(--naranja);
}
.btn-primary:hover { background: var(--naranja-hover); color: var(--blanco); }
.btn-secondary {
  background: var(--blanco);
  color: var(--oscuro);
  border-color: var(--gris-borde);
}
.btn-secondary:hover { background: var(--gris-bg); }
.btn-danger {
  background: var(--rojo-claro);
  color: var(--rojo);
  border-color: transparent;
}
.btn-danger:hover { background: var(--rojo); color: var(--blanco); }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.btn-google {
  background: var(--blanco);
  color: var(--oscuro);
  border-color: var(--gris-borde);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
}
.btn-google:hover { background: var(--gris-bg); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.btn-google svg { flex-shrink: 0; }
.btn-link {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  color: var(--naranja);
  text-decoration: none;
  font-weight: 600;
}
.btn-link:hover { text-decoration: underline; }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  border-bottom: 1px solid var(--gris-borde);
  box-shadow: var(--sombra-sm);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.brand-logo {
  height: 68px;
  width: auto;
  display: block;
  transition: filter 0.4s ease, box-shadow 0.3s ease;
}
/* El logo completo se muestra por defecto (desktop/tablet) */
.brand-logo-full {
  display: block;
}
/* El ícono solo se oculta por defecto */
.brand-logo-icon {
  display: none;
  height: 58px;
  width: 58px;
}

/* =====================================================
   MODO OSCURO · GLOW NARANJA TIPO NEON EN EL LOGO
   ===================================================== */
/* Logo completo (header desktop) */
[data-theme="dark"] .brand-logo-full {
  filter:
    drop-shadow(0 0 4px rgba(242, 104, 34, 0.55))
    drop-shadow(0 0 12px rgba(242, 104, 34, 0.35))
    drop-shadow(0 0 20px rgba(242, 104, 34, 0.18))
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  animation: neonGlow 4s ease-in-out infinite;
}
/* Logo ícono (header móvil) */
[data-theme="dark"] .brand-logo-icon {
  filter:
    drop-shadow(0 0 3px rgba(242, 104, 34, 0.6))
    drop-shadow(0 0 10px rgba(242, 104, 34, 0.35))
    drop-shadow(0 0 18px rgba(242, 104, 34, 0.15));
  background: rgba(242, 104, 34, 0.05);
  border-radius: 10px;
  padding: 4px;
  animation: neonGlow 4s ease-in-out infinite;
}

/* Animación sutil de "respiración" del neon */
@keyframes neonGlow {
  0%, 100% {
    filter:
      drop-shadow(0 0 4px rgba(242, 104, 34, 0.55))
      drop-shadow(0 0 12px rgba(242, 104, 34, 0.35))
      drop-shadow(0 0 20px rgba(242, 104, 34, 0.18))
      drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  }
  50% {
    filter:
      drop-shadow(0 0 5px rgba(242, 104, 34, 0.7))
      drop-shadow(0 0 16px rgba(242, 104, 34, 0.45))
      drop-shadow(0 0 26px rgba(242, 104, 34, 0.25))
      drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  }
}
@keyframes neonGlowIcon {
  0%, 100% {
    filter:
      drop-shadow(0 0 3px rgba(242, 104, 34, 0.6))
      drop-shadow(0 0 10px rgba(242, 104, 34, 0.35))
      drop-shadow(0 0 18px rgba(242, 104, 34, 0.15));
  }
  50% {
    filter:
      drop-shadow(0 0 4px rgba(242, 104, 34, 0.75))
      drop-shadow(0 0 14px rgba(242, 104, 34, 0.45))
      drop-shadow(0 0 24px rgba(242, 104, 34, 0.22));
  }
}
[data-theme="dark"] .brand-logo-icon { animation-name: neonGlowIcon; }

/* Respeta reduced-motion: apaga la animación para usuarios sensibles */
@media (prefers-reduced-motion: reduce) {
  [data-theme="dark"] .brand-logo-full,
  [data-theme="dark"] .brand-logo-icon {
    animation: none;
  }
}

/* =====================================================
   MODO OSCURO · GLOW NARANJA TIPO NEON EN EL LOGO DEL FOOTER
   (mismo tratamiento que el header)
   ===================================================== */
[data-theme="dark"] .footer-brand .brand-logo-full {
  filter:
    drop-shadow(0 0 4px rgba(242, 104, 34, 0.55))
    drop-shadow(0 0 12px rgba(242, 104, 34, 0.35))
    drop-shadow(0 0 20px rgba(242, 104, 34, 0.18))
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  animation: neonGlow 4s ease-in-out infinite;
}
[data-theme="dark"] .footer-brand .brand-logo-icon {
  filter:
    drop-shadow(0 0 3px rgba(242, 104, 34, 0.6))
    drop-shadow(0 0 10px rgba(242, 104, 34, 0.35))
    drop-shadow(0 0 18px rgba(242, 104, 34, 0.15));
  background: rgba(242, 104, 34, 0.05);
  border-radius: 10px;
  padding: 4px;
  animation: neonGlowIcon 4s ease-in-out infinite;
}

/* Logo wrapper del footer: fondo blanco para que el glow se vea sobre el footer oscuro */
.footer-brand .brand-logo {
  height: 78px;
  margin-bottom: 0.5rem;
  background: var(--logo-wrapper-bg, #FFFFFF);
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: var(--logo-wrapper-shadow, none);
  border: 1px solid var(--logo-wrapper-border, transparent);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
/* En dark mode, el wrapper del logo en el footer también se integra mejor con el fondo oscuro */
[data-theme="dark"] .footer-brand .brand-logo {
  background: transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.brand-text {
  display: inline-flex;
  flex-direction: column;
  font-weight: 900;
  line-height: 1;
  font-size: 1.3rem;
  color: var(--oscuro);
  letter-spacing: -0.02em;
}
.brand-text span { color: var(--naranja); }

.search-form {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  background: var(--gris-bg);
  border: 2px solid transparent;
  border-radius: var(--radio-xl);
  padding: 0.4rem 0.4rem 0.4rem 1.2rem;
  transition: all 0.2s;
}
.search-form:focus-within {
  background: var(--blanco);
  border-color: var(--naranja);
}
.search-form input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.95rem;
  color: var(--oscuro);
  min-width: 0;
}
.search-form input::placeholder { color: var(--gris-claro); }
.search-form button {
  background: var(--naranja);
  color: var(--blanco);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-form button:hover { background: var(--naranja-hover); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  padding-left: 1rem;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  color: var(--oscuro);
  font-weight: 600;
  border-radius: var(--radio);
  transition: background 0.2s;
}
.nav-link:hover { background: var(--gris-bg); color: var(--oscuro); }
.nav-user { flex-shrink: 0; }
.nav-user img, .nav-user .avatar-letters {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.nav-username { display: none; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.btn-publish { padding: 0.55rem 1.1rem; white-space: nowrap; flex-shrink: 0; }

.avatar-letters {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--naranja);
  color: var(--blanco);
  font-weight: 700;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--oscuro);
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem;
  background: var(--blanco);
  border-top: 1px solid var(--gris-borde);
  gap: 0.5rem;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  padding: 0.85rem 1rem;
  color: var(--oscuro);
  font-weight: 600;
  border-radius: var(--radio);
}
.mobile-menu a:hover, .mobile-menu a.btn-primary:hover { background: var(--naranja-hover); color: var(--blanco); }

/* ---------- FLASH MESSAGES ---------- */
.flash {
  padding: 0.85rem 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.flash-success { background: var(--verde-claro); color: var(--verde); }
.flash-error { background: var(--rojo-claro); color: var(--rojo); }
.flash-info { background: #E3F2FD; color: #1565C0; }
.flash-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: inherit;
  opacity: 0.6;
  padding: 0 0.5rem;
}

/* ---------- HERO ---------- */
.hero {
  background: var(--gradiente-hero);
  padding: 4rem 0 3rem;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) {
  .hero-inner {
    text-align: left;
  }
}
.hero-tag {
  display: inline-block;
  background: var(--naranja);
  color: var(--blanco);
  padding: 0.4rem 1rem;
  border-radius: var(--radio-xl);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  color: var(--oscuro);
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--gris-texto);
  margin-bottom: 1.5rem;
}
.hero-search {
  display: flex;
  gap: 0.5rem;
  background: var(--blanco);
  padding: 0.5rem;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  max-width: 600px;
  margin-bottom: 1.5rem;
}
.hero-search input {
  flex: 1;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  outline: none;
  background: transparent;
  min-width: 0;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--gris-texto);
}
.hero-stats strong { color: var(--naranja); font-size: 1.1rem; }
.hero-img {
  position: relative;
  height: 320px;
  display: none;
}
.hero-blob {
  position: absolute;
  inset: 0;
  background: var(--naranja);
  border-radius: 50% 50% 60% 40% / 50% 60% 40% 50%;
  opacity: 0.15;
  animation: blob 8s ease-in-out infinite;
}
@keyframes blob {
  0%, 100% { border-radius: 50% 50% 60% 40% / 50% 60% 40% 50%; }
  50% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}
.hero-emoji-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: center;
  justify-items: center;
  padding: 2rem;
}
.hero-emoji-grid span {
  font-size: 3rem;
  animation: float 3s ease-in-out infinite;
}
.hero-emoji-grid span:nth-child(odd) { animation-delay: 1s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* ---------- SECCIONES ---------- */
.section {
  padding: 3rem 0;
}
.section h2 { margin-bottom: 1.5rem; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-head.center {
  flex-direction: column;
  text-align: center;
  align-items: center;
}
.section-link {
  font-weight: 600;
  color: var(--naranja);
}
.section-cta {
  margin-top: 2rem;
}
.section-cta.center {
  text-align: center;
}

/* ---------- CATEGORÍAS (layout horizontal compacto) ---------- */
.categorias-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 0.75rem 0.25rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--gris-medio) transparent;
}
.categorias-strip::-webkit-scrollbar {
  height: 6px;
}
.categorias-strip::-webkit-scrollbar-track {
  background: transparent;
}
.categorias-strip::-webkit-scrollbar-thumb {
  background: var(--gris-claro);
  border-radius: 3px;
}
.categorias-strip::-webkit-scrollbar-thumb:hover {
  background: var(--gris-medio);
}

.cat-pill {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  background: var(--blanco);
  border: 1.5px solid var(--gris-borde);
  border-radius: 999px;
  color: var(--oscuro);
  transition: all 0.2s;
  scroll-snap-align: start;
  text-decoration: none;
  min-width: 0;
  white-space: nowrap;
}
.cat-pill:hover {
  border-color: var(--naranja);
  background: var(--naranja-claro);
  color: var(--oscuro);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(242, 104, 34, 0.15);
}
.cat-pill-emoji {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}
.cat-pill-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.2;
}
.cat-pill-text strong {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}
.cat-pill-text small {
  font-size: 0.7rem;
  color: var(--gris-medio);
  font-weight: 500;
}
.cat-pill:hover .cat-pill-text small {
  color: var(--naranja);
  font-weight: 600;
}

/* En desktop/tablet, permitir wrap y mostrar todas las categorías */
@media (min-width: 768px) {
  .categorias-strip {
    flex-wrap: wrap;
    overflow-x: visible;
    justify-content: center;
    padding-bottom: 0.5rem;
  }
  .cat-pill {
    scroll-snap-align: none;
  }
}

/* ---------- PRODUCTO CARD ---------- */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.producto-card {
  display: block;
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  overflow: hidden;
  color: var(--oscuro);
  transition: all 0.2s;
}
.producto-card:hover {
  border-color: var(--naranja);
  transform: translateY(-3px);
  box-shadow: var(--sombra-md);
  color: var(--oscuro);
}
.producto-img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--gris-bg);
}
.producto-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.producto-card:hover .producto-img img { transform: scale(1.05); }
.badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-destacado { background: var(--naranja); color: var(--blanco); }
.badge-vendido { background: var(--gris-medio); color: var(--blanco); }
.producto-info {
  padding: 0.75rem;
}
.producto-titulo {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  min-height: 2.3em;
}
.producto-precio {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--oscuro);
  margin: 0 0 0.25rem;
}
.producto-meta {
  font-size: 0.75rem;
  color: var(--gris-medio);
  margin: 0;
}

/* ---------- CÓMO FUNCIONA ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.step-card {
  background: var(--blanco);
  border: 2px solid var(--gris-borde);
  border-radius: var(--radio-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.2s;
}
.step-card:hover {
  border-color: var(--naranja);
  transform: translateY(-3px);
  box-shadow: var(--sombra);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--naranja);
  color: var(--blanco);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

/* ---------- ECO BANNER ---------- */
.eco-section {
  background: linear-gradient(135deg, var(--verde) 0%, #1E8E5F 100%);
  color: var(--blanco);
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .eco-section {
  /* Modo oscuro: gradient más vibrante (no tan oscuro) para que destaque el texto */
  background: linear-gradient(135deg, #2A8C5A 0%, #1E6B43 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
/* Brillo radial sutil para dar profundidad en dark mode */
[data-theme="dark"] .eco-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(132, 204, 22, 0.18) 0%, transparent 60%);
  pointer-events: none;
}
[data-theme="dark"] .eco-section::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.eco-inner {
  max-width: 700px;
  position: relative;
  z-index: 1;
}
.eco-emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}
.eco-section h2 {
  color: #ffffff;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.eco-section p {
  font-size: 1.1rem;
  opacity: 1;
  color: #ffffff;
  margin-bottom: 2rem;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.eco-section .btn-primary {
  background: #ffffff;
  color: #1E6B43;
  border-color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.eco-section .btn-primary:hover {
  background: #f5f5f5;
  color: #0F2A1C;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ---------- TESTIMONIOS ---------- */
.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.test-card {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio-lg);
  padding: 1.5rem;
  box-shadow: var(--sombra-sm);
}
.test-stars {
  color: var(--amarillo);
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.test-card p {
  font-style: italic;
  color: var(--gris-texto);
  margin-bottom: 1rem;
}
.test-autor strong { color: var(--oscuro); display: block; }
.test-autor span { color: var(--gris-medio); font-size: 0.85rem; }

/* ---------- CTA FINAL ---------- */
.cta-final {
  background: var(--bg-dark-section);
  color: var(--text-on-dark);
  text-align: center;
  padding: 4rem 0;
}
.cta-final h2 { color: var(--text-on-dark); }
.cta-final p { font-size: 1.15rem; opacity: 0.9; margin-bottom: 1.5rem; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.cta-final .btn-secondary { background: transparent; color: var(--text-on-dark); border-color: var(--text-on-dark); }
.cta-final .btn-secondary:hover { background: var(--text-on-dark); color: var(--bg-dark-section); }

/* ---------- BÚSQUEDA ---------- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gris-medio);
  padding: 1rem 0;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--gris-medio); }
.breadcrumbs a:hover { color: var(--naranja); }
.breadcrumbs span:not(:last-child) { color: var(--gris-claro); }

.search-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-bottom: 3rem;
}

/* === TOPBAR DE EXPLORAR: solo flecha circular glass iOS === */
.explorar-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1rem;
  padding: 0.25rem 0;
}
.back-btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  /* Estilo glass iOS: fondo translúcido + blur + borde sutil */
  background: rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--oscuro);
  text-decoration: none;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
[data-theme="dark"] .back-btn-glass {
  background: rgba(45, 30, 22, 0.65);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.back-btn-glass:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateX(-3px);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
[data-theme="dark"] .back-btn-glass:hover {
  background: rgba(60, 40, 30, 0.85);
}
.back-btn-glass:active {
  transform: translateX(-3px) scale(0.95);
}
.back-btn-glass svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.5;
  transition: transform 0.2s;
}
.back-btn-glass:hover svg {
  transform: translateX(-2px);
}

/* =====================================================
   FILTROS - LAYOUT MODERNO
   - Desktop: sidebar con botón X (oculto)
   - Móvil: bottom sheet con X visible, backdrop, FAB para abrir
   ===================================================== */
.filtros {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  padding: 1.25rem;
  height: fit-content;
  position: relative;
}
[data-theme="dark"] .filtros {
  background: #1e1e1e;
  border-color: rgba(255,255,255,0.08);
  color: #e8e8e8;
}
.filtros-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gris-borde);
}
.filtros-header h2 {
  font-size: 1.1rem;
  margin: 0;
}
.filtros-close {
  display: none; /* Oculto en desktop */
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gris-bg);
  border: none;
  color: var(--oscuro);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.filtros-close:hover {
  background: var(--gris-borde);
  transform: rotate(90deg);
}
.filtros-close svg {
  width: 18px;
  height: 18px;
}
[data-theme="dark"] .filtros-close {
  background: rgba(255,255,255,0.08);
  color: var(--blanco);
}

.filtro-grupo {
  margin-bottom: 1rem;
}
.filtro-grupo label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gris-texto);
  margin-bottom: 0.4rem;
}
.filtro-grupo input,
.filtro-grupo select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio-sm);
  background: var(--blanco);
  color: var(--oscuro);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.filtro-grupo input:focus,
.filtro-grupo select:focus {
  outline: none;
  border-color: var(--naranja);
}

/* === MODO OSCURO: Filtros === */
[data-theme="dark"] .filtros {
  background: #1e1e1e !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: #e8e8e8;
}
[data-theme="dark"] .filtros-header {
  border-bottom-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .filtros-header h2 {
  color: #ffffff;
}
[data-theme="dark"] .filtros-header .filtros-close {
  color: rgba(255,255,255,0.6);
}
[data-theme="dark"] .filtros-header .filtros-close:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.08);
}
[data-theme="dark"] .filtro-grupo label {
  color: rgba(255,255,255,0.85);
}
[data-theme="dark"] .filtro-grupo input,
[data-theme="dark"] .filtro-grupo select {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #ffffff;
}
[data-theme="dark"] .filtro-grupo input::placeholder {
  color: rgba(255,255,255,0.4);
}
[data-theme="dark"] .filtro-grupo input:focus,
[data-theme="dark"] .filtro-grupo select:focus {
  border-color: var(--naranja);
  background: rgba(255,255,255,0.12);
}
[data-theme="dark"] .filtros-acciones-mobile {
  background: #1e1e1e;
  border-top-color: rgba(255,255,255,0.1);
}

/* Acciones: desktop (visibles) vs móvil (sticky) */
.filtros-acciones-mobile {
  display: none;
}

/* =====================================================
   MÓVIL: filtros como bottom sheet
   ===================================================== */
.filtros-fab {
  display: none;
}
.filtros-backdrop {
  display: none;
}

@media (max-width: 768px) {
  .filtros {
    /* Convertir a bottom sheet */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    z-index: 150;
    border-radius: 20px 20px 0 0;
    border: none;
    border-top: 1px solid var(--gris-borde);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    -webkit-transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    -webkit-transition: -webkit-transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    padding: 0;
    overflow: hidden;
  }
  .filtros.is-open {
    transform: translateY(0);
    -webkit-transform: translateY(0);
  }
  .filtros-header {
    flex-shrink: 0;
    padding: 1rem 1.25rem 0.75rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--gris-borde);
    position: relative;
  }
  .filtros-header::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--gris-claro);
    border-radius: 2px;
  }
  .filtros-close {
    display: flex;
  }
  .filtros-form {
    overflow-y: auto;
    flex: 1;
    padding: 1rem 1.25rem 0.5rem;
    -webkit-overflow-scrolling: touch;
  }
  .filtros-form > .filtro-grupo:last-of-type {
    margin-bottom: 0.5rem;
  }
  .filtros-acciones-desktop {
    display: none;
  }
  .filtros-acciones-mobile {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--gris-borde);
    background: var(--blanco);
    flex-shrink: 0;
  }
  .filtros-acciones-mobile .btn {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }
  [data-theme="dark"] .filtros-form,
  [data-theme="dark"] .filtros-acciones-mobile {
    background: #1e1e1e !important;
  }

  /* Backdrop */
  .filtros-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 149;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0s 0.3s;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  .filtros-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s, visibility 0s 0s;
  }

  /* FAB para abrir filtros */
  .filtros-fab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    position: fixed;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    z-index: 99;
    padding: 0.65rem 1rem;
    background: var(--oscuro);
    color: var(--blanco);
    border: none;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
  }
  .filtros-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.3); }
  [data-theme="dark"] .filtros-fab {
    background: var(--naranja);
    color: #fff;
  }
  .filtros-fab svg {
    width: 18px;
    height: 18px;
  }
  .filtros-fab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 2px;
    background: var(--naranja);
    color: #fff;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
  }
  body.filtros-open .filtros-fab { display: none; }
  body.filtros-open .bnav { display: none !important; }
  body.filtros-open { padding-bottom: 0 !important; }
}
.precio-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.resultados-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.resultados-head h1 { font-size: 1.4rem; margin: 0; }
.orden-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio-sm);
  background: var(--blanco);
  font-size: 0.9rem;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.page-link {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  color: var(--oscuro);
  font-weight: 600;
}
.page-link:hover { background: var(--naranja); color: var(--blanco); border-color: var(--naranja); }
.page-info { color: var(--gris-medio); }

/* ---------- EMPTY STATE ---------- */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}
.empty-emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
}
.empty-state h2 { margin-bottom: 0.5rem; }
.empty-state p { color: var(--gris-medio); margin-bottom: 1.5rem; }

/* ---------- PRODUCTO DETALLE ---------- */
.producto-detalle {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 1rem 0 3rem;
}
.galeria {
  position: relative;
}
.galeria-main {
  position: relative;
  aspect-ratio: 1;
  background: var(--gris-bg);
  border-radius: var(--radio);
  overflow: hidden;
  cursor: zoom-in;
}
.galeria-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.galeria-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sombra);
}
.galeria-nav:hover { background: var(--blanco); }
.galeria-nav.prev { left: 0.5rem; }
.galeria-nav.next { right: 0.5rem; }
.galeria-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.thumb {
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
  border-radius: var(--radio-sm);
  border: 2px solid transparent;
  background: none;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--naranja); }

.btn-fav {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255,255,255,0.95);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rojo);
  z-index: 5;
  box-shadow: var(--sombra);
}
.btn-fav.activo { background: var(--rojo); color: var(--blanco); }
.btn-fav.activo svg { fill: var(--blanco); }

.producto-info-detalle { padding: 0 0.5rem; }
.producto-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.categoria-pill, .estado-pill {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.categoria-pill { background: var(--naranja-claro); color: var(--naranja); }
.estado-pill { background: var(--gris-bg); color: var(--gris-texto); }
.estado-pill.estado-nuevo { background: var(--verde-claro); color: var(--verde); }
.estado-pill.estado-como_nuevo { background: #E3F2FD; color: #1565C0; }
.estado-pill.vendido { background: var(--rojo-claro); color: var(--rojo); }

.precio-big {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--oscuro);
  margin: 0.5rem 0 1rem;
}

.datos-rapidos {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: var(--gris-bg);
  border-radius: var(--radio);
  padding: 1rem;
}
.datos-rapidos li {
  display: flex;
  flex-direction: column;
}
.datos-rapidos span {
  font-size: 0.75rem;
  color: var(--gris-medio);
  margin-bottom: 0.2rem;
}
.datos-rapidos strong { font-size: 0.9rem; }

.descripcion-box { margin-bottom: 1.5rem; }
.descripcion-box h2 { font-size: 1.1rem; }
.descripcion-box p {
  white-space: pre-wrap;
  color: var(--gris-texto);
  line-height: 1.6;
}

.vendedor-card {
  background: var(--gris-bg);
  border-radius: var(--radio);
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.vendedor-card h2 { font-size: 1.1rem; }
.vendedor-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--oscuro);
}
.avatar-md { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.vendedor-info strong { display: block; margin-bottom: 0.2rem; }
.vendedor-info .verificado {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--verde);
  font-weight: 600;
  margin-left: 0.3rem;
}
.vendedor-stats {
  font-size: 0.85rem;
  color: var(--gris-medio);
}
.vendedor-stats span { margin-right: 0.5rem; }

.section-h2 { font-size: 1.4rem; margin: 2rem 0 1rem; }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--blanco);
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.2); }

/* ---------- AUTH ---------- */
.auth-page { background: var(--gris-bg); min-height: 100vh; }
.auth-container {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-main {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #FFF3EB 0%, #ffffff 100%);
}
[data-theme="dark"] .auth-main {
  background: linear-gradient(135deg, rgba(242, 104, 34, 0.05) 0%, var(--bg-main, #1a1a1a) 100%);
}

.auth-card {
  background: var(--blanco);
  border-radius: var(--radio-lg);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--sombra-md);
  margin: 0 auto;
}

/* === PASSWORD INPUT con botón mostrar/ocultar === */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap input {
  width: 100%;
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 6px 8px;
  color: var(--gris-medio);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.password-toggle:hover { color: var(--naranja); background: rgba(242,104,34,0.08); }
.password-toggle:focus { outline: 2px solid var(--naranja); outline-offset: 1px; }
.password-hint { font-size: 0.78rem; color: var(--gris-medio); margin-top: 0.3rem; }
.password-match { font-size: 0.82rem; margin-top: 0.3rem; font-weight: 600; min-height: 1.2em; }
.password-match.ok { color: #16a34a; }
.password-match.bad { color: #dc2626; }
.password-strength { display: flex; gap: 4px; margin-top: 0.4rem; }
.password-strength .bar { flex: 1; height: 4px; background: var(--gris-borde); border-radius: 2px; transition: background 0.2s; }
.password-strength.debil .bar:nth-child(-n+1) { background: #dc2626; }
.password-strength.medio .bar:nth-child(-n+2) { background: #f59e0b; }
.password-strength.fuerte .bar:nth-child(-n+3) { background: #16a34a; }
.password-strength.muy-fuerte .bar { background: #16a34a; }
.password-strength-label { font-size: 0.75rem; margin-top: 4px; color: var(--gris-medio); }
[data-theme="dark"] .password-toggle { color: rgba(255,255,255,0.6); }
[data-theme="dark"] .password-toggle:hover { color: var(--naranja); background: rgba(242,104,34,0.15); }
[data-theme="dark"] .password-hint,
[data-theme="dark"] .password-strength-label { color: rgba(255,255,255,0.6); }
[data-theme="dark"] .password-match.ok { color: #22c55e; }
[data-theme="dark"] .password-match.bad { color: #f87171; }

/* Input para código de verificación de 6 dígitos */
.codigo-input {
  width: 100%;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.6rem;
  text-align: center;
  padding: 1rem;
  border: 2px dashed var(--naranja);
  border-radius: var(--radio);
  background: #FFF3EB;
  color: var(--naranja);
  font-family: 'Courier New', monospace;
  transition: all 0.2s;
}
.codigo-input:focus {
  outline: none;
  background: #FFE6D5;
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(242, 104, 34, 0.2);
}
.codigo-input::placeholder {
  color: rgba(242, 104, 34, 0.3);
}
[data-theme="dark"] .codigo-input {
  background: rgba(242, 104, 34, 0.1);
  color: var(--naranja);
}
.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.auth-brand .brand-logo { height: 50px; transition: opacity 0.3s, filter 0.3s; }
[data-theme="dark"] .auth-brand .brand-logo { filter: drop-shadow(0 0 4px rgba(242, 104, 34, 0.4)) drop-shadow(0 0 12px rgba(242, 104, 34, 0.2)); }
.auth-card h1 { text-align: center; margin-bottom: 0.25rem; }
.auth-card > .muted { text-align: center; }
.auth-form { margin-top: 1.5rem; }
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--gris-medio);
  font-size: 0.85rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gris-borde);
}
.auth-divider span { padding: 0 1rem; }
.auth-link { text-align: center; margin-top: 1rem; }
.auth-link a { font-weight: 600; }

.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radio-sm);
  margin: 1rem 0;
}
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert-success { background: var(--verde-claro); color: var(--verde); }
.alert-error { background: var(--rojo-claro); color: var(--rojo); }

/* ---------- FORMULARIOS ---------- */
.form-grupo {
  margin-bottom: 1rem;
}
.form-grupo label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--oscuro);
  margin-bottom: 0.4rem;
}
.form-grupo input,
.form-grupo select,
.form-grupo textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--gris-borde);
  border-radius: var(--radio);
  font-size: 1rem;
  background: var(--blanco);
  color: var(--oscuro);
  transition: border-color 0.2s;
}
.form-grupo input:focus,
.form-grupo select:focus,
.form-grupo textarea:focus {
  outline: none;
  border-color: var(--naranja);
}
.form-grupo textarea { resize: vertical; min-height: 120px; }
.form-grupo small {
  display: block;
  margin-top: 0.3rem;
  color: var(--gris-medio);
  font-size: 0.8rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--gris-texto);
  cursor: pointer;
}
.checkbox input { width: auto; flex-shrink: 0; }

.form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.form-publicar {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio-lg);
  padding: 1.5rem;
  margin-bottom: 3rem;
  max-width: 800px;
}
.auth-narrow .form-publicar,
.narrow .form-publicar { margin-left: auto; margin-right: auto; }

.upload-area {
  position: relative;
  border: 2px dashed var(--gris-borde);
  border-radius: var(--radio);
  padding: 2rem;
  text-align: center;
  background: var(--gris-bg);
  transition: all 0.2s;
  cursor: pointer;
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--naranja);
  background: var(--naranja-claro);
}
.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--gris-medio);
  transition: opacity 0.2s;
}
.upload-area.has-files .upload-prompt {
  display: none;
}
.upload-area.has-files {
  padding: 1rem;
}
.upload-prompt svg { color: var(--naranja); }
.upload-prompt p { font-weight: 600; margin: 0; color: var(--oscuro); }
.upload-prompt small { font-size: 0.8rem; }
.upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}
.upload-preview .preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radio-sm);
  overflow: hidden;
  background: var(--gris-bg);
}
.upload-preview .preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upload-preview .preview-item .preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.65);
  color: var(--blanco);
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s, transform 0.2s;
  padding: 0;
  z-index: 2;
}
.upload-preview .preview-item:hover .preview-remove {
  opacity: 1;
}
.upload-preview .preview-item .preview-remove:hover {
  background: var(--naranja);
  transform: scale(1.1);
}
.upload-preview .preview-item .preview-remove svg {
  display: block;
}

.imagenes-actuales {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
}
.img-actual {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radio-sm);
  overflow: hidden;
  cursor: pointer;
  display: block;
}
.img-actual input { position: absolute; opacity: 0; }
.img-actual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}
.img-actual input:checked ~ img { opacity: 0.3; }
.img-actual-eliminar {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--rojo);
  font-weight: 700;
  background: rgba(255,255,255,0.7);
  opacity: 0;
  transition: opacity 0.2s;
}
.img-actual:hover .img-actual-eliminar { opacity: 1; }
.img-actual-principal {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--naranja);
  color: var(--blanco);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}

/* ---------- PANEL ---------- */
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  padding: 1.25rem;
  text-align: center;
  color: var(--oscuro);
  transition: all 0.2s;
}
.stat-card:hover {
  border-color: var(--naranja);
  color: var(--naranja);
}
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--naranja);
}
.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--gris-medio);
  margin-top: 0.25rem;
}

.panel-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--gris-borde);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}
.tab {
  padding: 0.75rem 1.25rem;
  color: var(--gris-medio);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.2s;
}
.tab:hover { color: var(--naranja); }
.tab.active {
  color: var(--naranja);
  border-bottom-color: var(--naranja);
}

.panel-productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.panel-producto {
  display: flex;
  gap: 1rem;
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  overflow: hidden;
  padding: 0.75rem;
  align-items: flex-start;
  min-width: 0;
}
.panel-producto.vendido { opacity: 0.6; }
.panel-producto > a {
  flex-shrink: 0;
  display: block;
}
.panel-producto img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radio-sm);
  display: block;
}
.panel-producto-info { flex: 1; min-width: 0; overflow: hidden; }
.panel-producto-info h3 {
  font-size: 0.95rem;
  margin: 0 0 0.3rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.panel-producto-info h3 a { color: var(--oscuro); text-decoration: none; }
.panel-producto-info h3 a:hover { color: var(--naranja); }
.panel-producto-precio { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.2rem; }
.panel-producto-info .muted.small {
  font-size: 0.8rem;
  margin: 0.2rem 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.panel-producto-acciones {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.panel-producto-acciones .btn {
  padding: 0.4rem 0.85rem !important;
  font-size: 0.85rem !important;
  white-space: nowrap;
}

@media (max-width: 540px) {
  .panel-producto {
    flex-direction: column;
    align-items: stretch;
  }
  .panel-producto > a {
    width: 100%;
  }
  .panel-producto img {
    width: 100%;
    height: 180px;
  }
  .panel-producto-acciones {
    justify-content: flex-end;
  }
}

/* ---------- PERFIL ---------- */
.perfil-avatar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.avatar-xl {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}
.avatar-xl.avatar-letters {
  font-size: 2.5rem;
  background: var(--naranja);
  color: var(--blanco);
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.perfil-publico-head {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.perfil-publico-head > div { flex: 1; min-width: 200px; }
.perfil-publico-head .verificado {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--verde);
  font-weight: 600;
  background: var(--verde-claro);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-top: 0.3rem;
}
.perfil-stats {
  display: flex;
  gap: 1.5rem;
}
.perfil-stats > div {
  text-align: center;
}
.perfil-stats strong {
  display: block;
  font-size: 1.5rem;
  color: var(--naranja);
}
.perfil-stats span {
  display: block;
  font-size: 0.8rem;
  color: var(--gris-medio);
}

/* ---------- CHAT ---------- */
.chat-page { background: var(--gris-bg); min-height: 100vh; }
.chat-container { padding: 1rem 1rem 10rem; max-width: 800px; }
.chat-lista {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--blanco);
  border-radius: var(--radio);
  overflow: hidden;
}
.chat-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--gris-borde);
  color: var(--oscuro);
  transition: background 0.2s;
}
.chat-item:hover { background: var(--gris-bg); color: var(--oscuro); }
.chat-item:last-child { border-bottom: none; }
.chat-item-img {
  width: 56px;
  height: 56px;
  border-radius: var(--radio-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.chat-item-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gris-bg);
  font-size: 1.5rem;
}
.chat-item-info { flex: 1; min-width: 0; }
.chat-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.badge-no-leidos {
  background: var(--naranja);
  color: var(--blanco);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}
.chat-item-producto { font-size: 0.85rem; color: var(--naranja); }
.chat-item-msg {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--gris-medio);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-item.no-leido .chat-item-msg { color: var(--oscuro); font-weight: 600; }

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}
.chat-producto {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--oscuro);
}
.chat-producto img {
  width: 50px;
  height: 50px;
  border-radius: var(--radio-sm);
  object-fit: cover;
}
.chat-producto strong { display: block; }
.chat-producto span { font-size: 0.9rem; color: var(--naranja); font-weight: 600; }
.chat-otro {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.chat-mensajes {
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 1rem;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.chat-empty {
  background: var(--gris-bg);
  color: var(--gris-medio);
  padding: 1rem;
  border-radius: var(--radio);
  text-align: center;
  font-size: 0.9rem;
}
.msg {
  display: flex;
  flex-direction: column;
  max-width: 75%;
}
.msg-mio { align-self: flex-end; }
.msg-otro { align-self: flex-start; }
.msg-bubble {
  padding: 0.6rem 0.9rem;
  border-radius: 1rem;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.msg-mio .msg-bubble { background: var(--naranja); color: var(--blanco); border-bottom-right-radius: 0.25rem; }
.msg-otro .msg-bubble { background: var(--gris-bg); color: var(--oscuro); border-bottom-left-radius: 0.25rem; }
.msg-meta { font-size: 0.7rem; color: var(--gris-medio); margin-top: 0.2rem; padding: 0 0.5rem; }
.msg-mio .msg-meta { text-align: right; }

.chat-input {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  background: var(--blanco);
  border-top: 1px solid var(--gris-borde);
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 50;
  padding-bottom: 0.75rem;
}
@media (min-width: 769px) {
  .chat-input { bottom: 0; }
}
.chat-input textarea {
  flex: 1;
  border: 1.5px solid var(--gris-borde);
  border-radius: var(--radio);
  padding: 0.6rem 0.85rem;
  font-size: 1rem;
  resize: none;
  max-height: 120px;
  min-height: 44px;
}
.chat-input textarea:focus { outline: none; border-color: var(--naranja); }

/* ---------- FAQ ---------- */
.faq-list { margin: 2rem 0; }
.faq-item {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--naranja); }
.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--naranja);
  transition: transform 0.2s;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 1.25rem 1.25rem; color: var(--gris-texto); margin: 0; }

.como-paso {
  display: flex;
  gap: 1.5rem;
  margin: 2rem 0;
  align-items: flex-start;
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio-lg);
  padding: 2rem;
}
.como-paso-num {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  background: var(--naranja);
  color: var(--blanco);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
}
.como-paso-content h2 { font-size: 1.4rem; }
.como-cta {
  text-align: center;
  margin: 3rem 0;
  padding: 2rem;
  background: var(--naranja-claro);
  border-radius: var(--radio-lg);
}
.como-cta h2 { margin-bottom: 0.5rem; }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--bg-dark-section);
  color: #d4d4d4;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.site-footer h4 {
  /* Forzar blanco para que se vea en ambos modos (light y dark) */
  color: #ffffff;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.site-footer a { color: #d4d4d4; }
.site-footer a:hover { color: var(--naranja); }
.site-footer p {
  color: #d4d4d4;
  line-height: 1.6;
}
.site-footer ul {
  list-style: none;
  padding: 0;
}
.site-footer ul li { margin-bottom: 0.5rem; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand p { color: #aaa; font-size: 0.9rem; }
/* Estilos del logo en el footer definidos arriba (líneas ~334) */
.footer-brand .brand-logo-full { display: block; }
.footer-brand .brand-logo-icon { display: none; }
/* En mobile (icono) en dark mode: ajuste adicional de fondo con blur */
[data-theme="dark"] .footer-brand .brand-logo-icon {
  backdrop-filter: blur(4px);
}
.footer-social { display: flex; gap: 0.75rem; margin-top: 1rem; }
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transition: all 0.2s;
}
.footer-social a:hover { background: var(--naranja); color: var(--blanco); }
.footer-cta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.footer-bottom .muted { color: #aaaaaa; }
.footer-bottom p { color: #cccccc; }

/* ---------- ADMIN ---------- */
.tabla-admin {
  width: 100%;
  border-collapse: collapse;
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  overflow: hidden;
  font-size: 0.9rem;
}
.tabla-admin th, .tabla-admin td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gris-borde);
}
.tabla-admin th { background: var(--gris-bg); font-weight: 600; }
.tabla-admin tr:last-child td { border-bottom: none; }

/* ---------- ERRORES ---------- */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.error-content { text-align: center; padding: 2rem; }
.error-emoji { font-size: 5rem; margin-bottom: 1rem; }

/* ---------- RESPONSIVE ---------- */
@media (min-width: 768px) {
  .hero-inner { grid-template-columns: 1.2fr 1fr; }
  .hero-img { display: block; }
  .producto-detalle { grid-template-columns: 1.1fr 1fr; }
  .form-row { grid-template-columns: repeat(3, 1fr); }
  .form-row:has(.form-grupo:nth-child(2):last-child) { grid-template-columns: 1fr 1fr; }
  .search-layout { grid-template-columns: 280px 1fr; }
  /* Solo en desktop los filtros se quedan fijos al scrollear */
  .filtros { position: sticky; top: 80px; }
  .productos-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .datos-rapidos { grid-template-columns: repeat(2, 1fr); }
  .nav-username { display: inline; }
  .main-nav { gap: 0.35rem; padding-left: 0.5rem; flex-wrap: nowrap; }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .header-inner { gap: 0.5rem; }
  .search-form { max-width: none; }
  .producto-detalle { gap: 1rem; }
  .precio-big { font-size: 2rem; }
  .footer-grid { grid-template-columns: 1fr; }

  /* En móvil: mostrar solo el ícono, no el logo completo */
  .brand-logo-full { display: none !important; }
  .brand-logo-icon { display: block !important; }
  /* En el footer del móvil, también usamos el ícono */
  .footer-brand .brand-logo-full { display: none !important; }
  .footer-brand .brand-logo-icon { display: inline-block !important; height: 44px; width: 44px; padding: 4px; }
}

@media (max-width: 480px) {
  /* En móviles muy chicos: achicar un poco más el logo */
  .brand-logo-icon { height: 52px; width: 52px; }
  .header-inner { padding: 0.5rem 0.75rem; min-height: 80px; }
}

@media (min-width: 1024px) {
  .productos-grid { grid-template-columns: repeat(4, 1fr); }
  .categorias-grid { grid-template-columns: repeat(7, 1fr); }
  .categorias-grid .cat-card { padding: 1.5rem 0.5rem; }
}

/* ---------- UTILIDADES ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.hidden { display: none !important; }

/* Accesibilidad: focus visible */
:focus-visible {
  outline: 3px solid var(--naranja);
  outline-offset: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =====================================================
   BOTÓN TOGGLE DARK MODE
   ===================================================== */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--gris-borde);
  color: var(--oscuro);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 0.25rem;
  position: relative;
  overflow: hidden;
  transition: background-color 0.2s, border-color 0.2s, transform 0.3s;
}
.theme-toggle:hover {
  background: var(--naranja-claro);
  border-color: var(--naranja);
  transform: rotate(15deg);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.4s, opacity 0.3s;
  position: absolute;
}
.theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: rotate(0deg) scale(1); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="dark"] .theme-toggle:hover { background: var(--naranja-claro); border-color: var(--naranja); }

/* Toggle en el menú móvil */
.mobile-menu .theme-toggle-mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--gris-bg);
  border-radius: var(--radio);
  margin-bottom: 0.5rem;
  color: var(--oscuro);
}
.mobile-menu .theme-toggle-mobile .label {
  font-weight: 600;
  font-size: 0.95rem;
}
.mobile-menu .theme-toggle-mobile .icon {
  font-size: 1.2rem;
}

/* =====================================================
   CARRUSEL DE PRODUCTOS DESTACADOS
   ===================================================== */
.carrusel-section {
  background: linear-gradient(180deg, transparent 0%, var(--gris-bg) 100%);
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
}
/* Carrusel de cards: solo visible en mobile/tablet. En desktop lo reemplaza el hero-carrusel. */
@media (min-width: 1024px) {
  .carrusel-mobile-only { display: none; }
}
[data-theme="dark"] .carrusel-section {
  background: linear-gradient(180deg, transparent 0%, rgba(40, 25, 18, 0.3) 100%);
}

.carrusel {
  position: relative;
  margin-top: 1.5rem;
}

.carrusel-viewport {
  overflow: hidden;
  margin: 0 60px;
  border-radius: var(--radio-lg);
}
/* En móvil: menos margen para que el carrusel ocupe más pantalla */
@media (max-width: 768px) {
  .carrusel-viewport { margin: 0 12px; }
}

.carrusel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carrusel-slide {
  flex: 0 0 auto;
  width: 100%;
  padding: 0 0.5rem;
  box-sizing: border-box;
}

/* === MÓVIL: peek effect (1 slide + 12% del siguiente visible) === */
@media (max-width: 639px) {
  .carrusel-slide {
    width: 88%;
    padding: 0 0.35rem;
  }
  .carrusel-slide:first-child { padding-left: 0.35rem; }
  .carrusel-slide:last-child { padding-right: 0.35rem; }
}

/* En desktop mostrar 3 slides */
@media (min-width: 1024px) {
  .carrusel-slide { width: 33.333%; }
}
/* En tablet 2 slides */
@media (min-width: 640px) and (max-width: 1023px) {
  .carrusel-slide { width: 50%; }
}

.carrusel-card {
  display: block;
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio-lg);
  overflow: hidden;
  color: var(--oscuro);
  height: 100%;
  transition: box-shadow 0.3s, border-color 0.3s, opacity 0.4s, transform 0.2s;
  text-decoration: none;
  /* Estado por defecto: desvanecido, sin scale (para no desencuadrar) */
  opacity: 0.65;
  position: relative;
  z-index: 1;
}

/* Slide activo: destacado con sombra + borde naranja (SIN scale para no desencuadrar) */
.carrusel-slide.active .carrusel-card {
  opacity: 1;
  z-index: 3;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
  border-color: var(--naranja);
  border-width: 2px;
}
[data-theme="dark"] .carrusel-slide.active .carrusel-card {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.carrusel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
  border-color: var(--naranja);
  color: var(--oscuro);
  opacity: 1;
  z-index: 4;
}

.carrusel-img {
  position: relative;
  aspect-ratio: 1;
  background: var(--gris-bg);
  overflow: hidden;
}
.carrusel-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.carrusel-card:hover .carrusel-img img {
  transform: scale(1.05);
}

.carrusel-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--naranja);
  color: var(--blanco);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.carrusel-info {
  padding: 0.75rem 1rem 1rem;
}

.carrusel-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--naranja);
  background: var(--naranja-claro);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.carrusel-titulo {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0.25rem 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.carrusel-precio {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  color: var(--oscuro);
}

.carrusel-ubicacion,
.carrusel-tiempo {
  font-size: 0.78rem;
  color: var(--gris-medio);
  margin: 0.2rem 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.carrusel-cta {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--naranja);
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.2s;
}
.carrusel-card:hover .carrusel-cta {
  transform: translateX(4px);
}

/* Botones de navegación (flechas) */
.carrusel-nav {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  background: var(--blanco);
  color: var(--oscuro);
  border: 2px solid var(--gris-borde);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  box-shadow: var(--sombra);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.carrusel-nav:hover {
  background: var(--naranja);
  color: var(--blanco);
  border-color: var(--naranja);
}
.carrusel-nav:active {
  transform: translateY(-50%) scale(0.95);
}
.carrusel-prev { left: 0; }
.carrusel-next { right: 0; }

@media (max-width: 640px) {
  .carrusel-nav {
    width: 36px;
    height: 36px;
  }
}
/* En móvil las flechas se ocultan para no obstruir el peek effect */
@media (max-width: 768px) {
  .carrusel-nav { display: none; }
}

/* Dots */
.carrusel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.carrusel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gris-borde);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}
.carrusel-dot:hover {
  background: var(--gris-medio);
  transform: scale(1.2);
}
.carrusel-dot.active {
  background: var(--naranja);
  width: 30px;
  border-radius: 5px;
  box-shadow: 0 0 8px rgba(242, 104, 34, 0.4);
}

/* Indicador de progreso (autoplay) */
@keyframes carruselProgress {
  from { width: 0; }
  to { width: 100%; }
}
.carrusel-progress {
  position: absolute;
  bottom: -8px;
  left: 0;
  height: 3px;
  background: var(--naranja);
  border-radius: 2px;
  animation: carruselProgress 4.5s linear infinite;
  z-index: 4;
  display: none;
}
.carrusel:hover .carrusel-progress {
  display: none; /* Pausar animación al hacer hover */
}

/* Focus visible para accesibilidad */
.carrusel:focus-visible {
  outline: 3px solid var(--naranja);
  outline-offset: 4px;
  border-radius: var(--radio-lg);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .carrusel-track { transition: none; }
  .carrusel-dot.active { transition: none; }
}

/* =====================================================
   ACERCA DE NOSOTROS
   Página /acerca-de - Story-telling emocional
   ===================================================== */

/* === HERO === */
.about-hero {
  position: relative;
  background: linear-gradient(135deg, #FFF5EE 0%, #FFE8D6 50%, #FFD9B8 100%);
  padding: 4rem 0 5rem;
  overflow: hidden;
}
[data-theme="dark"] .about-hero {
  background: linear-gradient(135deg, #2a1a10 0%, #3a2418 50%, #4a2e1f 100%);
}
.about-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(242, 104, 34, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.about-hero-content {
  position: relative;
  max-width: 760px;
  z-index: 1;
}
.about-eyebrow {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: var(--naranja);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}
.about-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--oscuro);
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
}
[data-theme="dark"] .about-title { color: var(--blanco); }
.about-title-accent {
  color: var(--naranja);
  position: relative;
  display: inline-block;
}
.about-title-accent::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 6px;
  background: rgba(242, 104, 34, 0.25);
  border-radius: 3px;
  z-index: -1;
}
.about-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--oscuro);
  opacity: 0.85;
  margin: 0;
  max-width: 620px;
}
[data-theme="dark"] .about-lead { color: var(--blanco); opacity: 0.85; }
.about-lead strong { color: var(--naranja); font-weight: 700; }

/* === STORY: bloques alternados === */
.about-story {
  padding: 5rem 0;
  background: var(--blanco);
}
[data-theme="dark"] .about-story { background: var(--blanco); }

.about-block {
  display: grid;
  grid-template-columns: 80px 1fr 220px;
  gap: 2.5rem;
  align-items: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--gris-borde);
}
[data-theme="dark"] .about-block { border-bottom-color: rgba(255,255,255,0.1); }
.about-block:last-child { border-bottom: none; }

.about-block-num {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--naranja);
  opacity: 0.18;
  font-variant-numeric: tabular-nums;
}

.about-block-text h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  margin: 0 0 1rem;
  color: var(--oscuro);
  letter-spacing: -0.01em;
}
[data-theme="dark"] .about-block-text h2 { color: var(--blanco); }

.about-block-text p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--gris-texto);
  margin: 0 0 0.9rem;
}
[data-theme="dark"] .about-block-text p { color: rgba(255,255,255,0.78); }
.about-block-text p:last-child { margin-bottom: 0; }
.about-block-text strong { color: var(--oscuro); font-weight: 700; }
[data-theme="dark"] .about-block-text strong { color: var(--blanco); }
.about-block-text em { color: var(--naranja); font-style: italic; font-weight: 600; }

.about-quote {
  font-size: 1.2rem !important;
  font-style: italic;
  color: var(--naranja) !important;
  border-left: 3px solid var(--naranja);
  padding-left: 1.25rem !important;
  margin: 0 0 1.25rem !important;
}
[data-theme="dark"] .about-quote { color: #FF8A3D !important; }

.about-link {
  color: var(--naranja);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 2px solid var(--naranja);
  transition: opacity 0.2s;
}
.about-link:hover { opacity: 0.7; }

/* === Ilustraciones de los bloques === */
.about-block-illu {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.illu-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
}
.illu-circle--1 {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--naranja) 0%, #FF8A3D 100%);
  opacity: 0.18;
  animation: float 6s ease-in-out infinite;
}
.illu-circle--2 {
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
  background: linear-gradient(135deg, #FFD9B8 0%, #FFB88A 100%);
  opacity: 0.4;
  animation: float 6s ease-in-out 2s infinite;
}
.illu-emoji {
  font-size: 4.5rem;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(242, 104, 34, 0.3));
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* === Reverse: imagen a la izquierda === */
.about-block--reverse {
  grid-template-columns: 80px 220px 1fr;
}
.about-block--reverse .about-block-illu { order: 2; }
.about-block--reverse .about-block-text { order: 3; }

/* === VALORES === */
.about-values {
  padding: 5rem 0;
  background: var(--gris-bg);
}
[data-theme="dark"] .about-values { background: rgba(40, 25, 18, 0.2); }

.about-values .section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--oscuro);
  margin: 0 0 0.5rem;
}
[data-theme="dark"] .about-values .section-head h2 { color: var(--blanco); }

.about-values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.about-value {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio-lg);
  padding: 2rem 1.75rem;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
[data-theme="dark"] .about-value { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }
.about-value:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
  border-color: var(--naranja);
}
.about-value-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08));
}
.about-value h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--oscuro);
  margin: 0 0 0.6rem;
}
[data-theme="dark"] .about-value h3 { color: var(--blanco); }
.about-value p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--gris-texto);
  margin: 0;
}
[data-theme="dark"] .about-value p { color: rgba(255,255,255,0.72); }

/* === CTA FINAL === */
.about-cta {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--naranja) 0%, #FF8A3D 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.about-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.about-cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.about-cta h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin: 0 0 1.5rem;
  letter-spacing: -0.01em;
}
.about-cta-quote {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 2.5rem;
  font-style: italic;
  opacity: 0.95;
}
.about-cta-accent {
  display: inline-block;
  font-size: 1.2em;
  font-weight: 800;
  position: relative;
}
.about-cta-accent::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 2px;
  height: 8px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  z-index: -1;
}
.about-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.about-cta .btn-primary {
  background: #fff;
  color: var(--naranja);
  border: none;
}
.about-cta .btn-primary:hover {
  background: var(--oscuro);
  color: #fff;
}
.about-cta .btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
}
.about-cta .btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}

/* === MOBILE: bloques verticales === */
@media (max-width: 768px) {
  .about-hero { padding: 3rem 0 4rem; }
  .about-block {
    grid-template-columns: 50px 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
    padding: 2.5rem 0;
  }
  .about-block--reverse {
    grid-template-columns: 50px 1fr;
  }
  .about-block--reverse .about-block-illu { order: 3; }
  .about-block--reverse .about-block-text { order: 2; }
  .about-block-illu {
    width: 100%;
    height: 140px;
    grid-column: 1 / -1;
    margin-top: 0.5rem;
  }
  .illu-emoji { font-size: 3.5rem; }
  .about-block-num { font-size: 2.8rem; }
  .about-story, .about-values, .about-cta { padding: 3.5rem 0; }
  .about-cta-buttons { flex-direction: column; align-items: stretch; }
  .about-cta-buttons .btn { width: 100%; }
}

/* === PREVIEW DE ACERCA DE NOSOTROS EN LA HOME === */
.about-preview-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, #FFF5EE 0%, #FFE8D6 100%);
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .about-preview-section {
  background: linear-gradient(135deg, #1a0f08 0%, #2a1a10 50%, #3a2418 100%);
}
.about-preview-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(242, 104, 34, 0.15) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
[data-theme="dark"] .about-preview-section::before {
  background: radial-gradient(circle, rgba(242, 104, 34, 0.22) 0%, transparent 60%);
}
.about-preview {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-preview-text {
  max-width: 600px;
}
.about-preview-eyebrow {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: var(--naranja);
  color: #fff;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.about-preview-text h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 1.25rem;
  color: var(--oscuro);
  letter-spacing: -0.01em;
}
[data-theme="dark"] .about-preview-text h2 { color: #ffffff; }
.about-preview-text p {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--oscuro);
  opacity: 0.85;
  margin: 0 0 1rem;
}
[data-theme="dark"] .about-preview-text p { color: #f5f5f7; opacity: 1; font-weight: 500; }
.about-preview-text strong { color: var(--naranja); font-weight: 700; }
[data-theme="dark"] .about-preview-text strong { color: #FF8A3D; }
.about-preview-text em { color: var(--naranja); font-style: italic; font-weight: 600; }
[data-theme="dark"] .about-preview-text em { color: #FF8A3D; }
.about-preview-quote {
  font-size: 1.1rem !important;
  font-style: italic;
  border-left: 3px solid var(--naranja);
  padding-left: 1rem !important;
  color: var(--naranja) !important;
  margin: 1.5rem 0 !important;
  opacity: 1 !important;
  font-weight: 600;
}
[data-theme="dark"] .about-preview-quote { color: #FF8A3D !important; }
.about-preview-cta {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.about-preview-cta svg {
  width: 20px;
  height: 20px;
  transition: transform 0.25s;
}
.about-preview-cta:hover svg {
  transform: translateX(4px);
}

/* === Visual: 4 cards con emojis flotando === */
.about-preview-visual {
  position: relative;
  width: 100%;
  height: 360px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
}
.about-preview-card {
  background: var(--blanco);
  border: 1px solid rgba(242, 104, 34, 0.2);
  border-radius: var(--radio-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s, background 0.2s, border-color 0.2s;
}
[data-theme="dark"] .about-preview-card {
  background: rgba(45, 30, 22, 0.85);
  border: 1px solid rgba(255, 138, 61, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.about-preview-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--naranja);
}
[data-theme="dark"] .about-preview-card:hover {
  background: rgba(60, 40, 30, 0.95);
  border-color: var(--naranja);
}
.about-preview-card .card-emoji {
  font-size: 2.5rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}
.about-preview-card .card-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--oscuro);
  text-align: center;
}
[data-theme="dark"] .about-preview-card .card-text { color: #ffffff; }
.about-preview-card--1 { animation: float-card 5s ease-in-out infinite; }
.about-preview-card--2 { animation: float-card 5s ease-in-out 1s infinite; }
.about-preview-card--3 { animation: float-card 5s ease-in-out 2s infinite; }
.about-preview-card--4 { animation: float-card 5s ease-in-out 3s infinite; }
@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* === MOBILE: vertical === */
@media (max-width: 768px) {
  .about-preview-section { padding: 3.5rem 0; }
  .about-preview {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-preview-visual {
    height: 280px;
    max-width: 400px;
    margin: 0 auto;
  }
  .about-preview-card .card-emoji { font-size: 2rem; }
  .about-preview-card .card-text { font-size: 0.78rem; }
}

/* =====================================================
   HERO CARROUSEL (DESKTOP ONLY)
   Carrusel grande con efecto Ken Burns (imagen agrandándose)
   Una imagen a la vez, rotación automática
   ===================================================== */
.hero-carrusel-section {
  display: none; /* Oculto por defecto (mobile) */
  padding: 3rem 0;
  background: var(--blanco);
}
[data-theme="dark"] .hero-carrusel-section { background: var(--blanco); }

@media (min-width: 1024px) {
  .hero-carrusel-section { display: block; }
}

.hero-carrusel {
  position: relative;
  width: 100%;
  height: 520px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--oscuro);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease;
  will-change: opacity;
}
.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}
.hero-slide.is-active .hero-slide-bg {
  /* Efecto Ken Burns: zoom puro desde el centro.
     Sin translate, sin paneo: solo scale centrado para que no se desencuadre. */
  animation: kenBurns 6s ease-out forwards;
}
@keyframes kenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

/* Variaciones de Ken Burns centradas (sin paneo, sin desencuadre) */
.hero-slide--0.is-active .hero-slide-bg { animation-name: kenBurns-0; }
.hero-slide--1.is-active .hero-slide-bg { animation-name: kenBurns-1; }
.hero-slide--2.is-active .hero-slide-bg { animation-name: kenBurns-2; }
.hero-slide--3.is-active .hero-slide-bg { animation-name: kenBurns-3; }
@keyframes kenBurns-0 { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes kenBurns-1 { from { transform: scale(1.02); } to { transform: scale(1.1); } }
@keyframes kenBurns-2 { from { transform: scale(1); } to { transform: scale(1.07); } }
@keyframes kenBurns-3 { from { transform: scale(1.04); } to { transform: scale(1.12); } }

.hero-slide-link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
  /* Fallback si no carga la imagen */
  background-color: var(--naranja);
  /* Suavizar el escalado para que no se vean pixelados los bordes */
  image-rendering: -webkit-optimize-contrast;
  transform-origin: center center;
}

/* Overlay degradado para que el texto se lea */
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.75) 60%, rgba(0, 0, 0, 0.95) 100%);
  pointer-events: none;
}

.hero-slide-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 3rem;
  z-index: 2;
  color: #fff;
  /* Entrada con fade-up */
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s, opacity 0.8s ease 0.2s;
}
.hero-slide.is-active .hero-slide-content {
  transform: translateY(0);
  opacity: 1;
}

.hero-slide-cat {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 4;
}
.hero-slide-titulo {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 24px rgba(0, 0, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.8);
  max-width: 700px;
  letter-spacing: -0.01em;
}
.hero-slide-precio {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ff8a3d;
  margin: 0 0 0.6rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 16px rgba(0, 0, 0, 0.7);
}
.hero-slide-ubicacion {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  opacity: 1;
}
.hero-slide-ubicacion svg { flex-shrink: 0; }
.hero-slide-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  background: #fff;
  color: var(--oscuro);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.hero-slide-link:hover .hero-slide-cta {
  transform: translateX(4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

/* === Dots de navegación del hero === */
.hero-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 3;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 999px;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: width 0.3s, background 0.3s;
}
.hero-dot.is-active {
  width: 28px;
  background: #fff;
  border-radius: 999px;
}

/* === Flechas de navegación === */
.hero-nav {
  position: absolute;
  top: 32%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  opacity: 0.85;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.hero-carrusel:hover .hero-nav { opacity: 1; }
.hero-nav:hover { background: rgba(255, 255, 255, 0.35); transform: translateY(-50%) scale(1.05); }
.hero-nav--prev { left: 1.5rem; }
.hero-nav--next { right: 1.5rem; }
.hero-nav svg { width: 22px; height: 22px; }

/* === MOBILE: oculto === */
@media (max-width: 1023px) {
  .hero-carrusel-section { display: none; }
  .hero-carrusel { height: 0; }
}

/* =====================================================
   BOTTOM NAVIGATION BAR (mobile-first) - ESTILO MODERNO
   Inspirado en iOS 17 / Pinterest / Threads
   - Floating glass bar (efecto cristal con backdrop-filter)
   - 5 items con indicador pill de item activo
   - Botón central "Publicar" como pill elevada integrada
   - GPU-composited hide-on-scroll
   - 100% estable (position:fixed, transform:translateY)
   ===================================================== */

/* Contenedor principal: glassmorphism floating */
.bnav {
  display: none;
  position: fixed;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translate3d(0, 0, 0);
  -webkit-transform: translateX(-50%) translate3d(0, 0, 0);
  width: calc(100% - 24px);
  max-width: 460px;
  height: 64px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 32px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.10),
    0 2px 6px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  z-index: 9999;
  padding: 6px;
  align-items: center;
  justify-content: space-between;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  touch-action: manipulation;
  transition:
    transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.25s ease,
    background 0.2s ease;
  -webkit-transition:
    -webkit-transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.25s ease,
    background 0.2s ease;
}
[data-theme="dark"] .bnav {
  background: rgba(28, 28, 30, 0.78);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
  .bnav { display: flex; }
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}

/* === HIDE-ON-SCROLL: solo transform en GPU, estable === */
.bnav.is-hidden {
  transform: translateX(-50%) translate3d(0, 140%, 0) !important;
  -webkit-transform: translateX(-50%) translate3d(0, 140%, 0) !important;
  opacity: 0;
  pointer-events: none;
}

/* === ITEMS === */
.bnav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  color: var(--gris-medio);
  text-decoration: none;
  font-size: 0.66rem;
  font-weight: 600;
  border-radius: 20px;
  min-width: 56px;
  height: 52px;
  flex: 1;
  flex-shrink: 0;
  box-sizing: border-box;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.bnav-item:hover { color: var(--oscuro); }
[data-theme="dark"] .bnav-item:hover { color: var(--blanco); }

.bnav-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
  stroke-width: 2;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bnav-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  display: block;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* === ITEM ACTIVO: pill de fondo === */
.bnav-item.is-active { color: var(--naranja); }
.bnav-item.is-active .bnav-icon {
  fill: currentColor;
  stroke: currentColor;
  transform: scale(1.05);
}

/* === ITEM PUBLICAR: pill central integrada, elevada === */
.bnav-pub {
  position: relative;
  flex: 1.2;
  z-index: 2;
}
.bnav-pub .bnav-pill {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--naranja) 0%, #FF8A3D 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 18px rgba(242, 104, 34, 0.45),
    0 2px 4px rgba(242, 104, 34, 0.3);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}
.bnav-pub .bnav-pill .bnav-icon {
  width: 24px;
  height: 24px;
  stroke: #fff;
}
.bnav-pub:hover .bnav-pill {
  transform: translateX(-50%) scale(1.08);
  box-shadow:
    0 10px 26px rgba(242, 104, 34, 0.55),
    0 4px 8px rgba(242, 104, 34, 0.35);
}
.bnav-pub.is-active .bnav-pill {
  background: linear-gradient(135deg, var(--naranja-hover) 0%, var(--naranja) 100%);
}
.bnav-pub .bnav-label {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gris-medio);
  font-size: 0.62rem;
  opacity: 0.85;
}

/* === BADGE de mensajes no leídos === */
.bnav-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  background: var(--rojo);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 999px;
  min-width: 16px;
  text-align: center;
  line-height: 1.1;
  border: 1.5px solid var(--blanco);
}
[data-theme="dark"] .bnav-badge { border-color: var(--oscuro); }

/* =====================================================
   BOTÓN DE WHATSAPP + COMPARTIR (en producto)
   ===================================================== */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #25D366;
  color: #FFFFFF;
  border: 2px solid #25D366;
  margin-top: 0.5rem;
  transition: all 0.2s;
}
.btn-whatsapp:hover {
  background: #1DA851;
  border-color: #1DA851;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp svg { flex-shrink: 0; }

.share-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gris-borde);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.share-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gris-medio);
}
.share-buttons {
  display: flex;
  gap: 0.5rem;
  flex: 1;
}
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gris-bg);
  color: var(--oscuro);
  border: 1.5px solid var(--gris-borde);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.share-btn:hover {
  background: var(--naranja);
  color: var(--blanco);
  border-color: var(--naranja);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(242, 104, 34, 0.2);
}
.share-btn[data-share="whatsapp"]:hover {
  background: #25D366;
  border-color: #25D366;
}
.share-btn[data-share="email"]:hover {
  background: var(--azul);
  border-color: var(--azul);
}
.share-btn.copied {
  background: var(--verde);
  color: var(--blanco);
  border-color: var(--verde);
}
.share-btn svg { width: 18px; height: 18px; }

/* =====================================================
   VISTO RECIENTEMENTE
   ===================================================== */
.visto-reciente-section {
  padding: 2rem 0;
  background: var(--gris-bg);
  border-top: 1px solid var(--gris-borde);
  border-bottom: 1px solid var(--gris-borde);
}
[data-theme="dark"] .visto-reciente-section {
  background: rgba(40, 25, 18, 0.2);
}
.visto-reciente-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 0.75rem 0.25rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.visto-reciente-track::-webkit-scrollbar { height: 6px; }
.visto-reciente-track::-webkit-scrollbar-thumb { background: var(--gris-claro); border-radius: 3px; }
.visto-reciente-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  overflow: hidden;
  text-decoration: none;
  color: var(--oscuro);
  transition: all 0.2s;
  display: block;
}
.visto-reciente-card:hover {
  border-color: var(--naranja);
  transform: translateY(-2px);
  box-shadow: var(--sombra);
  color: var(--oscuro);
}
.visto-reciente-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.visto-reciente-card-info {
  padding: 0.5rem 0.6rem;
}
.visto-reciente-card-info h4 {
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2em;
}
.visto-reciente-precio {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--oscuro);
  margin: 0;
}

/* =====================================================
   SISTEMA DE CHAT + PAGOS + NOTIFICACIONES
   ===================================================== */

/* --- Badge de notificaciones (header + bottom nav) --- */
.nav-link-chat {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--naranja);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  border: 2px solid var(--bg-main, #fff);
  box-shadow: 0 2px 6px rgba(242, 104, 34, 0.4);
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.bnav-item {
  position: relative;
}
.bnav-badge {
  position: absolute;
  top: 4px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--naranja);
  color: #fff;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(242, 104, 34, 0.4);
}
.bnav-pub .bnav-badge {
  top: 0;
  right: -2px;
}

/* --- Botón Comprar (producto) --- */
.btn-success {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: #fff;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(46, 204, 113, 0.3);
}
.btn-success:hover {
  background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(46, 204, 113, 0.4);
}

.compra-hint,
.compra-exitosa-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gris-texto);
  margin: 0.5rem 0 1rem;
  padding: 0.5rem;
}
.compra-exitosa-hint {
  color: #27ae60;
  font-weight: 600;
}

/* --- Página de pago --- */
.pagar-container {
  max-width: 1100px;
  padding: 2rem 1rem;
}
.pagar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}
@media (max-width: 768px) {
  .pagar-grid { grid-template-columns: 1fr; }
}

.pagar-producto {
  background: var(--bg-card, #fff);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.pagar-producto-head {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.pagar-img {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--gris-bg, #f1f1f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
}
.pagar-producto-head h2 {
  font-size: 1.25rem;
  margin: 0 0 0.4rem;
}
.pagar-vendedor {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--gris-texto);
}
.pagar-precio-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--gris-bg, #f7f7f7);
  border-radius: 12px;
  margin-top: 1rem;
}
.pagar-precio {
  font-size: 1.5rem;
  color: var(--naranja);
}

.pagar-metodos {
  background: var(--bg-card, #fff);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.pagar-metodos h2 {
  margin: 0 0 1.25rem;
  font-size: 1.1rem;
}

.metodo-pago-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border: 2px solid var(--gris-borde, #e5e5e5);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.metodo-pago-card:hover {
  border-color: var(--naranja);
  background: rgba(242, 104, 34, 0.04);
}
.metodo-pago-card input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--naranja);
  cursor: pointer;
}
.metodo-pago-card:has(input:checked) {
  border-color: var(--naranja);
  background: rgba(242, 104, 34, 0.08);
}
.metodo-pago-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.metodo-pago-info strong { font-size: 0.95rem; color: var(--oscuro); }
.metodo-pago-info span { font-size: 0.82rem; color: var(--gris-texto); }

/* === DARK MODE: Métodos de pago === */
[data-theme="dark"] .pagar-metodos h2,
[data-theme="dark"] .pagar-resumen h3 {
  color: #ffffff;
}
[data-theme="dark"] .metodo-pago-card {
  background: #1e1e1e !important;
  border-color: rgba(255,255,255,0.15) !important;
}
[data-theme="dark"] .metodo-pago-card:hover {
  background: rgba(242, 104, 34, 0.10) !important;
  border-color: var(--naranja) !important;
}
[data-theme="dark"] .metodo-pago-card:has(input:checked) {
  background: rgba(242, 104, 34, 0.15) !important;
  border-color: var(--naranja) !important;
}
[data-theme="dark"] .metodo-pago-info strong {
  color: #ffffff !important;
}
[data-theme="dark"] .metodo-pago-info span {
  color: rgba(255,255,255,0.70) !important;
}
[data-theme="dark"] .nota-label span {
  color: rgba(255,255,255,0.85);
}
[data-theme="dark"] .nota-label textarea {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #ffffff;
}
[data-theme="dark"] .nota-label textarea::placeholder {
  color: rgba(255,255,255,0.45);
}
[data-theme="dark"] .nota-label textarea:focus {
  border-color: var(--naranja);
  background: rgba(255,255,255,0.12);
}

.nota-label {
  display: block;
  margin: 1.5rem 0 0.5rem;
}
.nota-label span {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.nota-label textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gris-borde, #e5e5e5);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

.pagar-resumen {
  margin: 1.5rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--gris-borde, #e5e5e5);
}
.pagar-resumen-linea {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.95rem;
}
.pagar-total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--naranja);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--gris-borde, #e5e5e5);
}

.pagar-seguridad {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gris-texto);
  margin: 1rem 0 0;
}

/* --- Mis compras / Mis ventas --- */
.compras-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0;
  border-bottom: 1px solid var(--gris-borde, #e5e5e5);
  overflow-x: auto;
}
.compras-tab {
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  color: var(--gris-texto);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.compras-tab:hover { color: var(--naranja); }
.compras-tab.active {
  color: var(--naranja);
  border-bottom-color: var(--naranja);
}

.compras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.compra-card {
  background: var(--bg-card, #fff);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.compra-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.compra-card-img-link {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--gris-bg, #f1f1f1);
}
.compra-card-img-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.compra-card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 3rem;
  color: var(--gris-texto);
}
.compra-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.compra-card-titulo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--oscuro);
  text-decoration: none;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.compra-card-vendedor {
  font-size: 0.85rem;
  color: var(--gris-texto);
  margin: 0;
}
.compra-card-precio {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--naranja);
  margin: 0.3rem 0 0;
}
.compra-card-comision {
  font-size: 0.78rem;
  margin: 0;
}
.compra-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.compra-estado {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(46, 204, 113, 0.12);
  color: #27ae60;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.compra-ref {
  font-size: 0.7rem;
  color: var(--gris-texto);
  font-family: monospace;
}
.compra-card-fecha {
  font-size: 0.78rem;
  color: var(--gris-texto);
  margin: 0.2rem 0 0.5rem;
}
.btn-chatear-desde-compra {
  margin-top: auto;
}

/* --- Chat mejorado (estilo MercadoLibre) --- */
.chat-page .container {
  max-width: 900px;
  padding: 0;
}
.chat-container {
  padding: 0;
  height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-card, #fff);
  border-bottom: 1px solid var(--gris-borde, #e5e5e5);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.chat-producto {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}
.chat-producto img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.chat-producto strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.chat-producto span {
  display: block;
  font-size: 0.85rem;
  color: var(--naranja);
  font-weight: 700;
}
.chat-otro {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.chat-otro .avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--naranja);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
}
.chat-otro img.avatar-sm {
  object-fit: cover;
}

.chat-mensajes {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.25rem;
  background: linear-gradient(180deg, #f7f7f8 0%, #ececef 100%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  scroll-behavior: smooth;
}
[data-theme="dark"] .chat-mensajes {
  background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
}

.chat-empty {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px dashed var(--naranja);
  border-radius: 12px;
  padding: 1rem;
  font-size: 0.9rem;
  text-align: center;
  color: var(--gris-texto);
  margin-bottom: 1rem;
}

/* === CHAT DARK MODE COMPLETO === */
[data-theme="dark"] .chat-page {
  background: #1a1a1a;
}
[data-theme="dark"] .chat-head {
  background: rgba(30, 30, 30, 0.85);
  border-bottom-color: rgba(255,255,255,0.08);
  color: #e8e8e8;
}
[data-theme="dark"] .chat-head strong,
[data-theme="dark"] .chat-head span {
  color: #ffffff;
}
[data-theme="dark"] .chat-mensajes {
  background: #1a1a1a;
}
[data-theme="dark"] .msg-otro .msg-bubble {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
}
[data-theme="dark"] .msg-mio .msg-bubble {
  background: var(--naranja);
  color: #ffffff;
}
[data-theme="dark"] .msg-meta {
  color: rgba(255,255,255,0.55);
}
[data-theme="dark"] .chat-input {
  background: #1e1e1e;
  border-top-color: rgba(255,255,255,0.10);
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}
[data-theme="dark"] .chat-input textarea {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #ffffff;
}
[data-theme="dark"] .chat-input textarea::placeholder {
  color: rgba(255,255,255,0.45);
}
[data-theme="dark"] .chat-input textarea:focus {
  border-color: var(--naranja);
  background: rgba(255,255,255,0.12);
}
[data-theme="dark"] .chat-empty {
  background: rgba(255, 255, 255, 0.05);
  color: #d4d4d4;
}

.msg {
  display: flex;
  flex-direction: column;
  max-width: 75%;
  animation: msgIn 0.3s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-mio {
  align-self: flex-end;
  align-items: flex-end;
}
.msg-otro {
  align-self: flex-start;
  align-items: flex-start;
}
.msg-bubble {
  padding: 0.65rem 0.95rem;
  border-radius: 18px;
  font-size: 0.93rem;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.msg-mio .msg-bubble {
  background: linear-gradient(135deg, var(--naranja) 0%, #e0581f 100%);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 6px rgba(242, 104, 34, 0.25);
}
.msg-otro .msg-bubble {
  background: #fff;
  color: var(--oscuro);
  border-bottom-left-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .msg-otro .msg-bubble {
  background: #2a2a2a;
  color: #f1f1f1;
}
.msg-meta {
  font-size: 0.7rem;
  color: var(--gris-texto);
  margin: 0.15rem 0.5rem 0;
  opacity: 0.8;
}

.chat-input {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card, #fff);
  border-top: 1px solid var(--gris-borde, #e5e5e5);
  position: sticky;
  bottom: 0;
  align-items: flex-end;
}
.chat-input textarea {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gris-borde, #e5e5e5);
  border-radius: 24px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: none;
  max-height: 120px;
  background: var(--bg-input, #fff);
  color: var(--oscuro);
  transition: border-color 0.2s;
}
.chat-input textarea:focus {
  outline: none;
  border-color: var(--naranja);
}
.chat-input button {
  border-radius: 50%;
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--naranja);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.chat-input button:hover { background: #e0581f; transform: scale(1.05); }
.chat-input button:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-input button svg { width: 22px; height: 22px; }

@media (max-width: 768px) {
  .chat-container { height: calc(100vh - 64px - 80px); }
  .chat-head { padding: 0.75rem 1rem; }
  .chat-producto strong { max-width: 140px; }
  .chat-mensajes { padding: 1rem 0.75rem; }
  .msg { max-width: 85%; }
}

/* --- Lista de conversaciones --- */
.chat-page h1 {
  padding: 1.5rem 1.25rem 0.5rem;
  margin: 0;
}
.chat-lista {
  display: flex;
  flex-direction: column;
}
.chat-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--gris-borde, #e5e5e5);
  transition: background 0.15s;
  position: relative;
}
.chat-item:hover { background: var(--gris-bg, #f7f7f7); }
.chat-item.no-leido { background: rgba(242, 104, 34, 0.04); }
[data-theme="dark"] .chat-item.no-leido { background: rgba(242, 104, 34, 0.08); }
.chat-item-img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gris-bg, #f1f1f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.chat-item-info { flex: 1; min-width: 0; }
.chat-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}
.chat-item-head strong { font-size: 0.95rem; }
.badge-no-leidos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--naranja);
  color: #fff;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.chat-item-producto {
  display: block;
  font-size: 0.78rem;
  color: var(--gris-texto);
  margin-bottom: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-item-msg {
  font-size: 0.85rem;
  color: var(--gris-texto);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-item.no-leido .chat-item-msg { color: var(--oscuro); font-weight: 600; }

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  max-width: 480px;
  margin: 2rem auto;
}
.empty-emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
}
.empty-state h2 { font-size: 1.5rem; margin: 0 0 0.5rem; }
.empty-state p { color: var(--gris-texto); margin: 0 0 1.5rem; }

/* --- Back btn glass en páginas de chat/pago/compras --- */
.back-btn-glass {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--oscuro);
  text-decoration: none;
  z-index: 5;
  transition: background 0.2s, transform 0.2s;
}
.back-btn-glass:hover { background: rgba(255, 255, 255, 0.85); transform: translateX(-3px); }
[data-theme="dark"] .back-btn-glass {
  background: rgba(30, 30, 30, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}
[data-theme="dark"] .back-btn-glass:hover { background: rgba(30, 30, 30, 0.85); }


/* =====================================================
   SECCIÓN DE PREGUNTAS PÚBLICAS (estilo MercadoLibre)
   ===================================================== */
.preguntas-section {
  max-width: 700px;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
}
.preguntas-titulo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--oscuro);
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}
.preguntas-subtitulo {
  font-size: 0.95rem;
  color: var(--gris-texto);
  margin: 0 0 1.5rem;
  line-height: 1.4;
}

.pregunta-form {
  background: var(--bg-card, #fff);
  border: 1px solid var(--gris-borde, #e5e5e5);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pregunta-form:focus-within {
  border-color: var(--naranja);
  box-shadow: 0 0 0 3px rgba(242, 104, 34, 0.12);
}
.pregunta-form textarea {
  width: 100%;
  border: none;
  resize: vertical;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--oscuro);
  background: transparent;
  outline: none;
  min-height: 70px;
}
.pregunta-form textarea::placeholder {
  color: var(--gris-texto);
  opacity: 0.8;
}
.pregunta-form-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.pregunta-aviso {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--gris-texto);
  flex: 1;
  min-width: 200px;
}
.aviso-icono {
  font-size: 0.9rem;
}
.pregunta-btn {
  flex-shrink: 0;
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
}

.preguntas-login-msg,
.preguntas-vendedor-msg {
  background: var(--bg-card, #fff);
  border: 1px dashed var(--gris-borde, #e5e5e5);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--gris-texto);
}
.preguntas-login-msg p,
.preguntas-vendedor-msg p { margin: 0; }
.preguntas-vendedor-msg { background: rgba(242, 104, 34, 0.04); border-color: var(--naranja); }

.preguntas-lista {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pregunta-item {
  background: var(--bg-card, #fff);
  border: 1px solid var(--gris-borde, #e5e5e5);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  transition: box-shadow 0.2s;
}
.pregunta-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.pregunta-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.pregunta-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gris-bg, #e5e5e5);
  color: var(--gris-texto);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  object-fit: cover;
}
.pregunta-info { display: flex; flex-direction: column; gap: 0.1rem; }
.pregunta-autor {
  font-size: 0.92rem;
  color: var(--oscuro);
}
.pregunta-fecha {
  font-size: 0.78rem;
  color: var(--gris-texto);
}
.pregunta-contenido {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--oscuro);
  margin: 0.5rem 0 0;
  word-wrap: break-word;
}

.pregunta-respuesta {
  margin-top: 0.85rem;
  background: rgba(242, 104, 34, 0.05);
  border-left: 3px solid var(--naranja);
  border-radius: 0 10px 10px 0;
  padding: 0.85rem 1rem;
}
.respuesta-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.respuesta-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  background: var(--naranja);
  color: #fff;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.respuesta-fecha {
  font-size: 0.75rem;
  color: var(--gris-texto);
}
.respuesta-contenido {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--oscuro);
  margin: 0;
  word-wrap: break-word;
}

.pregunta-sin-respuesta {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--gris-texto);
  font-style: italic;
}

.respuesta-form {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.respuesta-form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--gris-borde, #e5e5e5);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
.respuesta-form textarea:focus { border-color: var(--naranja); }
.respuesta-form button {
  align-self: flex-end;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

.preguntas-empty {
  background: var(--bg-card, #fff);
  border: 1px dashed var(--gris-borde, #e5e5e5);
  border-radius: 14px;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--gris-texto);
}
.preguntas-empty p { margin: 0; font-size: 0.95rem; }

/* Modal de bloqueo (cuando se detecta info de contacto) */
.modal-bloqueo-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-bloqueo {
  background: #fff;
  border-radius: 18px;
  padding: 1.75rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-bloqueo h3 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  color: var(--oscuro);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.modal-bloqueo p {
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--gris-texto);
  margin: 0 0 1rem;
}
.modal-bloqueo p strong { color: var(--oscuro); }
.modal-bloqueo-datos {
  background: #fff5f0;
  border-left: 3px solid var(--naranja);
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--oscuro);
}
.modal-bloqueo-datos strong { display: block; margin-bottom: 0.3rem; }
.modal-bloqueo-acciones {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.modal-bloqueo-acciones button {
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
}
.btn-modal-primario { background: var(--naranja); color: #fff; }
.btn-modal-secundario { background: var(--gris-bg, #f1f1f1); color: var(--oscuro); }

@media (max-width: 768px) {
  .preguntas-section { padding: 0 1rem; }
  .pregunta-form-meta { flex-direction: column; align-items: stretch; }
  .pregunta-btn { width: 100%; }
}


/* =====================================================
   BOTÓN DE LOGOUT (header, mobile-menu, panel)
   ===================================================== */
.nav-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  color: var(--oscuro);
  transition: background 0.2s, color 0.2s, transform 0.2s;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logout:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  transform: scale(1.05);
}
.nav-logout svg {
  width: 20px;
  height: 20px;
}
[data-theme="dark"] .nav-logout { color: #f1f1f1; }
[data-theme="dark"] .nav-logout:hover { background: rgba(220, 53, 69, 0.2); }

.btn-logout-mobile {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem !important;
  background: rgba(220, 53, 69, 0.08) !important;
  color: #dc3545 !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  border: 1px solid rgba(220, 53, 69, 0.2);
  text-decoration: none;
  transition: all 0.2s;
}
.btn-logout-mobile:hover {
  background: rgba(220, 53, 69, 0.15) !important;
  color: #c82333 !important;
}
.btn-logout-mobile svg {
  width: 20px;
  height: 20px;
}

.btn-logout-panel {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-head-acciones {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.panel-head-acciones .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-height: 48px;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  flex: 1 1 auto;
  text-align: center;
}

@media (max-width: 768px) {
  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }
  .panel-head-acciones {
    width: 100%;
    flex-direction: column;
    gap: 0.6rem;
  }
  .panel-head-acciones .btn {
    width: 100%;
    flex: 0 0 auto;
  }
}
@media (min-width: 769px) {
  .panel-head-acciones .btn {
    flex: 0 0 auto;
  }
  .btn-logout-panel {
    background: #fff !important;
    color: #dc3545 !important;
    border: 1px solid #dc3545 !important;
  }
  .btn-logout-panel:hover {
    background: #dc3545 !important;
    color: #fff !important;
  }
}

/* =====================================================
   MOBILE MENU: HEADER CON AVATAR DEL USUARIO
   ===================================================== */
.mobile-menu-user {
  display: flex !important;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem !important;
  background: linear-gradient(135deg, rgba(242, 104, 34, 0.08) 0%, rgba(242, 104, 34, 0.02) 100%);
  border-radius: 14px !important;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(242, 104, 34, 0.15);
  text-decoration: none !important;
  color: var(--oscuro) !important;
  transition: background 0.2s, transform 0.2s;
}
.mobile-menu-user:hover {
  background: linear-gradient(135deg, rgba(242, 104, 34, 0.15) 0%, rgba(242, 104, 34, 0.05) 100%) !important;
  transform: translateX(2px);
}
.mobile-menu-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--naranja);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid var(--blanco);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.mobile-menu-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}
.mobile-menu-user-info strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--oscuro);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.mobile-menu-user-info small {
  font-size: 0.78rem;
  color: var(--gris-texto);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

[data-theme="dark"] .mobile-menu-user {
  background: linear-gradient(135deg, rgba(242, 104, 34, 0.15) 0%, rgba(242, 104, 34, 0.05) 100%);
  border-color: rgba(242, 104, 34, 0.25);
}
[data-theme="dark"] .mobile-menu-user-info strong { color: #f1f1f1; }
[data-theme="dark"] .mobile-menu-user-info small { color: #a0a0a0; }



/* =====================================================
   DARK MODE - PREGUNTAS Y CONSULTAS
   ===================================================== */
[data-theme="dark"] .preguntas-section .preguntas-titulo,
[data-theme="dark"] .preguntas-section .preguntas-subtitulo {
  color: #ffffff;
}
[data-theme="dark"] .pregunta-form {
  background: #1e1e1e;
  border-color: rgba(255,255,255,0.15);
}
[data-theme="dark"] .pregunta-form textarea {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  border-color: rgba(255,255,255,0.15);
}
[data-theme="dark"] .pregunta-form textarea::placeholder {
  color: rgba(255,255,255,0.45);
}
[data-theme="dark"] .pregunta-form:focus-within {
  border-color: var(--naranja);
}
[data-theme="dark"] .pregunta-aviso {
  background: rgba(242, 104, 34, 0.10);
  color: rgba(255,255,255,0.85);
}
[data-theme="dark"] .preguntas-login-msg,
[data-theme="dark"] .preguntas-vendedor-msg {
  background: rgba(255,255,255,0.06);
  color: #e8e8e8;
  border-color: rgba(255,255,255,0.15);
}
[data-theme="dark"] .preguntas-vendedor-msg {
  background: rgba(242, 104, 34, 0.10);
}
[data-theme="dark"] .pregunta-item {
  background: #1e1e1e !important;
  border-color: rgba(255,255,255,0.15);
}
[data-theme="dark"] .pregunta-item strong,
[data-theme="dark"] .pregunta-item .pregunta-texto {
  color: #ffffff;
}
[data-theme="dark"] .pregunta-item .pregunta-meta {
  color: rgba(255,255,255,0.55);
}
[data-theme="dark"] .pregunta-respuesta {
  background: rgba(255,255,255,0.06);
  border-left-color: var(--naranja);
  color: #e8e8e8;
}
[data-theme="dark"] .pregunta-autor-nombre {
  color: #ffffff !important;
}

/* =====================================================
   DARK MODE - ACERCA DE NOSOTROS / ECO-SECTION
   ===================================================== */
[data-theme="dark"] .eco-section h2,
[data-theme="dark"] .eco-section h3,
[data-theme="dark"] .eco-section p,
[data-theme="dark"] .eco-section strong {
  color: #ffffff;
}
[data-theme="dark"] .eco-section a {
  color: var(--naranja);
}
[data-theme="dark"] .cta-final {
  background: #1e1e1e;
  color: #ffffff;
}
[data-theme="dark"] .cta-final h2,
[data-theme="dark"] .cta-final p {
  color: #ffffff;
}

/* =====================================================
   DARK MODE - FOOTER
   ===================================================== */
[data-theme="dark"] footer {
  background: #0f0f0f;
  color: #e8e8e8;
  border-top: 1px solid rgba(255,255,255,0.08);
}
[data-theme="dark"] footer h4 {
  color: #ffffff;
}
[data-theme="dark"] footer a {
  color: rgba(255,255,255,0.7);
}
[data-theme="dark"] footer a:hover {
  color: var(--naranja);
}
[data-theme="dark"] .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.55);
}

/* =====================================================
   DARK MODE COMPLETO - ACERCA DE NOSOTROS
   ===================================================== */
[data-theme="dark"] .about-hero {
  background: linear-gradient(135deg, rgba(242, 104, 34, 0.18) 0%, rgba(0,0,0,0) 100%);
}
[data-theme="dark"] .about-hero::before {
  opacity: 0.5;
}
[data-theme="dark"] .about-title,
[data-theme="dark"] .about-title-accent {
  color: #ffffff !important;
}
[data-theme="dark"] .about-title-accent {
  color: var(--naranja) !important;
}
[data-theme="dark"] .about-lead {
  color: rgba(255,255,255,0.85) !important;
}
[data-theme="dark"] .about-lead strong {
  color: var(--naranja);
}
[data-theme="dark"] .about-story {
  background: transparent;
}
[data-theme="dark"] .about-block-num {
  color: rgba(242, 104, 34, 0.40) !important;
}
[data-theme="dark"] .about-block-text p {
  color: rgba(255,255,255,0.85) !important;
}
[data-theme="dark"] .about-block-text strong {
  color: #ffffff !important;
}
[data-theme="dark"] .about-quote {
  color: rgba(255,255,255,0.95) !important;
  border-left-color: var(--naranja);
}
[data-theme="dark"] .about-quote em {
  color: var(--naranja);
}
[data-theme="dark"] .about-link {
  color: var(--naranja);
}
[data-theme="dark"] .about-values {
  background: #1a1a1a;
}
[data-theme="dark"] .about-values h2,
[data-theme="dark"] .about-values-eyebrow {
  color: #ffffff;
}
[data-theme="dark"] .about-values-lead {
  color: rgba(255,255,255,0.75);
}
[data-theme="dark"] .about-value {
  background: #1e1e1e !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: #ffffff;
}
[data-theme="dark"] .about-value h3 {
  color: #ffffff;
}
[data-theme="dark"] .about-value p {
  color: rgba(255,255,255,0.75);
}
[data-theme="dark"] .about-hero-shape {
  opacity: 0.2;
}

/* =====================================================
   ADMIN DASHBOARD (Fase 3.1)
   ===================================================== */
.admin-dashboard {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.dashboard-header {
  margin-bottom: 2rem;
  text-align: left;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 1.8rem;
  color: var(--negro, #1F2937);
}

.dashboard-subtitle {
  margin: 0.25rem 0;
  color: var(--gris-texto, #6B7280);
  font-size: 0.95rem;
}

.dashboard-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--gris-texto, #6B7280);
}

.auto-refresh-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(242, 104, 34, 0.1);
  color: var(--naranja, #F26822);
  border-radius: 4px;
  font-size: 0.8rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #F26822;
  transition: transform 0.15s;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kpi-card.kpi-success { border-left-color: #10B981; }
.kpi-card.kpi-info { border-left-color: #3B82F6; }
.kpi-card.kpi-warning { border-left-color: #F59E0B; }
.kpi-card.kpi-danger { border-left-color: #EF4444; }
.kpi-card.kpi-secondary { border-left-color: #8B5CF6; }

.kpi-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.kpi-info { flex: 1; }
.kpi-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1F2937;
  line-height: 1.1;
}
.kpi-label {
  font-size: 0.85rem;
  color: #6B7280;
  margin-top: 0.25rem;
}
.kpi-trend {
  font-size: 0.75rem;
  color: #10B981;
  margin-top: 0.25rem;
  font-weight: 500;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .charts-grid {
    grid-template-columns: 1fr 1fr;
  }
  .chart-card:first-child {
    grid-column: 1 / -1;
  }
}

.chart-card {
  background: #fff;
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-card h2 {
  font-size: 1rem;
  margin: 0 0 1rem 0;
  color: #1F2937;
}

.tables-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .tables-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.table-card {
  background: #fff;
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.table-card h2 {
  font-size: 1rem;
  margin: 0 0 1rem 0;
  color: #1F2937;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.dashboard-table th {
  text-align: left;
  padding: 0.5rem;
  background: #F9FAFB;
  color: #6B7280;
  font-weight: 600;
  border-bottom: 2px solid #E5E7EB;
}

.dashboard-table td {
  padding: 0.5rem;
  border-bottom: 1px solid #F3F4F6;
  color: #1F2937;
}

.dashboard-table tr:hover td {
  background: #F9FAFB;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-admin { background: #FEF3C7; color: #92400E; }
.badge-user { background: #DBEAFE; color: #1E40AF; }
.badge-activo { background: #D1FAE5; color: #065F46; }
.badge-pausado { background: #FEF3C7; color: #92400E; }
.badge-vendido { background: #E5E7EB; color: #374151; }
.badge-eliminado { background: #FEE2E2; color: #991B1B; }

/* Dark mode para el dashboard */
[data-theme="dark"] .admin-dashboard .kpi-card,
[data-theme="dark"] .admin-dashboard .chart-card,
[data-theme="dark"] .admin-dashboard .table-card {
  background: #1F2937;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .admin-dashboard .dashboard-header h1,
[data-theme="dark"] .admin-dashboard .chart-card h2,
[data-theme="dark"] .admin-dashboard .table-card h2,
[data-theme="dark"] .admin-dashboard .kpi-value,
[data-theme="dark"] .admin-dashboard .dashboard-table td {
  color: #F3F4F6;
}

[data-theme="dark"] .admin-dashboard .dashboard-subtitle,
[data-theme="dark"] .admin-dashboard .kpi-label,
[data-theme="dark"] .admin-dashboard .dashboard-meta,
[data-theme="dark"] .admin-dashboard .dashboard-table th {
  color: #9CA3AF;
}

[data-theme="dark"] .admin-dashboard .dashboard-table th {
  background: #374151;
  border-bottom-color: #4B5563;
}

[data-theme="dark"] .admin-dashboard .dashboard-table td {
  border-bottom-color: #374151;
}

[data-theme="dark"] .admin-dashboard .dashboard-table tr:hover td {
  background: #374151;
}

[data-theme="dark"] .admin-dashboard .badge-admin { background: #78350F; color: #FCD34D; }
[data-theme="dark"] .admin-dashboard .badge-user { background: #1E3A8A; color: #BFDBFE; }
[data-theme="dark"] .admin-dashboard .badge-activo { background: #064E3B; color: #A7F3D0; }
[data-theme="dark"] .admin-dashboard .badge-pausado { background: #78350F; color: #FCD34D; }
[data-theme="dark"] .admin-dashboard .badge-vendido { background: #374151; color: #D1D5DB; }
[data-theme="dark"] .admin-dashboard .badge-eliminado { background: #7F1D1D; color: #FCA5A5; }

/* =====================================================
   ADMIN DASHBOARD LINK BUTTON (Mini-fase A)
   ===================================================== */
.dashboard-cta {
  margin: 1.5rem 0;
}

.btn-dashboard {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #F26822 0%, #FF8B4A 100%);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(242, 104, 34, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-dashboard:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(242, 104, 34, 0.4);
  color: white;
}

.btn-dashboard .btn-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.btn-dashboard .btn-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.btn-dashboard .btn-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-dashboard .btn-subtitle {
  font-size: 0.85rem;
  opacity: 0.95;
}

.btn-dashboard .btn-arrow {
  font-size: 1.5rem;
  font-weight: 700;
}

.tab-dashboard {
  background: rgba(242, 104, 34, 0.1);
  color: #F26822 !important;
  font-weight: 600;
}

.tab-dashboard:hover {
  background: rgba(242, 104, 34, 0.2);
}

[data-theme="dark"] .tab-dashboard {
  background: rgba(242, 104, 34, 0.2);
  color: #FFA875 !important;
}

[data-theme="dark"] .btn-dashboard {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Admin link en header (Mini-fase A) */
.nav-link-admin {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  color: #F26822 !important;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  background: rgba(242, 104, 34, 0.08);
}

.nav-link-admin:hover {
  background: rgba(242, 104, 34, 0.18);
}

[data-theme="dark"] .nav-link-admin {
  color: #FFA875 !important;
  background: rgba(242, 104, 34, 0.15);
}

.mobile-menu-admin {
  background: rgba(242, 104, 34, 0.1);
  color: #F26822 !important;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0.25rem 0;
}

/* Admin link en header (Mini-fase A) */
.nav-link-admin {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  color: #F26822 !important;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  background: rgba(242, 104, 34, 0.08);
}

.nav-link-admin:hover {
  background: rgba(242, 104, 34, 0.18);
}

[data-theme="dark"] .nav-link-admin {
  color: #FFA875 !important;
  background: rgba(242, 104, 34, 0.15);
}

.mobile-menu-admin {
  background: rgba(242, 104, 34, 0.1);
  color: #F26822 !important;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0.25rem 0;
}

/* Filtros de dashboard (Mini-fase B) */
.dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.filter-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1F2937;
  margin-right: 0.5rem;
}

.filter-btn {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: #F3F4F6;
  color: #4B5563;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s;
}

.filter-btn:hover {
  background: #E5E7EB;
  color: #1F2937;
}

.filter-btn-active {
  background: #F26822 !important;
  color: white !important;
}

[data-theme="dark"] .dashboard-filters {
  background: #1F2937;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .filter-label {
  color: #F3F4F6;
}

[data-theme="dark"] .filter-btn {
  background: #374151;
  color: #D1D5DB;
}

[data-theme="dark"] .filter-btn:hover {
  background: #4B5563;
  color: #F3F4F6;
}

[data-theme="dark"] .filter-btn-active {
  background: #F26822 !important;
  color: white !important;
}

.empty-row {
  text-align: center;
  color: #9CA3AF;
  font-style: italic;
  padding: 2rem !important;
}

/* =====================================================
   ADMIN DASHBOARD - Filtros, paginación, modal (Fase 3)
   ===================================================== */

.table-card-full {
  margin-top: 1.5rem;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.table-header h2 {
  margin: 0;
  font-size: 1.1rem;
  color: #1F2937;
}

.table-page-info {
  font-size: 0.85rem;
  color: #6B7280;
  font-weight: 500;
}

.table-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #F9FAFB;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}

@media (max-width: 900px) {
  .table-filters {
    grid-template-columns: 1fr 1fr;
  }
  .filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 500px) {
  .table-filters {
    grid-template-columns: 1fr;
  }
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group input,
.filter-group select {
  padding: 0.5rem 0.7rem;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
  color: #1F2937;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.filter-group input:focus,
.filter-group select:focus {
  border-color: #F26822;
  box-shadow: 0 0 0 3px rgba(242, 104, 34, 0.1);
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-apply {
  padding: 0.5rem 1.2rem;
  background: #F26822;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: background 0.15s;
}

.btn-apply:hover {
  background: #DA5A1A;
}

.btn-clear {
  padding: 0.5rem 1.2rem;
  background: #fff;
  color: #6B7280;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: all 0.15s;
}

.btn-clear:hover {
  background: #F3F4F6;
  color: #1F2937;
}

.table-wrapper {
  overflow-x: auto;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding: 0.75rem;
  background: #F9FAFB;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}

.page-btn {
  padding: 0.4rem 0.9rem;
  background: #fff;
  color: #F26822;
  border: 1px solid #F26822;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}

.page-btn:hover {
  background: #F26822;
  color: white;
}

.page-btn-disabled {
  color: #9CA3AF;
  border-color: #E5E7EB;
  cursor: not-allowed;
  background: #F9FAFB;
}

.page-info {
  font-size: 0.85rem;
  color: #6B7280;
  font-weight: 500;
}

.btn-action {
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s;
}

.btn-action:hover {
  background: #F26822;
  border-color: #F26822;
}

/* Modal */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] { display: none; }

.modal-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: #6B7280;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  transition: all 0.15s;
}

.modal-close:hover {
  background: #F3F4F6;
  color: #1F2937;
}

.modal-content h2 {
  margin: 0 0 1rem 0;
  color: #1F2937;
  font-size: 1.25rem;
  padding-right: 2rem;
}

.detail-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: #F9FAFB;
  border-radius: 6px;
  font-size: 0.9rem;
  gap: 1rem;
}

.detail-row strong {
  color: #6B7280;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.detail-row span {
  color: #1F2937;
  text-align: right;
  word-break: break-word;
}

.detail-actions {
  margin-top: 1rem;
  text-align: right;
}

/* Dark mode */
[data-theme="dark"] .table-header h2,
[data-theme="dark"] .modal-content h2,
[data-theme="dark"] .detail-row span {
  color: #F3F4F6;
}

[data-theme="dark"] .table-filters,
[data-theme="dark"] .pagination {
  background: #374151;
  border-color: #4B5563;
}

[data-theme="dark"] .table-page-info,
[data-theme="dark"] .page-info,
[data-theme="dark"] .filter-group label,
[data-theme="dark"] .detail-row strong {
  color: #9CA3AF;
}

[data-theme="dark"] .filter-group input,
[data-theme="dark"] .filter-group select {
  background: #1F2937;
  border-color: #4B5563;
  color: #F3F4F6;
}

[data-theme="dark"] .filter-group input:focus,
[data-theme="dark"] .filter-group select:focus {
  border-color: #F26822;
}

[data-theme="dark"] .btn-clear {
  background: #374151;
  border-color: #4B5563;
  color: #D1D5DB;
}

[data-theme="dark"] .btn-clear:hover {
  background: #4B5563;
  color: #F3F4F6;
}

[data-theme="dark"] .page-btn {
  background: #1F2937;
}

[data-theme="dark"] .page-btn-disabled {
  background: #1F2937;
  color: #4B5563;
  border-color: #374151;
}

[data-theme="dark"] .detail-row {
  background: #374151;
}

[data-theme="dark"] .modal-content {
  background: #1F2937;
  color: #F3F4F6;
}

[data-theme="dark"] .modal-close {
  color: #9CA3AF;
}

[data-theme="dark"] .modal-close:hover {
  background: #374151;
  color: #F3F4F6;
}

[data-theme="dark"] .btn-action {
  background: #374151;
  border-color: #4B5563;
}

/* =====================================================
   ADMIN DASHBOARD - Análisis de Mercado y Rotación
   ===================================================== */

.market-section {
  margin-top: 2rem;
}

.section-header {
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
  color: #1F2937;
  font-size: 1.2rem;
}

.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-subtitle {
  display: block;
  color: #6B7280;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.market-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 900px) {
  .market-grid { grid-template-columns: 1fr; }
}

.market-card {
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.market-card-icon { font-size: 2rem; flex-shrink: 0; }
.market-card-body { flex: 1; }

.market-card-label {
  font-size: 0.8rem;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.market-card-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1F2937;
  margin: 0.4rem 0;
  line-height: 1.1;
}

.market-ticket {
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
  border-color: #FDBA74;
}

.market-ticket .market-card-value { color: #9A3412; }

.market-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: #6B7280;
}

.price-ranges { display: flex; flex-direction: column; gap: 0.6rem; }
.price-range { display: flex; flex-direction: column; gap: 0.25rem; }
.price-range-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #4B5563;
}
.price-range-label strong { color: #1F2937; }
.price-range-bar {
  width: 100%;
  height: 8px;
  background: #F3F4F6;
  border-radius: 4px;
  overflow: hidden;
}
.price-range-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #F26822, #FFA875);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.charts-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .charts-grid-2 { grid-template-columns: 1fr; }
}

.vendor-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.vendor-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem;
  background: #F9FAFB;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}

.vendor-rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #E5E7EB;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.vendor-rank.rank-1 { background: #FCD34D; color: #78350F; }
.vendor-rank.rank-2 { background: #D1D5DB; color: #374151; }
.vendor-rank.rank-3 { background: #FDBA74; color: #7C2D12; }

.vendor-info { flex: 1; min-width: 0; }

.vendor-name {
  font-weight: 600;
  color: #1F2937;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vendor-meta {
  font-size: 0.75rem;
  color: #6B7280;
}

.vendor-ticket {
  font-size: 1.1rem;
  font-weight: 700;
  color: #10B981;
  flex-shrink: 0;
}

.rot-filter-form { display: flex; gap: 0.5rem; }

.rot-filter-toggle {
  display: inline-flex;
  background: #F3F4F6;
  border-radius: 8px;
  padding: 4px;
  border: 1px solid #E5E7EB;
}

.rot-filter-btn {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  color: #6B7280;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s;
  font-weight: 500;
}

.rot-filter-btn:hover { color: #1F2937; }

.rot-filter-active {
  background: #F26822;
  color: white !important;
  box-shadow: 0 1px 3px rgba(242,104,34,0.3);
}

.rotation-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

@media (max-width: 900px) {
  .rotation-grid { grid-template-columns: 1fr; }
}

.rotation-card {
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.rotation-alta { border-top: 3px solid #EF4444; }
.rotation-baja { border-top: 3px solid #3B82F6; }

.rotation-header {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #F3F4F6;
}

.rotation-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #1F2937;
}

.rotation-subtitle {
  font-size: 0.75rem;
  color: #6B7280;
}

.rotation-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 500px;
  overflow-y: auto;
}

.rotation-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem;
  background: #FAFAFA;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.rotation-item:hover {
  background: #F3F4F6;
  border-color: #E5E7EB;
}

.rotation-rank {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.rank-alta { background: #FEE2E2; color: #B91C1C; }
.rank-baja { background: #DBEAFE; color: #1E40AF; }

.rotation-info {
  flex: 1;
  min-width: 0;
}

.rotation-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1F2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rotation-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: #6B7280;
  margin-top: 2px;
}

.rotation-cat { font-weight: 500; }

.rotation-velocity {
  text-align: right;
  flex-shrink: 0;
  min-width: 60px;
}

.velocity-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1F2937;
  line-height: 1;
}

.velocity-label {
  font-size: 0.65rem;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .market-card {
  background: #1F2937;
  border-color: #374151;
}

[data-theme="dark"] .section-header h2,
[data-theme="dark"] .market-card-value,
[data-theme="dark"] .rotation-header h3,
[data-theme="dark"] .vendor-name,
[data-theme="dark"] .rotation-title,
[data-theme="dark"] .velocity-num {
  color: #F3F4F6;
}

[data-theme="dark"] .market-card-label,
[data-theme="dark"] .section-subtitle,
[data-theme="dark"] .rotation-subtitle,
[data-theme="dark"] .vendor-meta,
[data-theme="dark"] .rotation-meta,
[data-theme="dark"] .velocity-label {
  color: #9CA3AF;
}

[data-theme="dark"] .market-ticket {
  background: linear-gradient(135deg, #7C2D12 0%, #9A3412 100%);
  border-color: #C2410C;
}

[data-theme="dark"] .market-ticket .market-card-value { color: #FED7AA; }

[data-theme="dark"] .market-card-meta { color: #D1D5DB; }
[data-theme="dark"] .price-range-bar { background: #374151; }
[data-theme="dark"] .price-range-label { color: #D1D5DB; }
[data-theme="dark"] .price-range-label strong { color: #F3F4F6; }
[data-theme="dark"] .vendor-item { background: #374151; border-color: #4B5563; }
[data-theme="dark"] .vendor-rank { background: #4B5563; color: #D1D5DB; }
[data-theme="dark"] .rot-filter-toggle { background: #374151; border-color: #4B5563; }
[data-theme="dark"] .rot-filter-btn { color: #9CA3AF; }
[data-theme="dark"] .rot-filter-btn:hover { color: #F3F4F6; }
[data-theme="dark"] .rotation-card { background: #1F2937; border-color: #374151; }
[data-theme="dark"] .rotation-header { border-color: #374151; }
[data-theme="dark"] .rotation-item { background: #374151; }
[data-theme="dark"] .rotation-item:hover { background: #4B5563; }
[data-theme="dark"] .rank-alta { background: #7F1D1D; color: #FECACA; }
[data-theme="dark"] .rank-baja { background: #1E3A8A; color: #BFDBFE; }
[data-theme="dark"] .vendor-ticket { color: #6EE7B7; }

/* =====================================================
   ADMIN DASHBOARD - Minifase F (Alertas, Embudo, Heatmap)
   ===================================================== */

/* Badges en KPIs (comparación con período anterior) */
.kpi-badge {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.kpi-badge-up { background: #D1FAE5; color: #065F46; }
.kpi-badge-down { background: #FEE2E2; color: #991B1B; }
.kpi-badge-same { background: #E5E7EB; color: #6B7280; }
.kpi-badge-new { background: #FEF3C7; color: #92400E; }

[data-theme="dark"] .kpi-badge-up { background: #064E3B; color: #6EE7B7; }
[data-theme="dark"] .kpi-badge-down { background: #7F1D1D; color: #FCA5A5; }
[data-theme="dark"] .kpi-badge-same { background: #374151; color: #9CA3AF; }
[data-theme="dark"] .kpi-badge-new { background: #78350F; color: #FED7AA; }

/* ALERTAS */
.alerts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.alert-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid;
  text-decoration: none;
  background: white;
  transition: transform 0.15s, box-shadow 0.15s;
}

.alert-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.alert-warning { background: #FEF3C7; border-color: #FCD34D; }
.alert-info { background: #DBEAFE; border-color: #93C5FD; }
.alert-quality { background: #FED7AA; border-color: #FDBA74; }
.alert-location { background: #E0E7FF; border-color: #A5B4FC; }
.alert-message { background: #FCE7F3; border-color: #F9A8D4; }

.alert-icon { font-size: 1.8rem; flex-shrink: 0; }
.alert-body { flex: 1; min-width: 0; }
.alert-count { font-size: 1.6rem; font-weight: 700; color: #1F2937; line-height: 1.1; }
.alert-label { font-size: 0.85rem; font-weight: 600; color: #374151; margin-top: 2px; }
.alert-desc { font-size: 0.7rem; color: #6B7280; margin-top: 2px; }

[data-theme="dark"] .alert-card { background: #1F2937; }
[data-theme="dark"] .alert-warning { background: #78350F; border-color: #B45309; }
[data-theme="dark"] .alert-info { background: #1E3A8A; border-color: #1D4ED8; }
[data-theme="dark"] .alert-quality { background: #7C2D12; border-color: #C2410C; }
[data-theme="dark"] .alert-location { background: #312E81; border-color: #4338CA; }
[data-theme="dark"] .alert-message { background: #831843; border-color: #BE185D; }
[data-theme="dark"] .alert-count { color: #F3F4F6; }
[data-theme="dark"] .alert-label { color: #E5E7EB; }
[data-theme="dark"] .alert-desc { color: #9CA3AF; }

/* EMBUDO + HEATMAP */
.funnel-heatmap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .funnel-heatmap-grid { grid-template-columns: 1fr; }
}

.funnel-card,
.heatmap-card {
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.funnel-card h3,
.heatmap-card h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  color: #1F2937;
}

/* Embudo (funnel) */
.funnel-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.funnel-step {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.funnel-step-label {
  font-size: 0.8rem;
  color: #6B7280;
  font-weight: 500;
}

.funnel-step-bar {
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 50px;
  transition: width 0.5s ease;
}

.funnel-step-1 { background: linear-gradient(90deg, #F26822, #FFA875); }
.funnel-step-2 { background: linear-gradient(90deg, #F59E0B, #FCD34D); }
.funnel-step-3 { background: linear-gradient(90deg, #3B82F6, #93C5FD); }
.funnel-step-4 { background: linear-gradient(90deg, #10B981, #6EE7B7); }

.funnel-summary {
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #F3F4F6;
}

.funnel-summary-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.funnel-summary-label {
  font-size: 0.7rem;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.funnel-summary-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1F2937;
}

/* Heatmap */
.heatmap-container {
  overflow-x: auto;
  margin-bottom: 0.75rem;
}

.heatmap-header,
.heatmap-row {
  display: flex;
  gap: 2px;
  min-width: 600px;
}

.heatmap-corner {
  width: 36px;
  flex-shrink: 0;
}

.heatmap-hour-label {
  flex: 1;
  text-align: center;
  font-size: 0.65rem;
  color: #6B7280;
  font-weight: 500;
  padding-bottom: 0.25rem;
}

.heatmap-row { margin-bottom: 2px; }

.heatmap-day-label {
  width: 36px;
  flex-shrink: 0;
  font-size: 0.7rem;
  color: #6B7280;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.heatmap-cell {
  flex: 1;
  height: 22px;
  border-radius: 3px;
  transition: transform 0.1s;
  cursor: pointer;
}

.heatmap-cell:hover {
  transform: scale(1.3);
  z-index: 10;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-content: flex-end;
  font-size: 0.7rem;
  color: #6B7280;
  margin-top: 0.5rem;
}

.heatmap-legend-cell {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

[data-theme="dark"] .funnel-card,
[data-theme="dark"] .heatmap-card {
  background: #1F2937;
  border-color: #374151;
}

[data-theme="dark"] .funnel-card h3,
[data-theme="dark"] .heatmap-card h3,
[data-theme="dark"] .funnel-summary-value {
  color: #F3F4F6;
}

[data-theme="dark"] .funnel-step-label,
[data-theme="dark"] .funnel-summary-label,
[data-theme="dark"] .heatmap-hour-label,
[data-theme="dark"] .heatmap-day-label,
[data-theme="dark"] .heatmap-legend {
  color: #9CA3AF;
}

[data-theme="dark"] .funnel-summary { border-color: #374151; }

/* =====================================================

/* =====================================================
   BOTÓN GENERAR PDF + @MEDIA PRINT (v2 - Limpio)
   ===================================================== */
.btn-print-pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  background: #1F2937;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: absolute;
  top: 0;
  right: 0;
}

.btn-print-pdf:hover {
  background: #374151;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.btn-print-pdf:active { transform: translateY(0); }

[data-theme="dark"] .btn-print-pdf { background: #F26822; }
[data-theme="dark"] .btn-print-pdf:hover { background: #DA5A1A; }

.dashboard-header { position: relative; padding-right: 160px; }

@media (max-width: 600px) {
  .dashboard-header { padding-right: 0; }
  .dashboard-header .btn-print-pdf {
    position: static;
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
  }
}

/* =====================================================
   @MEDIA PRINT - Versión limpia
   ===================================================== */
@media print {
  /* Quitar header/footer del navegador (Chrome las imprime como URL+fecha arriba) */
  @page {
    size: A4 portrait;
    margin: 1.2cm;
  }

  /* Ocultar todo lo que no es contenido del dashboard */
  body { background: white !important; color: #000 !important; }
  html, body { margin: 0 !important; padding: 0 !important; }

  .site-header,
  .bnav,
  .site-footer,
  .no-print,
  .modal,
  .modal-overlay { display: none !important; }

  .admin-dashboard { padding: 0 !important; margin: 0 !important; max-width: 100% !important; }

  /* Header del dashboard */
  .dashboard-header {
    border-bottom: 2px solid #000;
    padding: 0 0 0.8rem 0 !important;
    margin: 0 0 1.5rem 0 !important;
    page-break-after: avoid;
    position: relative !important;
    text-align: center !important;
  }
  .dashboard-header h1 {
    color: #000 !important;
    font-size: 1.8rem !important;
    margin: 0 0 0.3rem 0 !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    width: 100% !important;
  }
  .dashboard-subtitle {
    color: #333 !important;
    font-size: 0.85rem !important;
    margin: 0.1rem 0 !important;
    line-height: 1.3 !important;
    text-align: center !important;
    width: 100% !important;
  }
  .dashboard-meta {
    color: #555 !important;
    font-size: 0.7rem !important;
    margin: 0.3rem 0 0 0 !important;
    line-height: 1.4 !important;
    text-align: center !important;
    width: 100% !important;
  }
  .dashboard-meta span { display: inline-block; margin: 0 0.4rem; }

  /* KPI grid: vertical, sin amontonamiento */
  .kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
    margin-bottom: 1rem !important;
  }

  .kpi-card {
    box-shadow: none !important;
    background: white !important;
    border: 1px solid #999 !important;
    padding: 0.6rem !important;
    flex-direction: column !important;
    text-align: center !important;
    page-break-inside: avoid;
  }

  .kpi-icon { font-size: 1.2rem !important; margin-bottom: 0.2rem; }

  .kpi-info { width: 100% !important; }

  .kpi-value {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #000 !important;
    line-height: 1.1 !important;
    margin-bottom: 0.1rem;
  }

  .kpi-label {
    font-size: 0.7rem !important;
    color: #333 !important;
    line-height: 1.2;
    margin-bottom: 0.2rem;
  }

  .kpi-trend {
    font-size: 0.65rem !important;
    color: #555 !important;
    margin-bottom: 0.3rem;
  }

  /* Badge: en su propia línea, no superpuesto */
  .kpi-badge {
    display: inline-block !important;
    margin-top: 0.2rem !important;
    padding: 0.15rem 0.4rem !important;
    font-size: 0.6rem !important;
    border: 1px solid !important;
    clear: both;
  }
  .kpi-badge-up { background: #D1FAE5 !important; color: #000 !important; border-color: #065F46 !important; }
  .kpi-badge-down { background: #FEE2E2 !important; color: #000 !important; border-color: #991B1B !important; }
  .kpi-badge-same { background: #F3F4F6 !important; color: #000 !important; border-color: #6B7280 !important; }
  .kpi-badge-new { background: #FEF3C7 !important; color: #000 !important; border-color: #92400E !important; }

  /* Charts grid: vertical, una fila por chart */
  .charts-grid {
    display: block !important;
  }
  .charts-grid-2 {
    display: block !important;
  }
  .chart-card {
    box-shadow: none !important;
    background: white !important;
    border: 1px solid #999 !important;
    padding: 0.6rem !important;
    margin-bottom: 0.8rem !important;
    page-break-inside: avoid;
  }
  .chart-card h2 {
    font-size: 0.9rem !important;
    color: #000 !important;
    margin: 0 0 0.4rem 0 !important;
  }
  canvas {
    max-height: 220px !important;
    max-width: 100% !important;
    height: 220px !important;
  }

  /* Section headers */
  .section-header { margin-bottom: 0.5rem !important; padding: 0 !important; }
  .section-header h2 { font-size: 1rem !important; color: #000 !important; margin: 0.5rem 0 !important; }
  .section-subtitle { font-size: 0.7rem !important; color: #555 !important; }

  /* Market cards */
  .market-grid {
    display: grid !important;
    grid-template-columns: 1fr 2fr !important;
    gap: 0.5rem !important;
    margin-bottom: 0.5rem !important;
  }
  .market-card {
    box-shadow: none !important;
    background: white !important;
    border: 1px solid #999 !important;
    padding: 0.6rem !important;
    page-break-inside: avoid;
  }
  .market-card-icon { font-size: 1.2rem !important; }
  .market-card-label { font-size: 0.65rem !important; color: #555 !important; }
  .market-card-value { font-size: 1.5rem !important; color: #000 !important; margin: 0.2rem 0; }
  .market-card-meta { font-size: 0.7rem !important; color: #333 !important; flex-direction: row; gap: 0.5rem; }
  .market-ticket { background: #FFF7ED !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Distribución por rangos */
  .price-ranges { gap: 0.3rem !important; }
  .price-range-label { font-size: 0.7rem !important; color: #333 !important; }
  .price-range-label strong { color: #000 !important; }
  .price-range-bar {
    height: 6px !important;
    background: #F3F4F6 !important;
    border: 1px solid #ddd;
  }
  .price-range-bar span {
    background: #F26822 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Top vendedores */
  .vendor-item {
    padding: 0.4rem !important;
    background: white !important;
    border: 1px solid #ccc !important;
    margin-bottom: 0.3rem;
  }
  .vendor-rank { width: 22px !important; height: 22px !important; font-size: 0.7rem !important; background: #F3F4F6 !important; color: #333 !important; }
  .vendor-rank.rank-1 { background: #FCD34D !important; color: #000 !important; }
  .vendor-rank.rank-2 { background: #D1D5DB !important; color: #000 !important; }
  .vendor-rank.rank-3 { background: #FDBA74 !important; color: #000 !important; }
  .vendor-name { font-size: 0.8rem !important; color: #000 !important; }
  .vendor-meta { font-size: 0.65rem !important; color: #555 !important; }
  .vendor-ticket { font-size: 0.9rem !important; color: #000 !important; }

  /* Rankings de rotación */
  .rotation-grid {
    display: block !important;
  }
  .rotation-card {
    box-shadow: none !important;
    background: white !important;
    border: 1px solid #999 !important;
    padding: 0.5rem !important;
    margin-bottom: 0.6rem !important;
    page-break-inside: avoid;
  }
  .rotation-alta, .rotation-baja { border-top: 2px solid #999 !important; }
  .rotation-header h3 { font-size: 0.85rem !important; color: #000 !important; margin: 0; }
  .rotation-subtitle { font-size: 0.65rem !important; color: #555 !important; }
  .rotation-list {
    max-height: none !important;
    overflow: visible !important;
    margin-top: 0.4rem;
  }
  .rotation-item {
    padding: 0.3rem !important;
    background: white !important;
    border: 1px solid #eee !important;
    margin-bottom: 0.2rem;
    page-break-inside: avoid;
  }
  .rotation-rank { width: 20px !important; height: 20px !important; font-size: 0.7rem !important; }
  .rank-alta { background: #FEE2E2 !important; color: #000 !important; }
  .rank-baja { background: #DBEAFE !important; color: #000 !important; }
  .rotation-title { font-size: 0.75rem !important; color: #000 !important; }
  .rotation-meta { font-size: 0.65rem !important; color: #555 !important; }
  .velocity-num { font-size: 0.9rem !important; color: #000 !important; }
  .velocity-label { font-size: 0.55rem !important; color: #555 !important; }

  /* Alertas */
  .alerts-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 0.3rem !important;
  }
  .alert-card {
    box-shadow: none !important;
    background: white !important;
    border: 1px solid #999 !important;
    padding: 0.4rem !important;
    flex-direction: column !important;
    text-align: center !important;
    page-break-inside: avoid;
  }
  .alert-icon { font-size: 1rem !important; margin-bottom: 0.2rem; }
  .alert-count { font-size: 1.1rem !important; color: #000 !important; }
  .alert-label { font-size: 0.65rem !important; color: #333 !important; }
  .alert-desc { font-size: 0.55rem !important; color: #555 !important; }

  /* Embudo + Heatmap */
  .funnel-heatmap-grid {
    display: block !important;
  }
  .funnel-card, .heatmap-card {
    box-shadow: none !important;
    background: white !important;
    border: 1px solid #999 !important;
    padding: 0.6rem !important;
    margin-bottom: 0.6rem !important;
    page-break-inside: avoid;
  }
  .funnel-card h3, .heatmap-card h3 { font-size: 0.9rem !important; color: #000 !important; margin: 0 0 0.4rem 0; }
  .funnel-step-label { font-size: 0.7rem !important; color: #555 !important; }
  .funnel-step-bar {
    height: 24px !important;
    border: 1px solid #333 !important;
    font-size: 0.75rem !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .funnel-step-1 { background: #FED7AA !important; }
  .funnel-step-2 { background: #FCD34D !important; }
  .funnel-step-3 { background: #93C5FD !important; }
  .funnel-step-4 { background: #6EE7B7 !important; }
  .funnel-summary { padding-top: 0.4rem !important; border-top: 1px solid #ccc !important; }
  .funnel-summary-label { font-size: 0.65rem !important; color: #555 !important; }
  .funnel-summary-value { font-size: 0.9rem !important; color: #000 !important; }

  /* Heatmap */
  .heatmap-container { overflow: visible !important; }
  .heatmap-header, .heatmap-row { min-width: 0 !important; gap: 1px !important; }
  .heatmap-corner, .heatmap-day-label { width: 24px !important; font-size: 0.55rem !important; color: #555 !important; }
  .heatmap-hour-label { font-size: 0.5rem !important; color: #555 !important; }
  .heatmap-cell { height: 14px !important; border: 1px solid #ccc !important; }
  .heatmap-legend { font-size: 0.6rem !important; color: #555 !important; }

  /* Tablas */
  .table-card {
    box-shadow: none !important;
    background: white !important;
    border: 1px solid #999 !important;
    padding: 0.5rem !important;
    margin-bottom: 0.6rem !important;
    page-break-inside: avoid;
  }
  .table-header h2 { font-size: 0.9rem !important; color: #000 !important; }
  .table-page-info { font-size: 0.7rem !important; color: #555 !important; }

  .table-wrapper { overflow: visible !important; }
  .dashboard-table {
    font-size: 0.7rem !important;
    width: 100% !important;
    border-collapse: collapse !important;
  }
  .dashboard-table th {
    background: #F3F4F6 !important;
    color: #000 !important;
    border: 1px solid #999 !important;
    padding: 0.3rem !important;
    text-align: left !important;
  }
  .dashboard-table td {
    border: 1px solid #ccc !important;
    color: #000 !important;
    padding: 0.3rem !important;
  }
  .empty-row { color: #555 !important; font-style: italic; }

  /* Ocultar controles UI no imprimibles */
  .btn-action,
  .btn-apply,
  .btn-clear,
  .page-btn,
  .pagination,
  .table-filters,
  .rot-filter-toggle,
  .rot-filter-form,
  .dashboard-filters {
    display: none !important;
  }

  /* GMV - impresión */
  .gmv-grid {
    display: grid !important;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr !important;
    gap: 0.4rem !important;
  }
  .gmv-card {
    box-shadow: none !important;
    background: white !important;
    border: 1px solid #999 !important;
    padding: 0.5rem !important;
    page-break-inside: avoid;
  }
  .gmv-main {
    background: #065F46 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .gmv-label { font-size: 0.6rem !important; color: #555 !important; }
  .gmv-main .gmv-label { color: #A7F3D0 !important; }
  .gmv-value { font-size: 1.3rem !important; color: #000 !important; }
  .gmv-main .gmv-value { color: white !important; }
  .gmv-value-secondary { font-size: 1rem !important; color: #000 !important; }
  .gmv-meta { font-size: 0.6rem !important; color: #555 !important; }
  .gmv-main .gmv-meta { color: #D1FAE5 !important; }
  .gmv-trend-up { background: #D1FAE5 !important; color: #000 !important; border: 1px solid #065F46 !important; }
  .gmv-trend-down { background: #FEE2E2 !important; color: #000 !important; border: 1px solid #991B1B !important; }

  /* Cohortes - impresión */
  .cohort-table-wrapper {
    overflow: visible !important;
    padding: 0.3rem !important;
    page-break-inside: avoid;
  }
  .cohort-table { font-size: 0.65rem !important; }
  .cohort-table th, .cohort-table td { padding: 0.3rem !important; }
  .cohort-corner, .cohort-size-col, .cohort-period-col {
    background: #F3F4F6 !important;
    color: #000 !important;
    border: 1px solid #999 !important;
  }
  .cohort-label {
    background: #F3F4F6 !important;
    color: #000 !important;
    border: 1px solid #999 !important;
  }
  .cohort-size {
    background: #F9FAFB !important;
    color: #000 !important;
    border: 1px solid #999 !important;
  }
  .cohort-cell {
    border: 1px solid #999 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    min-width: 50px !important;
  }
  .cohort-cell strong { font-size: 0.7rem !important; text-shadow: none !important; color: white; }
  .cohort-cell small { font-size: 0.55rem !important; text-shadow: none !important; color: white; }
  .cohort-future { background: #F9FAFB !important; color: #555 !important; }
  .cohort-legend { font-size: 0.6rem !important; color: #555 !important; }
  .cohort-legend-gradient { border: 1px solid #999 !important; }
}

/* =====================================================
   ADMIN DASHBOARD - Minifase G (GMV + Cohortes)
   ===================================================== */

/* GMV */
.gmv-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 1100px) {
  .gmv-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .gmv-grid { grid-template-columns: 1fr; }
}

.gmv-card {
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.gmv-main {
  background: linear-gradient(135deg, #065F46 0%, #047857 100%);
  border-color: #065F46;
  color: white;
}
.gmv-main .gmv-label { color: #A7F3D0; }
.gmv-main .gmv-value { color: white; }
.gmv-main .gmv-meta { color: #D1FAE5; }

.gmv-label {
  font-size: 0.75rem;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.gmv-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1F2937;
  line-height: 1.1;
}

.gmv-value-secondary {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1F2937;
  line-height: 1.1;
}

.gmv-meta {
  font-size: 0.75rem;
  color: #6B7280;
  margin-top: 0.4rem;
}

.gmv-trend {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.7rem;
}

.gmv-trend-up { background: #D1FAE5; color: #065F46; }
.gmv-trend-down { background: #FEE2E2; color: #991B1B; }

/* Cohortes */
.cohort-table-wrapper {
  overflow-x: auto;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.cohort-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 2px;
  font-size: 0.85rem;
}

.cohort-table th,
.cohort-table td {
  padding: 0.5rem;
  text-align: center;
}

.cohort-corner {
  background: #F9FAFB;
  text-align: left !important;
  font-weight: 600;
  color: #6B7280;
  border-radius: 4px;
}

.cohort-size-col {
  background: #F9FAFB;
  font-weight: 600;
  color: #6B7280;
  width: 70px;
  border-radius: 4px;
}

.cohort-period-col {
  background: #F9FAFB;
  font-weight: 600;
  color: #6B7280;
  width: 90px;
  font-size: 0.75rem;
  border-radius: 4px;
}

.cohort-label {
  text-align: left;
  font-weight: 600;
  color: #1F2937;
  background: #F9FAFB;
  border-radius: 4px;
}

.cohort-size {
  font-weight: 700;
  color: #1F2937;
  background: #F3F4F6;
  border-radius: 4px;
}

.cohort-cell {
  border-radius: 4px;
  color: white;
  font-weight: 600;
  min-width: 80px;
  transition: transform 0.1s;
  cursor: default;
}

.cohort-cell:hover {
  transform: scale(1.05);
  position: relative;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cohort-cell strong {
  display: block;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.cohort-cell small {
  display: block;
  font-size: 0.65rem;
  opacity: 0.85;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.cohort-future {
  background: #F9FAFB !important;
  color: #9CA3AF !important;
}

.cohort-empty {
  font-size: 1rem;
}

.cohort-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #6B7280;
  justify-content: flex-end;
}

.cohort-legend-gradient {
  width: 200px;
  height: 12px;
  background: linear-gradient(90deg, #FED7AA, #FB923C, #EA580C);
  border-radius: 3px;
  border: 1px solid #E5E7EB;
}

/* Dark mode */
[data-theme="dark"] .gmv-card {
  background: #1F2937;
  border-color: #374151;
}
[data-theme="dark"] .gmv-label { color: #9CA3AF; }
[data-theme="dark"] .gmv-value,
[data-theme="dark"] .gmv-value-secondary { color: #F3F4F6; }
[data-theme="dark"] .gmv-meta { color: #9CA3AF; }
[data-theme="dark"] .gmv-trend-up { background: #064E3B; color: #6EE7B7; }
[data-theme="dark"] .gmv-trend-down { background: #7F1D1D; color: #FCA5A5; }

[data-theme="dark"] .cohort-table-wrapper {
  background: #1F2937;
  border-color: #374151;
}
[data-theme="dark"] .cohort-corner,
[data-theme="dark"] .cohort-size-col,
[data-theme="dark"] .cohort-period-col { background: #374151; color: #D1D5DB; }
[data-theme="dark"] .cohort-label { background: #374151; color: #F3F4F6; }
[data-theme="dark"] .cohort-size { background: #4B5563; color: #F3F4F6; }
[data-theme="dark"] .cohort-future { background: #374151 !important; color: #6B7280 !important; }
[data-theme="dark"] .cohort-legend-gradient { border-color: #374151; }

/* =====================================================
   MOBILE FIXES - Dashboard responsive (iPhone, Android)
   ===================================================== */
@media (max-width: 768px) {
  /* Header del dashboard - stack vertical */
  .dashboard-header {
    padding: 0 !important;
    text-align: center;
  }
  .dashboard-header h1 {
    font-size: 1.4rem !important;
    padding: 0 0.5rem;
  }
  .dashboard-meta {
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
  }
  .dashboard-meta span {
    display: block !important;
    margin: 0.1rem 0 !important;
    text-align: center;
  }

  /* Botón PDF en mobile: stack abajo */
  .dashboard-header > .btn-print-pdf {
    position: static !important;
    display: block;
    width: calc(100% - 2rem);
    margin: 0.8rem 1rem 0;
    text-align: center;
    justify-content: center;
  }

  /* Filtros de rango (los botones 7d/30d/etc) */
  .dashboard-filters {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    padding: 0.5rem;
  }
  .filter-label {
    width: 100%;
    text-align: center;
    margin-bottom: 0.3rem;
  }
  .filter-btn {
    flex: 1 1 calc(33% - 0.4rem);
    min-width: 60px;
    text-align: center;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }

  /* KPI cards - más compactas */
  .kpi-card {
    padding: 0.8rem !important;
    gap: 0.5rem;
  }
  .kpi-icon { font-size: 1.5rem; }
  .kpi-value { font-size: 1.3rem !important; }
  .kpi-label { font-size: 0.75rem; }
  .kpi-trend { font-size: 0.7rem; }
  .kpi-badge { font-size: 0.65rem; padding: 0.15rem 0.4rem; }

  /* Charts grid - cards más compactas */
  .chart-card {
    padding: 0.8rem;
  }
  .chart-card h2 { font-size: 0.95rem; }

  /* Section headers - stack vertical con flex */
  .section-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .section-header-flex {
    flex-direction: column;
    align-items: stretch;
  }
  .section-header h2 {
    text-align: center;
    font-size: 1.1rem;
  }
  .section-subtitle {
    text-align: center;
    font-size: 0.8rem;
  }

  /* Filtro de rotación - stack */
  .rot-filter-form {
    margin-top: 0.5rem;
  }
  .rot-filter-toggle {
    width: 100%;
    display: flex;
    justify-content: stretch;
  }
  .rot-filter-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.3rem;
    font-size: 0.75rem;
  }

  /* Tablas */
  .table-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .table-header h2 {
    text-align: center;
    font-size: 1rem;
  }
  .table-page-info {
    text-align: center;
  }
  .table-filters {
    grid-template-columns: 1fr 1fr !important;
    padding: 0.6rem;
  }
  .table-filters .filter-group {
    grid-column: span 1;
  }
  .table-filters .filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.5rem;
  }
  .table-filters .filter-actions a,
  .table-filters .filter-actions button {
    flex: 1;
    text-align: center;
  }

  /* Paginación */
  .pagination {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
  }
  .page-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    min-width: 80px;
    text-align: center;
  }
  .page-info {
    width: 100%;
    text-align: center;
    order: -1;
    margin-bottom: 0.3rem;
  }

  /* Heatmap - scroll horizontal ya está OK pero hacer más visible */
  .heatmap-container {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  .heatmap-header, .heatmap-row {
    min-width: 700px !important;
  }

  /* Cohort table - scroll horizontal */
  .cohort-table-wrapper {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
  }
  .cohort-table {
    min-width: 600px;
  }
  .cohort-cell {
    min-width: 70px !important;
  }

  /* Vendor item - flex más compacto */
  .vendor-item {
    padding: 0.5rem;
  }
  .vendor-rank {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }
  .vendor-ticket {
    font-size: 1rem;
  }

  /* Rotation items - más compactos */
  .rotation-item {
    flex-wrap: wrap;
  }
  .rotation-info { min-width: 0; }
  .rotation-velocity { width: 100%; text-align: right; }

  /* Alerts grid */
  .alert-card {
    flex-direction: row !important;
    text-align: left !important;
  }
  .alert-icon { font-size: 1.4rem; }

  /* GMV cards */
  .gmv-card {
    padding: 0.7rem;
  }
  .gmv-value {
    font-size: 1.3rem !important;
  }
  .gmv-value-secondary {
    font-size: 1.1rem !important;
  }

  /* Funnel - barras más chicas */
  .funnel-step-bar {
    height: 28px;
    font-size: 0.8rem;
  }
  .funnel-step-label {
    font-size: 0.75rem;
  }

  /* Modal - pantalla completa casi */
  .modal {
    padding: 0;
    align-items: stretch;
  }
  .modal-content {
    border-radius: 0;
    max-height: 100vh;
    max-width: 100%;
    width: 100%;
    padding: 1rem;
    padding-top: 2.5rem;
  }
  .modal-close {
    top: 0.3rem;
    right: 0.5rem;
    width: 36px;
    height: 36px;
  }
  .modal-content h2 {
    font-size: 1.1rem;
  }
  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  .detail-row span {
    text-align: left;
  }

  /* Market cards */
  .market-card {
    flex-direction: row !important;
    text-align: left !important;
    padding: 0.8rem !important;
  }
  .market-card-icon { font-size: 1.5rem; }
  .market-card-value { font-size: 1.4rem; }

  /* Distribución por rangos */
  .price-range-label {
    font-size: 0.78rem;
  }

  /* Auto-refresh indicator */
  .auto-refresh-indicator,
  .last-update {
    font-size: 0.7rem !important;
  }

  /* Botón flotante del bottom-nav no estorbar */
  .admin-dashboard {
    padding-bottom: 6rem !important;
  }

  /* Page info en paginación centrada */
  .page-btn-disabled {
    pointer-events: none;
    opacity: 0.5;
  }
}

/* Extra small (iPhone SE, etc.) */
@media (max-width: 380px) {
  .kpi-card { padding: 0.6rem !important; }
  .kpi-value { font-size: 1.1rem !important; }
  .kpi-icon { font-size: 1.2rem; }
  .chart-card h2 { font-size: 0.85rem; }
  .section-header h2 { font-size: 1rem; }
  .btn-print-pdf { font-size: 0.8rem; padding: 0.5rem 0.8rem; }
  .alert-count { font-size: 1rem !important; }
  .alert-label { font-size: 0.65rem; }
  .gmv-value { font-size: 1.1rem !important; }
  .cohort-cell strong { font-size: 0.75rem; }
}

/* Landscape en tablets/móviles */
@media (max-width: 900px) and (orientation: landscape) {
  .dashboard-header {
    padding: 0.5rem 0 !important;
  }
  .modal-content {
    max-height: 95vh;
  }
}
