/* [KAI-HOME-V3] Estilos del home. Cargado por index.html. */

:root {
    --bg:            #FFFFFF;
    --ink-0:         #1A1613;
    --ink-1:         #2C2723;
    --ink-2:         #6B655F;
    --ink-3:         #9A948E;
    --card-bg:       #FFFFFF;
    --card-stroke:   rgba(26, 22, 19, 0.10);
    --brand-red:     #E85A3F;
    --shadow-sm:     0 1px 2px rgba(26, 22, 19, 0.04);
    --shadow-md:     0 4px 16px rgba(26, 22, 19, 0.08);
  }
  [data-theme="dark"] {
    --bg:            #0F0E0D;
    --ink-0:         #F5F0EA;
    --ink-1:         #E5DED4;
    --ink-2:         #A8A29A;
    --ink-3:         #6B655F;
    --card-bg:       #1A1815;
    --card-stroke:   rgba(245, 240, 234, 0.10);
    --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.20);
    --shadow-md:     0 4px 16px rgba(0, 0, 0, 0.35);
  }
  [data-theme="dark"] .card-featured { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.40), 0 2px 6px rgba(0, 0, 0, 0.30); }
  [data-theme="dark"] .card-small { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.25); }
  [data-theme="dark"] .card-small:active { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.25); }
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink-0); font-family: 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
  body { min-height: 100dvh; }
  .shell { position: relative; min-height: 100dvh; padding-bottom: 20px; }

  .top-fixed { position: sticky; top: 0; background: var(--bg); padding: 0 16px; padding-top: max(12px, env(safe-area-inset-top)); z-index: 40; }
  .top-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 6px; gap: 8px; }
  .top-mark { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 700; color: var(--brand-red); letter-spacing: -1px; line-height: 1; flex: 1; }
  .top-actions { display: flex; align-items: center; gap: 8px; }
  .top-theme { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--card-bg); border: 1px solid var(--card-stroke); border-radius: 50%; cursor: pointer; color: var(--ink-0); box-shadow: var(--shadow-sm); transition: transform 0.15s ease, box-shadow 0.15s ease; }
  .top-theme:active { transform: scale(0.94); box-shadow: 0 2px 6px rgba(26,22,19,0.10); }
  .top-theme svg { width: 20px; height: 20px; }
  .top-theme .ic-sun { display: none; }
  [data-theme="dark"] .top-theme .ic-sun { display: block; }
  [data-theme="dark"] .top-theme .ic-moon { display: none; }
  .top-cuenta { position: relative; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--card-bg); border: 1px solid var(--card-stroke); border-radius: 50%; cursor: pointer; color: var(--ink-0); box-shadow: var(--shadow-sm); transition: transform 0.15s ease, box-shadow 0.15s ease; }
  .top-cuenta:active { transform: scale(0.94); box-shadow: 0 2px 6px rgba(26,22,19,0.10); }
  .top-cuenta svg { width: 20px; height: 20px; }
  .top-cuenta__dot { position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: #22C55E; border: 2px solid var(--card-bg); }

  .hero { padding: 4px 0 12px; }
  .hero__title { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 700; color: var(--ink-0); letter-spacing: -0.5px; line-height: 1.1; margin: 0 0 6px; }
  .hero__title-acento { display: inline-block; border-bottom: 2px solid var(--brand-red); padding-bottom: 3px; }
  .hero__subtitle { font-size: 14px; color: var(--ink-2); margin: 6px 0 0; line-height: 1.4; }

  .chips-secciones { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 12px; scrollbar-width: none; }
  .chips-secciones::-webkit-scrollbar { display: none; }
  .chip-sec { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; background: var(--card-bg); border: 1px solid var(--card-stroke); border-radius: 999px; font-size: 11.5px; font-weight: 500; color: var(--ink-1); white-space: nowrap; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; flex-shrink: 0; box-shadow: var(--shadow-sm); }
  .chip-sec:active { transform: scale(0.96); box-shadow: 0 2px 6px rgba(26,22,19,0.10); }
  .chip-sec svg { width: 14px; height: 14px; }
  .chip-sec.active { background: var(--brand-red); color: #fff; border-color: var(--brand-red); box-shadow: 0 2px 8px rgba(232, 90, 63, 0.25); }

  .row-filtros { display: flex; align-items: center; gap: 8px; padding-bottom: 16px; }
  .filtro-ubicacion { flex: 1; display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--card-bg); border: 1px solid var(--card-stroke); border-radius: 999px; font-size: 12px; color: var(--ink-1); cursor: pointer; box-shadow: var(--shadow-sm); transition: transform 0.15s ease, box-shadow 0.15s ease; }
  .filtro-ubicacion:active { transform: scale(0.98); box-shadow: 0 2px 6px rgba(26,22,19,0.10); }
  .filtro-ubicacion svg { width: 14px; height: 14px; color: var(--brand-red); }
  .filtro-ubicacion__caret { margin-left: auto; color: var(--ink-3); }
  .filtro-btn { display: flex; align-items: center; gap: 5px; padding: 10px 14px; background: var(--card-bg); border: 1px solid var(--card-stroke); border-radius: 999px; font-size: 13px; color: var(--ink-1); cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); transition: transform 0.15s ease, box-shadow 0.15s ease; }
  .filtro-btn:active { transform: scale(0.98); box-shadow: 0 2px 6px rgba(26,22,19,0.10); }
  .filtro-btn svg { width: 14px; height: 14px; }
  .filtro-gps { width: 38px; height: 38px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--card-bg); border: 1px solid var(--card-stroke); border-radius: 50%; color: var(--brand-red); cursor: pointer; box-shadow: var(--shadow-sm); transition: transform 0.15s ease, box-shadow 0.15s ease; }
  .filtro-gps:active { transform: scale(0.94); box-shadow: 0 2px 6px rgba(26,22,19,0.10); }
  .filtro-gps svg { width: 16px; height: 16px; }

  .contenido { padding: 4px 16px 20px; }

  .card-featured { position: relative; background: var(--card-bg); border-radius: 18px; overflow: hidden; aspect-ratio: 5 / 4; box-shadow: 0 8px 24px rgba(26, 22, 19, 0.10), 0 2px 6px rgba(26, 22, 19, 0.06); cursor: pointer; margin-bottom: 20px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
  .card-featured:active { transform: scale(0.99); }
  .card-featured__img { position: absolute; inset: 0; background: var(--card-bg); }
  .card-featured__badge { position: absolute; top: 16px; left: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: rgba(255, 255, 255, 0.95); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--brand-red); }
  .card-featured__badge svg { width: 14px; height: 14px; }
  .card-featured__fav { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.95); border-radius: 50%; border: none; cursor: pointer; color: #1A1613; }
  .card-featured__fav svg { width: 20px; height: 20px; }
  .card-featured__body { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; color: #fff; background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%); }
  .card-featured__pin { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; opacity: 0.95; margin-bottom: 6px; }
  .card-featured__pin svg { width: 14px; height: 14px; }
  .card-featured__title { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 700; line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.3px; }
  .card-featured__desc { font-size: 14px; opacity: 0.9; margin: 0 0 16px; line-height: 1.4; }
  .card-featured__actions { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
  .card-featured__cta { display: inline-flex; align-items: center; gap: 6px; padding: 12px 20px; background: #fff; border-radius: 999px; color: #1A1613; font-size: 14px; font-weight: 600; border: none; cursor: pointer; }
  .card-featured__cta svg { width: 14px; height: 14px; }
  .card-featured__social { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #fff; opacity: 0.95; }
  .card-featured__faces { display: flex; }
  .card-featured__face { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.9); margin-left: -8px; background: linear-gradient(135deg, #a78bfa 0%, #ec4899 100%); }
  .card-featured__face:first-child { margin-left: 0; }

  .seccion-hdr { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
  .seccion-hdr h2 { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 700; color: var(--ink-0); margin: 0; letter-spacing: -0.3px; }
  .seccion-hdr a { font-size: 13px; color: var(--brand-red); text-decoration: none; font-weight: 500; }

  .grid-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
  .card-small { background: var(--card-bg); border-radius: 14px; overflow: hidden; box-shadow: 0 4px 14px rgba(26, 22, 19, 0.08), 0 1px 3px rgba(26, 22, 19, 0.05); cursor: pointer; position: relative; display: flex; flex-direction: column; transition: transform 0.2s ease, box-shadow 0.2s ease; }
  .card-small:active { transform: translateY(1px); box-shadow: 0 2px 8px rgba(26, 22, 19, 0.10), 0 1px 2px rgba(26, 22, 19, 0.06); }
  .card-small__img { aspect-ratio: 4 / 3; background: var(--card-bg); position: relative; }
  .card-small__tag { position: absolute; top: 8px; left: 8px; padding: 4px 10px; background: rgba(255,255,255,0.95); border-radius: 999px; font-size: 11px; font-weight: 500; color: #1A1613; }
  .card-small__fav { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.9); border-radius: 50%; border: none; cursor: pointer; color: #1A1613; }
  .card-small__fav svg { width: 15px; height: 15px; }
  .card-small__body { padding: 10px 12px 12px; }
  .card-small__title { font-family: 'Fraunces', serif; font-size: 15px; font-weight: 700; color: var(--ink-0); margin: 0 0 6px; line-height: 1.25; }
  .card-small__loc { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
  .card-small__loc svg { width: 12px; height: 12px; }
  .card-small__meta { display: flex; align-items: center; gap: 6px; font-size: 12px; }
  .card-small__rating { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-1); }
  .card-small__rating svg { width: 11px; height: 11px; color: #F5A623; }
  .card-small__dot { color: var(--ink-3); }
  .card-small__price { color: #16A34A; font-weight: 600; }

  .fab { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); right: 20px; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: var(--brand-red); border-radius: 50%; border: none; box-shadow: 0 4px 12px rgba(232, 90, 63, 0.35); color: #fff; cursor: pointer; z-index: 45; }
  .fab svg { width: 24px; height: 24px; }

  /* [KAI-HOME-V3-nav-v2] Estilos del viewSlot cuando una vista está montada. */
  #viewSlot { position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  body.view-active .shell > *:not(#viewSlot) { visibility: hidden; }
  body.view-active { overflow: hidden; }
