/* ═══════════════════════════════════════════════
   JUSTQRO · Mis favoritos (plano, stands, obras y catálogo)
═══════════════════════════════════════════════ */

/* Corazón */
.fav-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: var(--white); color: var(--blue); cursor: pointer; box-shadow: 0 2px 10px rgba(16, 40, 130, 0.18); -webkit-tap-highlight-color: transparent; flex: none; }
.fav-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; transition: fill .15s, transform .15s; }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }
.fav-btn:hover svg { transform: scale(1.08); }
.fav-btn.is-pop svg { animation: fav-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes fav-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
.fav-btn--line { box-shadow: none; border: 1.5px solid currentColor; background: transparent; width: 40px; height: 40px; }
.fav-btn--blue { background: var(--blue); color: var(--white); }
.fav-btn--sm { width: 36px; height: 36px; }
.fav-btn--sm svg { width: 18px; height: 18px; }

/* Botón con texto (stand y ficha de obra) */
.fav-tag { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; font: 700 13px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; }

/* Corazón en el plano */
.pl-st__fav { display: none; fill: #ff2d55; stroke: var(--white); stroke-width: 1.5; pointer-events: none; }
.pl-st.has-fav .pl-st__fav { display: inline; }
.pl-st.has-fav > rect:first-child { stroke-width: 3.5; }

/* Botón flotante */
.fav-fab { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px 13px 16px; border: 0; border-radius: 999px; background: var(--blue); color: var(--white); font: 700 14px/1 var(--font); letter-spacing: .06em;
  box-shadow: 0 8px 28px rgba(16, 40, 130, 0.35); cursor: pointer; white-space: nowrap; }
.fav-fab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.fav-fab.is-full svg { fill: #ff2d55; stroke: #ff2d55; }
.fav-fab .fav-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--white); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.fav-fab.is-pop { animation: fab-pop .4s ease; }
@keyframes fab-pop { 50% { transform: translateX(-50%) scale(1.08); } }
.pl main, .lb main { padding-bottom: 96px; }

/* Ventanas */
.fav-lock, .fav-lock body { overflow: hidden; }
.fav-dlg { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.fav-dlg[hidden] { display: none; }
.fav-dlg__scrim { position: absolute; inset: 0; background: rgba(8, 20, 70, 0.55); }
.fav-dlg__card { position: relative; width: 100%; max-width: 520px; max-height: 92svh; overflow: auto; background: var(--white); color: var(--blue);
  padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; animation: fav-up .28s ease-out; }
@keyframes fav-up { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 700px) { .fav-dlg { align-items: center; } .fav-dlg__card { border-radius: 18px; padding: 34px 34px 30px; } }
.fav-dlg__x { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; border: 0; background: none; color: inherit; font-size: 28px; line-height: 1; cursor: pointer; }
.fav-dlg h2 { font-size: 30px; line-height: 1; font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em; padding-right: 36px; }
.fav-dlg h2 .lt { font-weight: 300; }
.fav-dlg .label { margin-bottom: 12px; }

/* Onboarding */
.fav-on__hero { margin: -26px -20px 20px; padding: 26px 20px 22px; background: var(--blue); color: var(--white); border-radius: 18px 18px 0 0; }
@media (min-width: 700px) { .fav-on__hero { margin: -34px -34px 24px; padding: 34px 34px 26px; } }
.fav-steps { list-style: none; display: grid; gap: 12px; margin-top: 18px; counter-reset: s; }
.fav-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; font-size: 15px; line-height: 1.35; }
.fav-steps i { width: 34px; height: 34px; border-radius: 50%; background: var(--white); color: var(--blue); display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; }
.fav-steps i svg { width: 18px; height: 18px; fill: #ff2d55; }

/* Formulario */
.fav-form__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fav-form__fields[hidden] { display: none; }
.fav-form label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.fav-form label.full, .fav-form .fav-check { grid-column: 1 / -1; }
.fav-form input[type=text], .fav-form input[type=email] { display: block; width: 100%; margin-top: 6px; padding: 13px 12px; font: 400 17px/1.2 var(--font); color: var(--blue);
  border: 1.5px solid rgba(31, 78, 245, 0.4); border-radius: 8px; background: var(--white); -webkit-appearance: none; }
.fav-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 78, 245, 0.18); }
.fav-check { display: flex !important; gap: 10px; align-items: flex-start; text-transform: none !important; letter-spacing: 0 !important; font-weight: 400 !important; font-size: 14px !important; line-height: 1.4; margin-top: 4px; }
.fav-check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--blue); flex: none; }
.fav-legal { margin-top: 12px; font-size: 12px; line-height: 1.45; color: rgba(31, 78, 245, 0.8); }
.fav-hp { position: absolute; left: -9999px; }
.fav-actions { display: grid; gap: 10px; margin-top: 18px; }
.fav-actions .btn { justify-content: center; width: 100%; background: var(--blue); color: var(--white); border-color: var(--blue); }
.fav-link { background: none; border: 0; color: inherit; font: 600 14px/1.2 var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 10px; }
.fav-msg { margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: rgba(255, 45, 85, 0.1); font-size: 14px; line-height: 1.4; }
.fav-msg.is-ok { background: rgba(31, 78, 245, 0.1); font-weight: 600; }

/* Panel: lista */
.fav-hi { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 10px 0 4px; font-size: 15px; }
.fav-hi small { opacity: .75; }
.fav-empty { margin: 16px 0; font-size: 15px; line-height: 1.5; }
.fav-list { list-style: none; margin-top: 14px; display: grid; gap: 16px; }
.fav-grp__c { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding-bottom: 6px; border-bottom: 1px solid rgba(31, 78, 245, 0.2); margin-bottom: 4px; }
.fav-it { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 6px 0; }
.fav-it__a { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; text-decoration: none; min-width: 0; }
.fav-it__a img, .fav-it__ph { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; background: rgba(31, 78, 245, 0.08); }
.fav-it__ph { display: flex; align-items: center; justify-content: center; font-weight: 700; }
.fav-it__t { min-width: 0; display: grid; line-height: 1.25; }
.fav-it__t small { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.fav-it__t b, .fav-it__t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-it__t span { font-size: 13px; opacity: .85; }
.fav-it__x { width: 36px; height: 36px; border: 0; background: none; color: inherit; font-size: 22px; cursor: pointer; opacity: .6; }
.fav-send { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(31, 78, 245, 0.2); }
.fav-send[hidden] { display: none; }
.fav-send h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.fav-send p { font-size: 14px; line-height: 1.45; margin-bottom: 12px; }
.fav-fab[hidden] { display: none; }
.pl-st.has-fav > rect:first-child { fill: #ffe6ec; }
a.pl-st.has-fav:hover > rect:first-child, a.pl-st.has-fav.is-active > rect:first-child { fill: var(--blue); }

/* Onboarding después de marcar un favorito sin datos: más corto */
.fav-dlg.is-again .fav-steps { display: none; }
