/* ==========================================================================
   Pharmafy · landing (secciones propias de la página de inicio)
   COFEPRIS, antes/después, pestañas, demo por rol, offline y barra fija.
   Se carga después de site-pro.css. Solo usa variables de tokens.css.
   ========================================================================== */
.lp-anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }
.lp-hero-calc { margin-top: 18px !important; font-size: 14.5px; color: var(--lp-soft); }
.lp-hero-calc a { color: var(--lp-accent-d) !important; font-weight: 700; }
.lp-kbd, .lp kbd { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--lp-line-2); border-bottom-width: 2px; background: var(--lp-card); font: 700 11px var(--font-mono); color: var(--lp-soft); }
.lp-search .lp-kbd { margin-left: auto; }
.lp code { font-family: var(--font-mono); font-size: .92em; padding: 1px 6px; border-radius: 6px; background: var(--fill); }
.lp-cart .rx { color: var(--lp-accent-d); font-size: 11px; font-weight: 700; }
.lp-cart .rx span { display: flex; align-items: center; gap: 5px; }
.lp-cart .rx svg { width: 13px; height: 13px; flex: none; }
.lp-band .it strong { white-space: nowrap; }
@media (max-width: 1020px) { .lp-band strong { font-size: 24px; } }

/* ---------- Antes y después ---------- */
.lp-ba { border: 1px solid var(--lp-line); border-radius: var(--lp-r); background: var(--lp-card); overflow: hidden; }
.lp-ba-head, .lp-ba-row { display: grid; grid-template-columns: 1fr 1fr; }
.lp-ba-head span { display: flex; align-items: center; gap: 8px; padding: 14px 22px; font-size: var(--fs-subhead); font-weight: 700; }
.lp-ba-head svg { width: 16px; height: 16px; }
.lp-ba-head .bad { color: var(--lp-red); background: var(--lp-red-tint); }
.lp-ba-head .good { color: var(--lp-accent-d); background: var(--lp-tint); }
.lp-ba-row { border-top: 1px solid var(--lp-line); }
.lp-ba-row > div { padding: 18px 22px; display: grid; gap: 4px; align-content: start; }
.lp-ba-row .bad { color: var(--lp-soft); }
.lp-ba-row .bad b { color: var(--lp-ink); text-decoration: line-through; text-decoration-color: var(--lp-red); text-decoration-thickness: 1.5px; }
.lp-ba-row .good { border-left: 1px solid var(--lp-line); }
.lp-ba-row .good b { color: var(--lp-accent-d); }
.lp-ba-row b { font-size: 16px; letter-spacing: -.01em; }
.lp-ba-row p { font-size: 14.5px; line-height: 1.55; }
.lp-ba-row .good p { color: var(--lp-ink); }
@media (max-width: 720px) {
  .lp-ba-head { display: none; }
  .lp-ba-row { grid-template-columns: 1fr; }
  .lp-ba-row .good { border-left: 0; border-top: 1px dashed var(--lp-line-2); background: var(--lp-tint); }
  .lp-ba-row .bad::before, .lp-ba-row .good::before { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
  .lp-ba-row .bad::before { content: "Antes"; color: var(--lp-red); }
  .lp-ba-row .good::before { content: "Con Pharmafy"; color: var(--lp-accent-d); }
}

/* ---------- Blindaje COFEPRIS (sobre .lp-dark) ---------- */
.lp-cof-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 16px; }
.lp-cof-score { padding: 28px; border-radius: 24px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .10); display: grid; gap: 14px; align-content: start; }
.lp-cof-score h3 { font-size: 22px; color: #fff; }
.lp-cof-score > p { color: #A9CBBE; font-size: 14.5px; line-height: 1.55; }
.lp-ring { position: relative; width: 148px; height: 148px; }
.lp-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.lp-ring circle { fill: none; stroke-width: 10; }
.lp-ring .tr { stroke: rgba(255, 255, 255, .10); }
.lp-ring .fg { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: var(--p) 100; }
.lp-ring .v { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.lp-ring strong { font-size: 34px; color: #fff; letter-spacing: -.03em; line-height: 1; }
.lp-ring strong small { font-size: 15px; color: #9CE6CD; font-weight: 600; }
.lp-ring span { font-size: 11.5px; color: #A9CBBE; font-weight: 600; margin-top: 4px; }
.lp-pend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lp-pend li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; color: #E3F3ED; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); }
.lp-pend svg { width: 16px; height: 16px; flex: none; }
.lp-pend .ok svg { color: var(--brand); }
.lp-pend .warn svg { color: var(--sys-orange); }
.lp-cof-score .lp-cof-note { font-size: 12px; color: #7FA699; }
.lp-cof-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lp-cof-cards .lp-s { padding: 22px; }
.lp-cof-cards .lp-s h3 { font-size: 17px; line-height: 1.25; }
.lp-cof-cards .lp-s p { font-size: 14px; }
.lp-cof-strip { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 14px 18px; border-radius: 18px; border: 1px dashed rgba(255, 255, 255, .18); font-size: 14px; font-weight: 600; color: #CFE8DF; }
.lp-cof-strip > span { display: inline-flex; align-items: center; gap: 8px; }
.lp-cof-strip svg { width: 17px; height: 17px; color: #9CE6CD; }
.lp .lp-cof-strip .b { margin-left: auto; background: var(--brand); color: var(--brand-ink) !important; border-color: transparent; }
.lp .lp-cof-strip .b svg { color: inherit; width: 15px; height: 15px; }
@media (max-width: 960px) { .lp-cof-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .lp-cof-cards { grid-template-columns: 1fr; } .lp .lp-cof-strip .b { margin-left: 0; } }

/* ---------- Pestañas de funciones ---------- */
.lp-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--fill); width: fit-content; max-width: 100%; margin-bottom: 18px; }
.lp-tabs button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--lp-soft); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.lp-tabs button svg { width: 16px; height: 16px; }
.lp-tabs button[aria-selected="true"] { background: var(--lp-card); color: var(--lp-ink); box-shadow: 0 0 0 .5px var(--lp-line-2), 0 1px 3px rgba(0, 0, 0, .10); }
.lp-tabs button[aria-selected="true"] svg { color: var(--lp-accent-d); }
.lp-tabs button:focus-visible { outline: none; box-shadow: var(--ring); }
.lp-panel { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 28px; padding: 32px; border-radius: 28px; border: 1px solid var(--lp-line); background: var(--lp-card); align-items: center; }
.lp-panel[hidden] { display: none; }
.lp-panel .txt { display: grid; gap: 14px; align-content: start; }
.lp-panel h3 { font-size: clamp(22px, 2.6vw, 30px); }
.lp-panel .txt > p { color: var(--lp-soft); font-size: 16px; line-height: 1.6; }
.lp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14.5px; font-weight: 600; }
.lp-list li { position: relative; padding-left: 27px; line-height: 1.45; }
.lp-list li::before { content: ""; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: var(--lp-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F8466' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat; }
.lp .lp-link { font-weight: 700; color: var(--lp-accent-d); font-size: 15px; }
.lp-viz .lp-mini { margin: 0; padding: 16px; font-size: 13px; gap: 10px; }
.lp-viz .lp-mini .r { padding-bottom: 8px; border-bottom: 1px solid var(--lp-line); }
.lp-viz .lp-mini .r:last-child, .lp-viz .lp-mini .r:has(+ .lp-dots) { border-bottom: 0; padding-bottom: 0; }
.lp-viz .lp-search { background: var(--lp-card); color: var(--lp-ink); }
.lp-mini .lot span:first-child { display: flex; align-items: center; gap: 8px; }
.lp-mini .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lp-accent); flex: none; }
.lp-mini .dot.a { background: var(--lp-amber); } .lp-mini .dot.r { background: var(--lp-red); } .lp-mini .dot.q { background: var(--sys-gray); }
.lp-doc { border-radius: 14px; border: 1px solid var(--lp-line-2); background: var(--lp-card); box-shadow: var(--sh-2); padding: 18px; display: grid; gap: 10px; font-size: 13px; }
.lp-doc .h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding-bottom: 10px; border-bottom: 2px solid var(--lp-ink); }
.lp-doc .h b { display: block; font-size: 14.5px; }
.lp-doc .h small { color: var(--lp-faint); }
.lp-doc .folio { font: 700 12px var(--font-mono); color: var(--lp-accent-d); background: var(--lp-tint); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.lp-doc .r { display: flex; justify-content: space-between; color: var(--lp-soft); font-weight: 600; }
.lp-doc .r b { color: var(--lp-ink); }
.lp-doc .r b.neg { color: var(--lp-red); }
.lp-doc .sig { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.lp-doc .sig span { border-top: 1px solid var(--lp-line-2); padding-top: 5px; text-align: center; font-size: 11px; color: var(--lp-faint); }
.lp-doc .hash { display: flex; align-items: center; gap: 7px; font: 600 11px var(--font-mono); color: var(--lp-soft); background: var(--fill); padding: 7px 9px; border-radius: 8px; overflow-wrap: anywhere; }
.lp-doc .hash svg { width: 13px; height: 13px; flex: none; color: var(--lp-accent-d); }
@media (max-width: 860px) {
  .lp-panel { grid-template-columns: 1fr; padding: 22px; }
  .lp-tabs { border-radius: 18px; width: 100%; }
  .lp-tabs button { flex: 1 1 calc(50% - 4px); justify-content: center; padding: 0 10px; }
}
@media (max-width: 420px) { .lp-tabs button { flex-basis: 100%; } }

/* ---------- Demo por rol ---------- */
.lp-roles { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; align-items: center; padding: 32px; border-radius: 28px; background: var(--lp-tint); border: 1px solid var(--lp-line); }
.lp-roles h2 { font-size: clamp(28px, 3.4vw, 40px); }
.lp-roles .txt p { margin-top: 12px; color: var(--lp-soft); font-size: 16px; line-height: 1.6; }
.lp-roles .grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lp-roles .grid a { display: grid; gap: 2px; padding: 14px; border-radius: 16px; background: var(--lp-card); border: 1px solid var(--lp-line); text-decoration: none; transition: border-color var(--dur-1) var(--ease), transform var(--dur-2) var(--ease); }
.lp-roles .grid a:hover { border-color: var(--lp-accent); transform: translateY(-2px); }
.lp-roles .grid a:focus-visible { outline: none; box-shadow: var(--ring); }
.lp-roles .grid svg { width: 20px; height: 20px; color: var(--lp-accent-d); margin-bottom: 6px; }
.lp-roles .grid b { font-size: 14.5px; }
.lp-roles .grid small { font-size: 12px; color: var(--lp-soft); }
@media (max-width: 960px) { .lp-roles { grid-template-columns: 1fr; padding: 24px; } }
@media (max-width: 560px) { .lp-roles .grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Offline y equipo ---------- */
.lp-off { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.lp-off h2 { font-size: clamp(30px, 4vw, 48px); }
.lp-off .lead { margin: 16px 0 20px; font-size: 18px; line-height: 1.6; color: var(--lp-soft); }
.lp-timeline { display: grid; padding: 22px; border-radius: 24px; border: 1px solid var(--lp-line); background: var(--lp-card); box-shadow: var(--lp-sh-lg); }
.lp-timeline .ev { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.lp-timeline .ev:last-child { padding-bottom: 0; }
.lp-timeline .ev:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: 2px; width: 2px; background: var(--lp-line); }
.lp-timeline .ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--fill); color: var(--lp-soft); }
.lp-timeline .ic svg { width: 18px; height: 18px; }
.lp-timeline .bad .ic { background: var(--lp-amber-tint); color: var(--lp-amber); }
.lp-timeline .good .ic { background: var(--lp-tint); color: var(--lp-accent-d); }
.lp-timeline .ev > span:last-child { font-size: 14px; color: var(--lp-soft); line-height: 1.45; padding-top: 1px; }
.lp-timeline b { display: block; color: var(--lp-ink); font-size: 15px; }
.lp-hw { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 36px; }
.lp-hw .it { display: grid; gap: 4px; align-content: start; padding: 16px; border-radius: 18px; border: 1px solid var(--lp-line); background: var(--lp-card); }
.lp-hw svg { width: 22px; height: 22px; color: var(--lp-accent-d); margin-bottom: 6px; }
.lp-hw b { font-size: 14px; line-height: 1.3; }
.lp-hw small { font-size: 12.5px; color: var(--lp-soft); }
@media (max-width: 960px) { .lp-off { grid-template-columns: 1fr; gap: 28px; } .lp-hw { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lp-hw { grid-template-columns: 1fr 1fr; } }

/* ---------- Calculadora, preguntas, cierre ---------- */
.lp .lp-calc .note a { color: #9CE6CD; font-weight: 700; }
.lp-faq-more { text-align: center; margin-top: 20px !important; color: var(--lp-soft); }
.lp .lp-faq-more a { color: var(--lp-accent-d); font-weight: 700; }
.lp-final .lp-kicker { color: #9CE6CD; margin: 0; }
.lp-final-steps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.lp-final-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); font-size: 14px; font-weight: 600; color: #E3F3ED; }
.lp-final-steps b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-size: 12.5px; }

/* ---------- Barra fija de llamado a la acción (celular) ---------- */
.lp-sticky { display: none; }
@media (max-width: 760px) {
  .lp-sticky { display: flex; gap: 8px; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60; padding: 8px; border-radius: 999px; background: var(--material-pop); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--lp-line-2); box-shadow: var(--sh-3); transform: translateY(160%); transition: transform var(--dur-3) var(--ease-out); }
  .lp-sticky.on { transform: none; }
  .lp .lp-sticky .b { height: 44px; flex: 1; padding: 0 12px; }
  .lp .lp-sticky .b.acc { flex: 2; }
  .lp-foot { padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) { .lp-sticky { transition: none; } .lp-roles .grid a:hover { transform: none; } }
