/* ============================================================================
   LB JEANS — Capa de pulido (25-sep-2026)
   ----------------------------------------------------------------------------
   Va la última. Tres frentes:
     1. El lanzador de la asesora (burbuja del chat).
     2. El celular: cabecera compacta, portada, catálogo en dos columnas,
        valores en lista y espaciados más cortos.
     3. Detalles de escritorio: tarjetas con más aire y sombra suave.
   Solo usa los tokens de lb-tokens.css. Si se retira este fichero la tienda
   vuelve a como estaba (salvo el lanzador, que no tendría estilo).
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. LANZADOR DE LA ASESORA
   --------------------------------------------------------------------------- */
.lb-asesora {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: var(--lb-fuente-texto);
  pointer-events: none;           /* solo el botón y el globo reciben toques */
}
.lb-asesora > * { pointer-events: auto; }

.lb-asesora__boton {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 20px 7px 7px;
  background: var(--lb-indigo-900);
  color: var(--lb-lienzo);
  border: 1px solid rgba(217, 164, 65, 0.55);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(11, 18, 34, 0.32), 0 2px 6px rgba(11, 18, 34, 0.20);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, background .25s ease;
}
.lb-asesora__boton:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(11, 18, 34, 0.36), 0 2px 6px rgba(11, 18, 34, 0.20);
  color: var(--lb-lienzo);
}
.lb-asesora__boton:active { transform: translateY(0) scale(.98); }
.lb-asesora__boton:focus-visible { outline: 3px solid var(--lb-hilo); outline-offset: 3px; }

.lb-asesora__avatar {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 25%, #E9BE66 0%, var(--lb-hilo) 45%, #B9862A 100%);
  color: var(--lb-indigo-900);
  font-family: var(--lb-fuente-titulo);
  font-weight: 800;
  font-size: 1.3rem;
  font-style: italic;
  letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
}
.lb-asesora__punto {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2FBF71;
  border: 2px solid var(--lb-indigo-900);
}
.lb-asesora__punto::after {       /* latido suave: «está en línea» */
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid #2FBF71;
  animation: lb-asesora-latido 2.4s ease-out infinite;
}
@keyframes lb-asesora-latido {
  0%   { transform: scale(1);   opacity: .9; }
  70%  { transform: scale(2.1); opacity: 0; }
  100% { transform: scale(2.1); opacity: 0; }
}

.lb-asesora__texto {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}
.lb-asesora__texto small {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lb-hilo);
  margin-bottom: 3px;
}

/* Globo de bienvenida */
.lb-asesora__globo {
  position: relative;
  max-width: 260px;
  padding: 16px 38px 16px 18px;
  background: #fff;
  color: var(--lb-tinta);
  border-radius: 18px 18px 6px 18px;
  box-shadow: 0 14px 40px rgba(11, 18, 34, 0.22), 0 2px 6px rgba(11, 18, 34, 0.10);
  font-size: 0.9rem;
  line-height: 1.45;
  cursor: pointer;
  animation: lb-asesora-entra .45s cubic-bezier(.2,.8,.2,1) both;
}
.lb-asesora__globo[hidden] { display: none; }
.lb-asesora__globo strong {
  display: block;
  font-family: var(--lb-fuente-titulo);
  font-size: 0.98rem;
  color: var(--lb-indigo-900);
  margin-bottom: 2px;
}
.lb-asesora__globo span { color: var(--lb-tinta-2); }
.lb-asesora__cerrar {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--lb-tinta-2);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.lb-asesora__cerrar:hover { background: var(--lb-lienzo-2); color: var(--lb-tinta); }
@keyframes lb-asesora-entra {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* Con el chat abierto: en escritorio el lanzador queda debajo como «cerrar». */
.lb-asesora.es-abierta .lb-asesora__globo { display: none; }

/* El botón viejo ya no se pinta aunque alguna página lo conserve. */
.whatsapp-float { display: none !important; }

/* El chat de Chatwoot, un poco más arriba para no pisar el lanzador. */
.woot-widget-holder, body .woot-widget-holder.woot-widget--without-bubble {
  bottom: 100px !important;
  max-height: calc(100vh - 124px) !important;
}
/* En el celular Chatwoot abre a pantalla completa. Aquí abre como panel
   flotante sobre la tienda, encima del lanzador, que pasa a ser el «cerrar». */
@media (max-width: 667px) {
  .woot-widget-holder, body .woot-widget-holder.woot-widget--without-bubble {
    top: auto !important;
    left: auto !important;
    right: 12px !important;
    bottom: calc(84px + env(safe-area-inset-bottom)) !important;
    width: calc(100vw - 24px) !important;
    max-width: 400px !important;
    height: min(60vh, 500px) !important;
    max-height: calc(100dvh - 110px) !important;
    min-height: 0 !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: 0 18px 50px rgba(11, 18, 34, 0.35), 0 2px 8px rgba(11, 18, 34, 0.18) !important;
  }
  .woot-widget-holder iframe { min-height: 0 !important; height: 100% !important; }
  body:has(.lb-barra-compra) .woot-widget-holder,
  body:has(.lb-barra-compra) .woot-widget-holder.woot-widget--without-bubble {
    bottom: calc(var(--lb-toque) + 108px) !important;
    max-height: calc(100dvh - 200px) !important;
  }
}

/* ---------------------------------------------------------------------------
   2. CELULAR
   --------------------------------------------------------------------------- */
@media (max-width: 767px) {

  /* Lanzador: solo el avatar; el texto no cabe sin tapar contenido. */
  .lb-asesora { right: 14px; bottom: max(16px, env(safe-area-inset-bottom)); }
  .lb-asesora__boton { padding: 5px; gap: 0; }
  .lb-asesora__texto { display: none; }
  .lb-asesora__avatar { width: 52px; height: 52px; font-size: 1.4rem; }
  .lb-asesora__globo { max-width: min(260px, calc(100vw - 90px)); font-size: 0.86rem; }
  /* Chat abierto: el avatar se vuelve una «×» para cerrarlo. */
  .lb-asesora.es-abierta .lb-asesora__avatar { font-size: 0; }
  .lb-asesora.es-abierta .lb-asesora__avatar::before {
    content: "\00D7";
    font-size: 1.9rem;
    font-style: normal;
    font-weight: 500;
    line-height: 1;
  }
  .lb-asesora.es-abierta .lb-asesora__punto { display: none; }
  /* En la ficha hay barra fija de compra: el lanzador sube por encima. */
  body:has(.lb-barra-compra) .lb-asesora { bottom: calc(var(--lb-toque) + 40px); }

  /* Cabecera compacta: antes eran 140 px de barras antes de ver un jean.
     La barra superior queda como un renglón de texto (el botón dorado
     duplicaba al lanzador de la asesora). */
  .topbar { min-height: 0 !important; height: auto !important; padding: 0 !important; }
  .topbar__whatsapp {
    min-height: 0 !important;
    font-size: 0.64rem !important;
    padding: 8px 12px !important;
    letter-spacing: 0.14em !important;
    background: transparent !important;
    border: 0 !important;
    color: var(--lb-hilo) !important;
  }
  .topbar__whatsapp i { color: var(--lb-hilo) !important; }

  /* Cabecera de /tienda: de 270 px a lo justo. */
  .lb-cabecera-coleccion { padding: 28px 20px 22px !important; }
  .lb-cabecera-coleccion h1 { font-size: 1.7rem !important; }
  .lb-cabecera-coleccion .lb-rule { margin: 12px auto 0 !important; }
  .breadcrumb { padding: 12px 14px 0 !important; font-size: 0.76rem; }
  .header__container { padding: 8px 12px !important; gap: 4px; }
  .header__logo-img { height: 38px !important; }
  .header__btn-store { display: none !important; }  /* «Tienda» ya está en el menú */
  .header__cart,
  .header__search-toggle,
  .header__hamburger {
    width: 44px !important;
    height: 44px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  .header__hamburger { flex-direction: column; gap: 5px; }
  .header__actions { display: flex; align-items: center; gap: 2px; }
  .header__mobile-nav a {
    padding: 16px 20px !important;
    font-size: 1rem !important;
    border-bottom: 1px solid var(--lb-linea-inversa);
  }

  /* Tiras doradas: más finas. */
  .lb-marquee { padding: 9px 0; }
  .lb-marquee__group span { font-size: 0.66rem; }

  /* Portada: la foto marca el alto (antes sobraba una franja vacía
     debajo con el rótulo «toca para verla» flotando solo). */
  .lb-hero__media { min-height: 0 !important; aspect-ratio: 4 / 5; }
  .lb-hero__media .lb-carrusel__lamina { position: absolute !important; inset: 0; }
  .lb-hero__tag { display: none; }
  .lb-carrusel__puntos { top: auto; bottom: 64px; right: 50%; transform: translateX(50%); }
  .lb-carrusel__pie { padding: 56px 18px 16px; }
  .lb-hero__text { padding: 40px 22px 48px !important; }
  .lb-hero__eyebrow { font-size: 0.66rem; letter-spacing: 0.26em; margin-bottom: 14px; }
  .lb-hero__title { font-size: 2.35rem !important; }
  .lb-hero__divider { margin: 18px 0; }
  .lb-hero__sub { font-size: 0.98rem; margin-bottom: 26px; }
  .lb-hero__ctas { flex-direction: column; gap: 10px; }
  .lb-hero__ctas .btn { width: 100%; justify-content: center; text-align: center; }

  /* Secciones: menos aire vertical. */
  .lb-section { padding: 56px 16px !important; }
  .lb-section__title { font-size: 1.7rem !important; }

  /* Tarjetas de la portada. */
  .lb-grid { gap: 22px 12px !important; }
  .lb-card__body { padding: 12px 2px 2px !important; text-align: left !important; }
  .lb-card__name { font-size: 0.9rem !important; line-height: 1.3 !important; }
  .lb-card__name a {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .lb-card__cat { font-size: 0.62rem !important; }
  .lb-card__price { font-size: 0.95rem !important; }

  /* Banda editorial. */
  .lb-editorial__media { min-height: 0 !important; aspect-ratio: 4 / 3; }
  .lb-editorial__text { padding: 40px 22px 48px !important; }

  /* Valores: lista con icono a la izquierda, en vez de cuatro columnas
     estrechas con el texto partido en cinco renglones. */
  .lb-values {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 40px 20px !important;
  }
  .lb-value {
    display: grid !important;
    grid-template-columns: 44px 1fr;
    column-gap: 14px;
    text-align: left !important;
    padding: 18px 0 !important;
    border-left: 0 !important;
    border-top: 1px solid var(--lb-linea) !important;
  }
  .lb-value:first-child { border-top: 0 !important; }
  .lb-value i {
    grid-row: span 2;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--lb-hilo-tenue);
    font-size: 1.05rem !important;
    margin: 0 !important;
  }
  .lb-value h3 { font-size: 1rem !important; margin: 0 0 4px !important; }
  .lb-value p { font-size: 0.86rem !important; }

  /* Preguntas frecuentes. */
  #faq details summary { font-size: 0.98rem !important; }

  /* Llamado final. */
  .lb-cta { padding: 56px 20px !important; }
  .lb-cta .btn { width: 100%; justify-content: center; }

  /* ---- Catálogo (/tienda) ---- */
  .tienda-layout { padding: 16px 14px 48px !important; gap: 0 !important; }
  .tienda-sidebar { display: none !important; }
  .tienda-toolbar {
    padding: 10px 0 14px !important;
    margin: 0 !important;
    gap: 10px;
    flex-wrap: wrap;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .tienda-toolbar { justify-content: space-between; align-items: center; flex-wrap: nowrap !important; }
  .tienda-toolbar__results { font-size: 0.8rem; min-width: 0; }
  .tienda-toolbar label[for="ordenar-select"] { display: none; }
  #ordenar-select { max-width: 150px; font-size: 0.8rem; padding: 8px 10px; }
  .productos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px 12px !important;
  }
  .product-card__image-wrap { aspect-ratio: 4 / 5 !important; border-radius: 12px !important; }
  .product-card__info { padding: 10px 2px 6px !important; }
  .product-card__category { font-size: 0.6rem !important; }
  .product-card__name { font-size: 0.88rem !important; line-height: 1.3 !important; }
  .product-card__name a {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .product-card__resumen { display: none; }
  .product-card__price { font-size: 0.95rem !important; }
  .product-card__actions { padding: 0 2px 4px !important; }
  .product-card__actions .btn { padding: 10px 8px !important; font-size: 0.7rem !important; }
  .product-card__badges .badge { font-size: 0.56rem !important; padding: 4px 8px !important; }

  /* Pie. */
  .lb-footer__grid { padding: 48px 20px 28px !important; gap: 28px !important; }
  .lb-footer__bar-inner { flex-direction: column; text-align: center; align-items: center; }
}

/* Chips de categorías: solo en celular. */
.lb-chips { display: none; }
@media (max-width: 767px) {
  .lb-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 14px 12px;
    margin: 0 -14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .lb-chips::-webkit-scrollbar { display: none; }
  .lb-chip {
    flex: none;
    scroll-snap-align: start;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--lb-linea-fuerte);
    background: var(--lb-fondo-elevado);
    color: var(--lb-texto);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
  }
  .lb-chip.es-activo {
    background: var(--lb-indigo-900);
    border-color: var(--lb-indigo-900);
    color: var(--lb-lienzo);
  }
}

/* ---------------------------------------------------------------------------
   3. ESCRITORIO
   --------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .lb-card, .product-card { transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease; }
  .lb-card:hover, .product-card:hover { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .lb-asesora__punto::after, .lb-asesora__globo { animation: none; }
  .lb-asesora__boton, .lb-card, .product-card { transition: none; }
}
