/* =====================================================
   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: 52px;
  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: 44px;
  width: 44px;
}

/* =====================================================
   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: 60px;
  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 img, .nav-user .avatar-letters {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.nav-username { display: none; }
.btn-publish { padding: 0.55rem 1.1rem; }

.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;
}
.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);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.filtro-grupo input:focus,
.filtro-grupo select:focus {
  outline: none;
  border-color: var(--naranja);
}

/* 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: 85vh;
    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;
    -webkit-overflow-scrolling: touch;
  }
  .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: var(--oscuro);
  }

  /* 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; }
}
.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-card {
  background: var(--blanco);
  border-radius: var(--radio-lg);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--sombra-md);
}
.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);
}
.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.6);
  color: var(--blanco);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.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 8rem; 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: 0;
  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: calc(0.75rem + env(safe-area-inset-bottom));
}
.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; }
}

@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: 40px; width: 40px; }
  .header-inner { padding: 0.5rem 0.75rem; min-height: 60px; }
}

@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: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  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: 2px;
  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; }
.metodo-pago-info span { font-size: 0.82rem; color: var(--gris-texto); }

.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;
}
[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; }
