/* ═══════════════════════════════════════════════════════════
   La Chinita Comercial · mejoras globales
   (se carga DESPUÉS de style.css y lo complementa)
═══════════════════════════════════════════════════════════ */
:root { --lc-azul: #2a5caa; --lc-azul-osc: #1c3f7a; --lc-verde: #0b7a3e; --lc-ease: cubic-bezier(.2,.8,.2,1); }

/* ── Accesibilidad: foco visible y enlace "saltar al contenido" ── */
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; border-radius: 4px; }
.lc-skip { position: absolute; left: -999px; top: 8px; z-index: 100000; background: #fff; color: var(--lc-azul-osc); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.lc-skip:focus { left: 8px; }

/* ── Contraste (WCAG AA ≥ 4.5:1) ── */
.btn-whatsapp, .whatsapp-flotante-btn, .telefonos a:focus { background: var(--lc-verde) !important; color: #fff !important; }
.btn-whatsapp:hover, .btn-whatsapp:focus { background: #085c2f !important; }
.telefonos i, .whatsapp-flotante-opcion i { color: var(--lc-verde) !important; }
.stock-disponible { background: #1e7e34 !important; color: #fff !important; }
.rating, .estrellas-widget, .estrellas-input { color: #c27c00 !important; }
.mensaje-exito, .seguridad-info i, .chc-toast-success i { color: #1e7e34 !important; }
.mensaje-error { color: #a52834 !important; }
.separador, .seguridad-info, .requisitos-password, .login-info, .registro-card p.subtitulo,
.estrellas-widget .estrellas-total, .pedido-cliente-fecha, .sin-imagen { color: var(--lc-muted) !important; }
.btn-google, .btn-google i { color: #1967d2 !important; }
.text-muted { color: var(--lc-muted) !important; }

/* ── Pantalla de carga de imágenes: brillo mientras cargan ── */
img[loading="lazy"]:not(.cargada), img.lazyload:not(.cargada) {
  background: linear-gradient(90deg, #eef2f8 25%, #f7f9fc 37%, #eef2f8 63%) 0 0 / 400% 100%;
  animation: lcShimmer 1.3s ease infinite;
}
img.cargada { animation: none; background: none; }
@keyframes lcShimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ── Barra de progreso al navegar ── */
#lc-nav { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100001; pointer-events: none; opacity: 0; transition: opacity .2s; }
#lc-nav.on { opacity: 1; }
#lc-nav i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lc-azul), #f2b705); transition: width 8s cubic-bezier(.1,.8,.2,1); }

/* ── Botones y formularios ── */
.lc-spin { display: inline-block; width: 15px; height: 15px; border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: lcRot .7s linear infinite; vertical-align: -2px; }
@keyframes lcRot { to { transform: rotate(360deg); } }
.is-invalid { border-color: #c0392b !important; box-shadow: 0 0 0 3px rgba(192,57,43,.12) !important; }
.lc-error { color: #a52834; font-size: .85rem; font-weight: 600; margin-top: 4px; }
.btn { transition: transform .12s var(--lc-ease), box-shadow .2s, background-color .2s; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { cursor: progress; opacity: .8; }

/* ── CTA claro (botón principal y secundario) ── */
.btn-cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #f2b705; color: #1b2a41 !important; font-weight: 800; border: 0; border-radius: 999px; padding: 14px 28px; font-size: 1.05rem; text-decoration: none; box-shadow: 0 10px 24px -10px rgba(242,183,5,.9); min-height: 48px; transition: transform .15s var(--lc-ease), box-shadow .2s; }
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(242,183,5,.95); }
.btn-cta-sec { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: rgba(255,255,255,.14); color: #fff !important; font-weight: 700; border: 2px solid rgba(255,255,255,.75); border-radius: 999px; padding: 12px 24px; text-decoration: none; min-height: 48px; }
.btn-cta-sec:hover { background: rgba(255,255,255,.26); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }
.hero-confianza { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; margin-top: 20px; font-size: .92rem; font-weight: 600; color: #fff; }
.hero-confianza span::before { content: "✓ "; color: #ffd24a; font-weight: 800; }
.btn-wa-producto { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 10px; background: var(--lc-verde); color: #fff !important; font-weight: 700; border: 0; border-radius: 10px; padding: 13px 18px; min-height: 48px; }
.btn-wa-producto:hover { background: #085c2f; }

/* ── Barra de compra fija (celular, página de producto) ── */
.lc-buybar { display: none; }
@media (max-width: 768px) {
  .lc-buybar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(255,255,255,.97); backdrop-filter: blur(8px); box-shadow: 0 -10px 26px -12px rgba(20,40,80,.35); transform: translateY(110%); transition: transform .3s var(--lc-ease); }
  .lc-buybar.lc-on { transform: none; }
  .lc-bb-main { flex: 1; border: 0; border-radius: 12px; background: var(--lc-azul); color: #fff; font-weight: 800; font-size: 1rem; min-height: 50px; }
  .lc-bb-wa { width: 54px; border: 0; border-radius: 12px; background: var(--lc-verde); color: #fff; font-size: 1.5rem; }
}

/* ── Móvil: tamaños táctiles y sin zoom raro en iPhone ── */
@media (max-width: 768px) {
  input, select, textarea, .form-control { font-size: 16px !important; }
  .btn, button, .nav-link, .page-link { min-height: 44px; }
  .footer a { display: inline-block; padding: 6px 0; }
  body { -webkit-text-size-adjust: 100%; }
  .whatsapp-flotante, .whatsapp-flotante-btn { margin-bottom: env(safe-area-inset-bottom, 0px); }
  body:has(.lc-buybar.lc-on) .whatsapp-flotante { display: none; }
}
html { scroll-behavior: smooth; } @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ── Aviso de cookies ── */
.lc-cookie { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 100002; max-width: 880px; margin: 0 auto; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: #fff; color: #1b2a41; border-radius: 16px; padding: 16px 20px; box-shadow: 0 20px 50px -12px rgba(10,30,70,.45); border: 1px solid #e3e9f3; transform: translateY(140%); transition: transform .4s var(--lc-ease); }
.lc-cookie.lc-show { transform: none; }
.lc-cookie-txt { flex: 1 1 320px; font-size: .92rem; line-height: 1.45; }
.lc-cookie-txt p { margin: 4px 0 0; color: #3c4858; }
.lc-cookie-txt a { color: var(--lc-azul); font-weight: 700; }
.lc-cookie-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.lc-btn { border: 2px solid transparent; border-radius: 10px; padding: 10px 16px; font-weight: 700; cursor: pointer; min-height: 44px; font-size: .92rem; }
.lc-btn-main { background: var(--lc-azul); color: #fff; } .lc-btn-main:hover { background: var(--lc-azul-osc); }
.lc-btn-sec { background: #fff; color: var(--lc-azul); border-color: var(--lc-azul); } .lc-btn-sec:hover { background: #eef3fb; }
.lc-btn-link { background: none; color: #3c4858; text-decoration: underline; }
.lc-modal { position: fixed; inset: 0; z-index: 100003; background: rgba(10,25,55,.55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.lc-modal-box { background: #fff; border-radius: 18px; padding: 22px; width: min(480px, 100%); max-height: 90dvh; overflow: auto; box-shadow: 0 30px 70px -20px rgba(0,0,0,.5); }
.lc-modal-box h2 { font-size: 1.2rem; margin: 0 0 12px; color: #1b2a41; }
.lc-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #edf1f7; cursor: pointer; }
.lc-row small { display: block; color: #5b6470; font-size: .82rem; margin-top: 2px; }
.lc-row input { width: 22px; height: 22px; accent-color: var(--lc-azul); flex: none; }
.lc-modal .lc-cookie-btns { margin-top: 16px; }
#lc-offline { position: fixed; top: 0; left: 0; right: 0; z-index: 100004; background: #a52834; color: #fff; text-align: center; padding: 9px; font-weight: 700; font-size: .9rem; }
@media (max-width: 600px) { .lc-cookie { padding: 14px; } .lc-cookie-btns .lc-btn { flex: 1 1 45%; } .lc-cookie-btns .lc-btn-link { flex-basis: 100%; } }

/* ── Páginas de error (404, 403, 500…) ── */
.lc-error-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; text-align: center; font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif; background: radial-gradient(900px 500px at 15% -10%, #4a7bc8 0, transparent 60%), linear-gradient(160deg, #1c3f7a, #2a5caa); color: #fff; }
.lc-error-card { width: min(520px, 100%); background: #fff; color: #1b2a41; border-radius: 24px; padding: 34px 26px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.5); animation: lcUp .5s var(--lc-ease); }
@keyframes lcUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.lc-error-card img.lc-e-logo { width: 150px; height: auto; border-radius: 14px; margin-bottom: 10px; }
.lc-error-num { font-size: 84px; font-weight: 900; line-height: 1; background: linear-gradient(135deg, #2a5caa, #f2b705); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lc-error-card h1 { font-size: 1.5rem; margin: 6px 0 8px; }
.lc-error-card p { color: #3c4858; line-height: 1.5; margin: 0 0 18px; }
.lc-error-card form { display: flex; gap: 8px; margin-bottom: 14px; }
.lc-error-card input[type=search] { flex: 1; min-width: 0; padding: 12px 14px; border: 2px solid #d5deec; border-radius: 12px; font-size: 16px; }
.lc-error-links { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin-top: 16px; font-size: .92rem; }
.lc-error-links a { color: #1c3f7a; font-weight: 700; }
.lc-error-card .btn-cta { width: 100%; }

/* ── Campo trampa antispam (invisible para personas) ── */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ═══ Variables de tema (el modo oscuro las redefine en tema.css) ═══ */
:root { --lc-surface: #ffffff; --lc-surface-2: #f3f6fb; --lc-texto: #1b2a41; --lc-muted: #5b6470; --lc-borde: #e3e9f3; --lc-link: #2a5caa; --lc-fondo: #f6f8fc; }

/* ═══ Botón de tema (sol / luna) ═══ */
.lc-tema-btn { width: 40px; height: 40px; flex: none; margin: 0 6px; display: inline-grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--lc-borde); background: var(--lc-surface-2); color: var(--lc-texto); cursor: pointer; font-size: 1rem; transition: transform .2s, background .2s, border-color .2s; }
.lc-tema-btn:hover { transform: rotate(18deg) scale(1.06); border-color: var(--lc-link); }
.lc-tema-btn i { pointer-events: none; }
.lc-tema-flotante { position: fixed; top: 14px; right: 14px; z-index: 1000; margin: 0; box-shadow: 0 8px 20px -8px rgba(20,40,80,.45); }

/* ═══ Ventana modal de políticas ═══ */
.lc-sin-scroll { overflow: hidden !important; }
.lcl { position: fixed; inset: 0; z-index: 100005; display: grid; place-items: center; padding: 18px; background: rgba(8,18,40,.6); backdrop-filter: blur(5px); opacity: 0; transition: opacity .25s; }
.lcl[hidden] { display: none; }
.lcl.lc-on { opacity: 1; }
.lcl-caja { width: min(860px, 100%); height: min(88dvh, 780px); display: flex; flex-direction: column; background: var(--lc-surface); color: var(--lc-texto); border-radius: 20px; overflow: hidden; box-shadow: 0 40px 90px -24px rgba(0,0,0,.6); transform: translateY(18px) scale(.98); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.lcl.lc-on .lcl-caja { transform: none; }
.lcl-barra { display: flex; align-items: center; gap: 14px; padding: 14px 18px 10px 22px; }
.lcl-barra strong { font-size: 1.15rem; flex: 1; min-width: 0; }
.lcl-aparte { font-size: .85rem; font-weight: 700; color: var(--lc-link); text-decoration: none; white-space: nowrap; }
.lcl-aparte:hover { text-decoration: underline; }
.lcl-cerrar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--lc-surface-2); color: var(--lc-texto); font-size: 1.6rem; line-height: 1; cursor: pointer; flex: none; }
.lcl-cerrar:hover { background: var(--lc-borde); }
.lcl-tabs { display: flex; gap: 6px; padding: 0 18px 12px; overflow-x: auto; border-bottom: 1px solid var(--lc-borde); scrollbar-width: none; }
.lcl-tabs::-webkit-scrollbar { display: none; }
.lcl-tabs button { flex: none; border: 0; border-radius: 999px; padding: 9px 16px; background: var(--lc-surface-2); color: var(--lc-texto); font-weight: 700; font-size: .88rem; cursor: pointer; min-height: 40px; }
.lcl-tabs button.on { background: var(--lc-link); color: #fff; }
.lcl-cuerpo { flex: 1; overflow-y: auto; padding: 8px 26px 30px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.lcl-contenido { max-width: 70ch; margin: 0 auto; line-height: 1.7; font-size: 1rem; }
.lcl-contenido h2 { font-size: 1.15rem; font-weight: 800; margin: 26px 0 8px; color: var(--lc-texto); }
.lcl-contenido h3 { font-size: 1.02rem; font-weight: 700; margin: 18px 0 6px; }
.lcl-contenido p, .lcl-contenido li { color: var(--lc-texto); }
.lcl-contenido ul, .lcl-contenido ol { padding-left: 1.3rem; margin: 8px 0 14px; }
.lcl-contenido a { color: var(--lc-link); font-weight: 600; }
.lcl-contenido .subtitulo { color: var(--lc-muted); font-weight: 600; margin: 4px 0 12px; }
.lcl-contenido .rnc-box, .lcl-contenido [class*="box"] { background: var(--lc-surface-2); border: 1px solid var(--lc-borde); border-left: 4px solid var(--lc-link); border-radius: 12px; padding: 12px 16px; margin: 14px 0; }
.lcl-skel { display: grid; gap: 14px; padding-top: 18px; }
.lcl-skel i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--lc-surface-2) 25%, var(--lc-borde) 37%, var(--lc-surface-2) 63%) 0 0 / 400% 100%; animation: lcShimmer 1.3s ease infinite; }
.lcl-skel i:nth-child(odd) { width: 92%; } .lcl-skel i:nth-child(even) { width: 70%; }
@media (max-width: 640px) {
  .lcl { padding: 0; place-items: end center; }
  .lcl-caja { width: 100%; height: 94dvh; border-radius: 20px 20px 0 0; }
  .lcl-barra { padding: 12px 12px 8px 16px; } .lcl-aparte { display: none; }
  .lcl-cuerpo { padding: 6px 18px 28px; }
}

/* ═══ Menú móvil (cajón debajo de la cabecera, con botón X y scroll bloqueado) ═══ */
@media (max-width: 768px) {
  .header { z-index: 1100 !important; }
  .header .container { position: relative; z-index: 1102; }
  .nav { top: var(--lc-header-h, 72px) !important; bottom: auto !important; height: calc(100dvh - var(--lc-header-h, 72px)); padding: 4px 0 32px !important; gap: 0 !important; align-items: stretch !important; z-index: 1101 !important; background: var(--lc-surface) !important; box-shadow: 0 24px 40px -20px rgba(0,0,0,.35) !important; border-top: 1px solid var(--lc-borde); }
  .nav.active { animation: lcDrop .22s cubic-bezier(.2,.8,.2,1); }
  @keyframes lcDrop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
  .nav > a, .nav > .dropdown > .dropdown-toggle { display: flex !important; align-items: center; justify-content: space-between; width: 100%; padding: 17px 24px !important; font-size: 1.05rem; font-weight: 700; text-align: left; color: var(--lc-texto) !important; border-bottom: 1px solid var(--lc-borde); }
  .nav > a::after { display: none !important; }
  .nav > a:hover, .nav > a:active, .nav .dropdown-toggle:hover { background: var(--lc-surface-2); }
  .nav > .dropdown { width: 100%; }
  .nav .dropdown-toggle::after { margin-left: auto; transition: transform .2s; }
  .nav .dropdown-toggle.active::after { transform: rotate(180deg); }
  .nav .dropdown-menu { position: static !important; display: none; width: 100%; margin: 0 !important; padding: 4px 0 !important; border-radius: 0 !important; box-shadow: none !important; background: var(--lc-surface-2) !important; transform: none !important; opacity: 1 !important; visibility: visible !important; }
  .nav .dropdown-menu.active { display: block !important; }
  .nav .dropdown-menu a { display: block; padding: 14px 24px 14px 40px !important; border-radius: 0 !important; color: var(--lc-texto) !important; font-weight: 600; }
  .mobile-menu-btn { position: relative; z-index: 1103; min-width: 44px; min-height: 44px; }
}

/* Cabecera móvil: todo en una sola fila (logo · tema · carrito · menú · buscar · cuenta) */
@media (max-width: 768px) {
  .header .container { flex-wrap: nowrap !important; gap: 4px; }
  .lc-tema-btn { width: 36px; height: 36px; margin: 0 2px; font-size: .92rem; }
  .mobile-menu-btn { min-width: 40px !important; padding: 8px !important; }
  .search-toggle { margin-right: 2px !important; }
  .carrito-icono-link, .user-dropdown, .user-dropdown button { flex: none; }
}
