/* Página pública PAZELECTROS. --pri se define desde Ajustes (color principal). */
:root {
  --pri: #e30613; --tx: #15171b; --mut: #6b7280; --bg: #f5f6f8; --line: #e6e8ec; --ok: #0f8a4b; --wa: #25d366; --rad: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--tx); background: var(--bg); }
a { color: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { text-decoration: none; display: flex; align-items: center; }
.brand img { max-height: 44px; max-width: 180px; }
.brand-txt { font-weight: 900; font-size: 1.4rem; letter-spacing: .02em; color: var(--pri); }

.hero { background: linear-gradient(135deg, var(--pri), color-mix(in srgb, var(--pri) 55%, #000)); color: #fff; padding: 2.4rem 0 3.2rem; text-align: center; }
.hero h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 900; letter-spacing: .02em; }
.hero p { margin: .3rem 0 1.4rem; opacity: .92; font-size: 1.05rem; }
.search { max-width: 560px; margin: 0 auto; }
.search input { width: 100%; padding: .95rem 1.2rem; border-radius: 999px; border: 0; font: inherit; font-size: 1rem; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.search input:focus { outline: 3px solid rgba(255,255,255,.5); }

/* categories */
.chips { display: flex; gap: .5rem; overflow-x: auto; padding: 1.2rem 0 .4rem; margin-top: -1.6rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .5rem 1rem; font: inherit; font-size: .9rem; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.05); }
.chip.on { background: var(--tx); color: #fff; border-color: var(--tx); }

/* filtros */
.tools { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-end; padding: .8rem 0 0; }
.tools-top { margin-top: -1.6rem; }
.tools label { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; font-weight: 600; color: var(--mut); }
.tool-cuota { flex: 1 1 260px; max-width: 360px; }
.tool-in { display: flex; align-items: center; background: #fff; border: 2px solid var(--ok); border-radius: 12px; padding: 0 .8rem; }
.tool-in b { color: var(--ok); font-size: 1.1rem; }
.tool-in input { border: 0; outline: 0; font: inherit; font-size: 1.05rem; font-weight: 700; padding: .6rem .4rem; width: 100%; background: transparent; color: var(--tx); }
.tool-orden { margin-left: auto; }
.tool-orden select { font: inherit; font-size: .95rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--tx); }
@media (max-width: 520px) { .tool-cuota { max-width: none; flex-basis: 100%; } .tool-orden { margin-left: 0; flex: 1; } .tool-orden select { width: 100%; } }
.filtro-info { margin: .8rem 0 0; color: var(--ok); font-weight: 600; font-size: .9rem; }

/* grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; padding: 1rem 0 3rem; }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr 1fr; gap: .6rem; } }
.card { background: #fff; border-radius: var(--rad); overflow: hidden; border: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover, .card:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.09); outline: none; }
.ph { position: relative; aspect-ratio: 1; background: #fff; display: grid; place-items: center; padding: .8rem; border-bottom: 1px solid var(--line); }
.ph img { max-width: 100%; max-height: 100%; object-fit: contain; }
.noimg { color: var(--mut); font-size: .85rem; }
.badges { position: absolute; top: .6rem; left: .6rem; display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.badge { display: inline-block; background: var(--pri); color: #fff; font-size: .72rem; font-weight: 700; padding: .25rem .55rem; border-radius: 6px; text-transform: uppercase; letter-spacing: .03em; }
.badge-out { background: #4b5563; }
.badge-off { background: var(--ok); }
.ph-logo { opacity: .18; max-width: 60% !important; filter: grayscale(1); }
.add { position: absolute; top: .5rem; right: .5rem; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--tx); font-size: 1.3rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.1); display: grid; place-items: center; }
.add:hover { border-color: var(--wa); color: var(--ok); }
.add.on { background: var(--wa); border-color: var(--wa); color: #fff; font-size: 1rem; }
.agotado .ph img { opacity: .55; filter: grayscale(.6); }
.body { padding: .8rem .9rem 1rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.cat { color: var(--mut); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.body h2 { font-size: .98rem; font-weight: 600; margin: 0 0 .3rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.contado { font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.contado small { display: block; font-size: .7rem; font-weight: 600; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; }
.cuota { font-size: .9rem; color: var(--ok); margin-top: .2rem; }
.antes { color: var(--mut); font-size: .85rem; line-height: 1.2; }
.cuota-main small { display: block; font-size: .78rem; font-weight: 600; color: var(--mut); }
.cuota-main b { font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.cuota-main em { display: inline-block; margin-left: .35rem; font-style: normal; font-size: .72rem; font-weight: 700; color: #fff; background: var(--ok); padding: .1rem .4rem; border-radius: 5px; vertical-align: middle; }
.contado-sec { font-size: .85rem; color: var(--mut); margin-top: .15rem; }
.contado-sec b { color: var(--tx); }
.cuota em { font-style: normal; font-weight: 700; }
.more { font-size: .8rem; color: var(--pri); font-weight: 600; margin-top: auto; padding-top: .4rem; }
@media (max-width: 520px) { .cuota-main b { font-size: 1.15rem; } .cuota-main em { display: table; margin: .2rem 0 0; } .contado-sec { font-size: .78rem; } .contado { font-size: 1.15rem; } .body h2 { font-size: .88rem; } .cuota { font-size: .8rem; } }
.empty { text-align: center; color: var(--mut); padding: 3rem 1rem; }

/* dialog */
.dlg { border: 0; border-radius: 18px; padding: 0; width: min(900px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.dlg::backdrop { background: rgba(10,12,16,.6); }
.dlg-x { position: absolute; top: .5rem; right: .6rem; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #f1f2f4; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.dlg-in { display: grid; grid-template-columns: 1fr 1fr; }
.dlg-ph { background: #fff; display: grid; place-items: center; padding: 1.5rem; border-right: 1px solid var(--line); }
.dlg-ph img { max-width: 100%; max-height: 420px; object-fit: contain; }
.dlg-info { padding: 1.6rem 1.5rem; }
.dlg-info h2 { margin: .2rem 0 .8rem; font-size: 1.35rem; line-height: 1.25; padding-right: 2rem; }
.dlg-info .badge { position: static; display: inline-block; margin: 0 0 .8rem; }
.contado.big span { font-size: 2.1rem; }
.antes.big { font-size: 1rem; margin-bottom: .2rem; }
.antes.big .badge { margin: 0 0 0 .3rem; vertical-align: middle; }
.dlg-info h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); margin: 1.3rem 0 .4rem; }
.planes { width: 100%; border-collapse: collapse; }
.planes td { padding: .55rem .2rem; border-bottom: 1px solid var(--line); font-size: .95rem; }
.planes td.m { font-weight: 800; font-size: 1.1rem; text-align: right; white-space: nowrap; }
.planes td.t { color: var(--mut); font-size: .8rem; text-align: right; }
.planes tr.si td.t { color: var(--ok); font-weight: 700; }
.note { color: var(--mut); font-size: .8rem; margin: .5rem 0 0; }
.desc { white-space: pre-line; color: #374151; font-size: .95rem; }
@media (max-width: 720px) {
  .dlg-in { grid-template-columns: 1fr; }
  .dlg-ph { border-right: 0; border-bottom: 1px solid var(--line); padding: 1rem; }
  .dlg-ph img { max-height: 260px; }
}

/* buttons */
.btn-wa { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: var(--wa); color: #fff; text-decoration: none; font-weight: 700; padding: .85rem 1.3rem; border-radius: 999px; margin-top: 1rem; width: 100%; }
.btn-wa:hover { filter: brightness(.95); }
.btn-wa.sm { width: auto; margin: 0; padding: .5rem 1rem; font-size: .9rem; }
@media (max-width: 420px) { .btn-wa.sm span { display: none; } .btn-wa.sm { padding: .55rem; } }
.wa-float { position: fixed; right: 18px; bottom: 18px; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 30; }
.wa-float svg { width: 30px; height: 30px; }
.btn-out { display: inline-block; border: 1px solid rgba(255,255,255,.35); color: #fff; text-decoration: none; padding: .6rem 1rem; border-radius: 10px; font-weight: 600; }
.btn-out:hover { background: rgba(255,255,255,.08); }

.btn-sec { display: block; width: 100%; margin-top: .6rem; padding: .75rem 1rem; border-radius: 999px; border: 2px solid var(--wa); background: #fff; color: var(--ok); font: inherit; font-weight: 700; cursor: pointer; }
.btn-sec.on { background: #e9f9ef; }
.btn-link { display: block; margin: .8rem auto 0; background: none; border: 0; color: var(--mut); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; }

/* mi consulta */
.lista-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 40; display: flex; align-items: center; gap: .7rem; background: var(--tx); color: #fff; border: 0; border-radius: 999px; padding: .55rem .6rem .55rem .6rem; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.3); width: max-content; max-width: calc(100vw - 32px); }
.lb-n { background: var(--wa); color: #fff; min-width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; padding: 0 .5rem; }
.lb-go { background: var(--wa); padding: .45rem .9rem; border-radius: 999px; }
.con-lista .wa-float { display: none; }
.con-lista .foot { padding-bottom: 7rem; }
.dlg-lista { width: min(520px, calc(100vw - 24px)); }
.lista-in { padding: 1.5rem 1.4rem; }
.lista-in h2 { margin: 0 0 .3rem; }
.lista { list-style: none; padding: 0; margin: 1rem 0 0; max-height: 50vh; overflow-y: auto; }
.lista li { display: flex; align-items: center; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.lista img { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; background: #f3f4f6; flex: none; }
.lista li div { flex: 1; min-width: 0; }
.lista b { display: block; font-size: .95rem; }
.lista small { color: var(--mut); font-size: .8rem; }
.lista button { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #f1f2f4; font-size: 1.2rem; cursor: pointer; }
.lista-total { font-weight: 700; text-align: right; margin: .6rem 0 0; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 50; background: rgba(21,23,27,.92); color: #fff; padding: .6rem 1rem; border-radius: 10px; font-size: .9rem; }

/* footer */
.foot { background: #15171b; color: #c9cdd4; padding: 2rem 0 5rem; font-size: .92rem; }
.foot b { color: #fff; font-size: 1.1rem; display: block; margin-bottom: .5rem; }
.foot-in { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.foot-in div div { margin: .25rem 0; }
.foot-r { max-width: 420px; }
.legal { font-size: .78rem; color: #8b919b; margin-top: 1rem; }
