:root { --accent: #e85d2a; --ink: #1d2330; --muted: #6b7280; --line: #e5e7eb; --bg: #f6f7f9; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; background: var(--bg); color: var(--ink); padding-bottom: 90px; }
a { color: var(--accent); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; width: 100%; padding: 10px 12px; border: 1px solid #d5d9e0; border-radius: 10px; background: #fff; color: var(--ink); margin-top: 4px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.muted { color: var(--muted); font-size: 14px; }
.cargando, .vacio { text-align: center; padding: 40px 16px; color: var(--muted); }

/* Todo el contenido usa el mismo ancho centrado, para que cabecera, portada, productos y pie queden alineados. */
.contenedor { max-width: 1100px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.top { position: sticky; top: 0; z-index: 5; background: var(--accent); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.top-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 58px; }
.marca { display: flex; align-items: center; gap: 10px; font-size: 18px; min-width: 0; }
.marca img { height: 38px; max-width: 90px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; }
.marca b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acciones { display: flex; gap: 6px; }
.horario { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.hero .aviso { margin: 10px 0 0; }
.gate { max-width: 460px; margin: 30px auto; padding: 28px 20px; background: #fff; border: 1px solid var(--line); border-radius: 16px; text-align: center; }
.gate .big { font-size: 48px; }
.gate h1 { font-size: 22px; margin: 6px 0; }
.gate-acc { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.nota-desp { margin: -2px 0 6px 26px; font-size: 13px; }
.link { background: rgba(255,255,255,.15); border: 0; color: #fff; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
/* Portada: bienvenida y "cómo compro" en una tarjeta */
.hero { padding-top: 18px; }
.hero-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; border-top: 4px solid var(--accent); }
.bienvenida { font-size: 24px; margin: 0 0 4px; line-height: 1.2; }
.bienvenida-txt { margin: 0; color: #4b5563; font-size: 15px; }
.datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 16px; }
.dato { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.dato-ic { font-size: 20px; line-height: 1.2; }
.dato b { display: block; font-size: 14px; }
.dato small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 1px; }
.hero .aviso { margin: 14px 0 0; }
.grid .vacio { grid-column: 1 / -1; }
.titulo-sec { font-size: 18px; margin: 8px 0 10px; }
.titulo-sec small { font-size: 13px; font-weight: 600; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; }

.filtros { position: sticky; top: 58px; z-index: 4; background: var(--bg); padding: 12px 0 6px; }
.filtros input { margin: 0; font-size: 16px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.cats { display: flex; gap: 6px; overflow-x: auto; padding-top: 8px; scrollbar-width: none; }
.cats button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.cats button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; padding-bottom: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 8px 24px rgba(16,24,40,.08); transform: translateY(-1px); }
.card.agotado { opacity: .6; }
.fotob { position: relative; padding: 0; border: 0; background: none; display: block; }
.pimg { width: 100%; aspect-ratio: 1; object-fit: cover; display: flex; align-items: center; justify-content: center; background: #f1f1f1; }
.ph { font-size: 36px; font-weight: 800; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, #fff); }
.tag { position: absolute; top: 8px; left: 8px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.tag.ama { background: #facc15; color: #1d2330; }
.tag.gris { background: #6b7280; }
.cuerpo { padding: 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cuerpo h3 { font-size: 14px; font-weight: 600; margin: 0; flex: 1; }
.precio { font-size: 18px; font-weight: 800; }
.btn { display: block; width: 100%; text-align: center; text-decoration: none; background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 9px 12px; font-weight: 600; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.grande { padding: 13px; font-size: 16px; margin-top: 10px; }
.btn.sec { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.wa { background: #25d366; }
.step { display: flex; align-items: center; justify-content: space-between; border: 2px solid var(--accent); border-radius: 10px; }
.step button { border: 0; background: none; color: var(--accent); font-size: 20px; font-weight: 700; width: 40px; height: 36px; }
.step button:disabled { opacity: .3; }
.step span { font-weight: 700; }
.cartbtn { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 6; border: 0; border-radius: 999px; padding: 14px 22px; background: var(--ink); color: #fff; font-size: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); white-space: nowrap; max-width: calc(100% - 32px); }

dialog { border: 0; border-radius: 16px; padding: 20px; width: min(520px, calc(100% - 24px)); max-height: calc(100% - 24px); position: relative; }
dialog::backdrop { background: rgba(15,20,30,.55); }
dialog h2 { margin: 0 0 12px; font-size: 20px; }
.x { position: absolute; top: 10px; right: 10px; border: 0; background: #f1f1f1; border-radius: 999px; width: 32px; height: 32px; }
.dimg { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 12px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; aspect-ratio: 4/3; }
.linea { display: grid; grid-template-columns: 48px 1fr 110px 70px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mini { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.ln b { display: block; font-size: 14px; }
.ln small { color: var(--muted); }
.lt { text-align: right; }
.tot { display: flex; justify-content: space-between; padding: 6px 0; }
.tot:empty { display: none; }
.tot.grande { font-size: 20px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; }
.aviso { background: #fff4e5; color: #8a4b00; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 4px; margin: 0 0 12px; }
legend { font-weight: 700; font-size: 14px; padding: 0 4px; }
.op { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: 15px; padding: 6px 0; margin: 0; }
.op input { width: auto; margin: 0; accent-color: var(--accent); }
.op small { color: var(--muted); }
.mapa { height: 240px; border-radius: 10px; border: 1px solid var(--line); margin-top: 4px; z-index: 0; }
.mapa-acc { display: flex; gap: 6px; margin-top: 6px; }
.mapa-acc button { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px; font-size: 14px; }
.mapa-msg { font-size: 13px; color: var(--muted); margin: 6px 0; }
.ok { text-align: center; }
.ok .big { font-size: 48px; }
.transf { background: #f1f5f9; border-radius: 12px; padding: 12px; margin: 12px 0; }
.transf pre { white-space: pre-wrap; font: inherit; margin: 6px 0; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; background: #f1f1f1; padding: 4px; border-radius: 10px; }
.tabs button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 8px; }
.tabs button.on { background: #fff; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.ped { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ped .r { text-align: right; white-space: nowrap; }
.est { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: #fff7d6; }
.est.entregado { background: #dcf7e3; } .est.cancelado { background: #eee; } .est.confirmado { background: #ede9fe; }
.debe { color: #b91c1c; }
.pie { background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 24px 0 18px; margin-top: 12px; }
.pie-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.pie-col h4 { margin: 0 0 8px; color: var(--ink); font-size: 14px; }
.pie-col div { margin: 4px 0; }
.pie-col a { text-decoration: none; }
.pie-col a:hover { text-decoration: underline; }
.pie-legal { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; font-size: 13px; text-align: center; }
/* Páginas sin el pie de la tienda (portada de la plataforma, legales) */
body > .pie { text-align: center; background: none; border: 0; }

/* Páginas legales */
.legal { max-width: 760px; margin: 0 auto; padding: 20px 16px; background: #fff; }
.legal h1 { font-size: 24px; margin: 0 0 4px; }
.legal h2 { font-size: 17px; margin: 22px 0 6px; }
.legal li { margin: 4px 0; }
.politica { background: var(--bg); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 6px; margin-bottom: 10px; }
.top a.link { text-decoration: none; }
.legalnota { font-size: 12px; color: var(--muted); text-align: center; margin: 8px 0 0; }

/* Portada de la plataforma (ventasvarias.cl) */
body.lp { padding-bottom: 0; background: #fff; }
.lp-top { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.lp-marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 18px; }
.lp-marca img { border-radius: 9px; }
.lp-nav { display: flex; align-items: center; gap: 18px; }
.lp-nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.lp-nav a:hover { color: var(--accent); }
.lp-nav .lp-acceso { background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 999px; }
.lp-nav .lp-acceso:hover { color: #fff; opacity: .9; }
.lp-hero { background: linear-gradient(135deg, #fff4ec 0%, #ffe3d3 100%); padding: 64px 0 56px; }
.lp-hero h1 { font-size: 44px; line-height: 1.1; margin: 0 0 14px; letter-spacing: -.02em; }
.lp-hero p { font-size: 18px; color: #4b5563; max-width: 600px; margin: 0; }
.lp-cta { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.lp-cta .btn { width: auto; padding: 13px 22px; font-size: 16px; }
.lp-sec { padding-top: 48px; padding-bottom: 8px; }
#tiendas, #comercios { scroll-margin-top: 60px; }
.lp-sec > h2 { font-size: 28px; margin: 0 0 18px; letter-spacing: -.01em; }
.lp-sub { color: #4b5563; font-size: 17px; margin: -8px 0 22px; max-width: 700px; }
.lp-pasos { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.lp-pasos > div { background: var(--bg); border-radius: 16px; padding: 20px; }
.lp-pasos span { display: inline-flex; width: 34px; height: 34px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 800; align-items: center; justify-content: center; }
.lp-pasos b { display: block; font-size: 17px; margin: 10px 0 4px; }
.lp-pasos p { margin: 0; color: #4b5563; }
.tiendas { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tcard { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--accent); border-radius: 14px; padding: 18px; text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s; }
.tcard:hover { box-shadow: 0 10px 28px rgba(16,24,40,.1); transform: translateY(-2px); }
.tcard img { height: 48px; max-width: 120px; object-fit: contain; align-self: flex-start; }
.tcard .tini { width: 48px; height: 48px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 24px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tcard b { font-size: 17px; }
.tcard small { color: var(--muted); flex: 1; }
.tcard-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tcard-chips span { font-size: 12px; background: var(--bg); border-radius: 999px; padding: 2px 9px; }
.tcard-ir { color: var(--accent); font-weight: 600; font-size: 14px; margin-top: 4px; }
.lp-comercios { background: var(--ink); color: #fff; margin-top: 48px; padding-bottom: 48px; }
.lp-comercios .lp-sub { color: #c4cad6; }
.lp-func { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.lp-f { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 18px; }
.lp-f span { font-size: 26px; }
.lp-f b { display: block; margin: 8px 0 4px; font-size: 16px; }
.lp-f p { margin: 0; color: #c4cad6; font-size: 14px; line-height: 1.5; }
.lp-cta-box { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 24px; background: var(--accent); border-radius: 16px; padding: 20px 24px; }
.lp-cta-box b { font-size: 19px; }
.lp-cta-box p { margin: 4px 0 0; opacity: .9; }
.lp-cta-box .btn { width: auto; background: #fff; color: var(--ink); padding: 12px 22px; }
.lp-faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.lp-faq summary { cursor: pointer; font-weight: 600; font-size: 16px; }
.lp-faq p { margin: 8px 0 0; color: #4b5563; }
.lp-pie { margin-top: 48px; border-top: 1px solid var(--line); background: var(--bg); padding: 26px 0; color: var(--muted); font-size: 14px; }
.lp-pie .contenedor { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lp-pie b { color: var(--ink); }
.lp-pie-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) {
  .lp-nav a:not(.lp-acceso) { display: none; }
  .lp-hero { padding: 40px 0 36px; }
  .lp-hero h1 { font-size: 32px; }
  .lp-hero p { font-size: 16px; }
  .lp-sec > h2 { font-size: 23px; }
}

@media (max-width: 480px) {
  .contenedor { padding-left: 12px; padding-right: 12px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero-card { padding: 16px; }
  .bienvenida { font-size: 21px; }
  .datos { grid-template-columns: 1fr; gap: 8px; }
  .linea { grid-template-columns: 40px 1fr 100px; }
  .linea .lt { display: none; }
  .row { flex-direction: column; gap: 0; }
}

/* Precios en la portada */
.lp-precios { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 28px; align-items: start; margin-top: 18px; }
.lp-plan { background: #fff; border: 2px solid var(--accent, #e85d2a); border-radius: 20px; padding: 26px; box-shadow: 0 14px 40px rgba(232, 93, 42, .14); display: grid; gap: 10px; position: relative; }
.lp-promo { position: absolute; top: -13px; left: 22px; background: var(--accent, #e85d2a); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; letter-spacing: .3px; }
.lp-plan h3 { margin: 4px 0 0; font-size: 20px; }
.lp-monto { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lp-monto s { color: #9ca3af; font-size: 18px; }
.lp-monto b { font-size: 44px; line-height: 1; color: var(--ink, #1d2330); }
.lp-monto span { color: #6b7280; font-size: 14px; }
.lp-gratis { background: #ecfdf5; color: #065f46; border-radius: 10px; padding: 8px 12px; margin: 0; }
.lp-plan ul { list-style: none; padding: 0; margin: 4px 0 6px; display: grid; gap: 6px; }
.lp-plan li { padding-left: 26px; position: relative; font-size: 15px; }
.lp-plan li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: #dcfce7; color: #166534; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.lp-plan .btn { text-align: center; font-size: 17px; padding: 14px; }
.lp-plan small { color: #6b7280; text-align: center; }
.lp-plan-info { display: grid; gap: 14px; }
.lp-plan-info > div { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 14px 16px; }
.lp-plan-info p { margin: 4px 0 0; color: #4b5563; }
.lp-plan-info .lp-ayuda { background: #fff7f3; border-color: #fed7c3; }
@media (max-width: 760px) { .lp-precios { grid-template-columns: 1fr; } .lp-monto b { font-size: 38px; } }

/* Productos exclusivos e invitaciones */
.tag.excl { background: #1d2330; color: #fff; }
.aviso.excl { background: #f5f3ff; border-color: #ddd6fe; color: #4c1d95; }
.aviso.ok-inv { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
