/*
 * Páginas públicas de Ventas y Promos de soypool.com (issue #654).
 * Estilo del sitio: títulos en Montserrat 700/800, texto en Source Sans,
 * morado #7A20FF, botones blancos con texto morado y radio 5 px.
 * Tarjetas IGUALES a las de la app; solo cambia el número de columnas:
 * 2 (< 768 px), 3 (768-1.099 px) y 5 (≥ 1.100 px).
 */

:root {
  --pp-morado: #7A20FF;
  --pp-morado-2: #9C4DFF;
  --pp-morado-oscuro: #5B18C9;
  --pp-texto: #1A1A1A;
  --pp-gris: #78707F;
  --pp-borde-venta: #E6E6EC;
  --pp-borde-promo: #ECECF1;
  --pp-titulos: "Montserrat", system-ui, sans-serif;
  --pp-cuerpo: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
body.pp {
  margin: 0;
  background: #fff;
  color: var(--pp-texto);
  font-family: var(--pp-cuerpo);
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: 86px; /* la barra fija no tapa el final */
}
.pp a { color: var(--pp-morado); }
.pp img { max-width: 100%; display: block; }

/* ── Cabecera y menú general ─────────────────────────────────────────── */
.pp-cabecera { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid #EEE; }
.pp-cabecera-in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pp-logo-img { height: 30px; width: auto; }
.pp-wordmark { font-family: var(--pp-titulos); font-weight: 800; font-size: 26px; color: var(--pp-morado); letter-spacing: .04em; }
.pp-menu-boton { display: none; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--pp-morado); cursor: pointer; padding: 6px; }
.pp-menu { display: flex; align-items: center; gap: 22px; font-family: var(--pp-titulos); font-weight: 700; font-size: 14px; }
.pp-menu > a, .pp-sub-boton { color: var(--pp-texto); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 6px 0; }
.pp-menu > a.pp-activo { color: var(--pp-morado); }
.pp-sub { position: relative; }
.pp-sub-lista { display: none; position: absolute; top: 100%; left: 0; min-width: 200px; background: #fff; border: 1px solid #EEE; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.08); padding: 6px 0; }
.pp-sub:hover .pp-sub-lista, .pp-sub.pp-abierto .pp-sub-lista { display: block; }
.pp-sub-lista a { display: block; padding: 8px 16px; color: var(--pp-texto); text-decoration: none; font-weight: 600; }
.pp-sub-lista a:hover { background: #F7F2FF; }
.pp-boton-blanco { background: #fff; color: var(--pp-morado) !important; border: 1px solid var(--pp-morado); border-radius: 5px; padding: 8px 14px !important; }

@media (max-width: 899px) {
  .pp-menu-boton { display: block; }
  .pp-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid #EEE; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; }
  .pp-menu.pp-abierto { display: flex; }
  .pp-menu > a, .pp-sub-boton { padding: 12px 0; text-align: left; width: 100%; }
  .pp-sub-lista { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; }
  .pp-sub:hover .pp-sub-lista { display: none; }
  .pp-sub.pp-abierto .pp-sub-lista { display: block; }
  .pp-boton-blanco { text-align: center; margin-top: 8px; }
}

/* ── Contenedor ──────────────────────────────────────────────────────── */
.pp-principal { max-width: 1180px; margin: 0 auto; padding: 20px 16px 32px; }
@media (min-width: 1100px) { .pp-principal, .pp-cabecera-in { padding-left: 40px; padding-right: 40px; } }

.pp-volver { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 600; }

/* ── Ficha ───────────────────────────────────────────────────────────── */
.pp-ficha { display: block; }
@media (min-width: 900px) {
  .pp-ficha { display: grid; grid-template-columns: 420px 1fr; gap: 40px; align-items: start; }
}
.pp-ficha-foto { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; background: #F4F4F7; }
.pp-ficha-foto-promo { aspect-ratio: 160 / 118; border-radius: 13px; }
.pp-sin-foto { display: flex; align-items: center; justify-content: center; font-size: 48px; width: 100%; height: 100%; }
.pp-ficha-miniaturas { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; }
.pp-ficha-miniaturas img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; flex: none; }
.pp-ficha-info { margin-top: 18px; }
@media (min-width: 900px) { .pp-ficha-info { margin-top: 0; } }
.pp-miga { font-size: 13px; color: var(--pp-gris); margin-bottom: 6px; }
.pp-miga a { color: var(--pp-gris); text-decoration: none; }
.pp-ficha-titulo { font-family: var(--pp-titulos); font-weight: 800; font-size: 24px; line-height: 1.2; margin: 0 0 8px; }
.pp-ficha-precio { font-family: var(--pp-titulos); font-weight: 800; font-size: 24px; color: var(--pp-morado); margin: 0 0 12px; }
.pp-ficha-precio.pp-convenir { color: #8A8A8A; font-size: 18px; }
.pp-etiquetas { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pp-etiqueta { background: #F4F2F8; color: #4A4458; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.pp-etiqueta-u { background: #F1E7FF; color: #5B18C9; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.pp-ficha-descripcion { white-space: normal; margin-bottom: 12px; overflow-wrap: anywhere; }
.pp-publicado { color: var(--pp-gris); font-size: 14px; margin: 0 0 18px; }
.pp-punteado { border: 1px dashed #C9B6F5; background: #FBF8FF; color: #5B18C9; border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; font-size: 15px; }
.pp-estrellas { margin: 0 0 18px; color: #4A4458; font-weight: 600; }
.pp-estrellas-icono { color: #F5B301; letter-spacing: 1px; }

.pp-donde, .pp-resenas { margin-bottom: 22px; }
.pp-donde h2, .pp-resenas h2 { font-family: var(--pp-titulos); font-weight: 700; font-size: 18px; margin: 0 0 10px; }
.pp-sucursales { list-style: none; margin: 0; padding: 0; border: 1px solid #ECECF1; border-radius: 12px; }
.pp-sucursales li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 14px; border-top: 1px solid #ECECF1; }
.pp-sucursales li:first-child { border-top: 0; }
.pp-sucursal-nombre { font-weight: 600; flex: 1 1 auto; }
.pp-distancia { color: var(--pp-gris); font-size: 14px; }
.pp-sucursales a { font-weight: 600; font-size: 14px; }
.pp-resena { border-top: 1px solid #ECECF1; padding: 12px 0; }
.pp-resena-cabeza { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; }
.pp-resena-cabeza time { color: var(--pp-gris); }
.pp-resena p { margin: 6px 0 0; overflow-wrap: anywhere; }
.pp-nota { color: var(--pp-gris); font-size: 13px; margin: 8px 0 0; }

/* ── Recuadro de descarga ────────────────────────────────────────────── */
.pp-recuadro { background: linear-gradient(135deg, #7A20FF, #9C4DFF); color: #fff; border-radius: 14px; padding: 20px; margin: 8px 0 18px; text-align: center; }
.pp-recuadro-titulo { font-family: var(--pp-titulos); font-weight: 700; font-size: 18px; margin: 0 0 6px; }
.pp-recuadro-linea { margin: 0 0 12px; opacity: .92; }
.pp-boton-descargar { display: flex; align-items: center; justify-content: center; height: 42px; border-radius: 5px; background: #fff; color: var(--pp-morado) !important; font-family: var(--pp-titulos); font-weight: 700; text-decoration: none; margin: 12px auto 12px; max-width: 320px; }
.pp-tiendas { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pp-tienda { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 8px; background: #111; color: #fff !important; text-decoration: none; font-weight: 600; font-size: 14px; }

/* ── Catálogo ────────────────────────────────────────────────────────── */
.pp-catalogo-titulo { font-family: var(--pp-titulos); font-weight: 800; font-size: 26px; margin: 4px 0 2px; }
.pp-catalogo-conteo { color: var(--pp-gris); margin: 0 0 14px; }
.pp-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: thin; }
.pp-chip { flex: none; display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid #E0D7F2; background: #fff; color: #4A4458 !important; text-decoration: none; font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit; }
.pp-chip-activo, .pp-chip[aria-pressed="true"] { background: #F2E7FE; border-color: #D6B4FD; color: var(--pp-morado) !important; }
.pp-filtros { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin-bottom: 18px; font-size: 14px; font-weight: 600; }
.pp-filtros label { display: flex; flex-direction: column; gap: 4px; }
.pp-filtros input, .pp-filtros select { height: 36px; border: 1px solid #DCD6E6; border-radius: 6px; padding: 0 8px; font: inherit; font-weight: 400; background: #fff; }
.pp-rango { display: flex; align-items: center; gap: 6px; }
.pp-rango input { width: 84px; }
.pp-acciones-promos { display: flex; gap: 8px; margin-bottom: 14px; }
.pp-mapa { height: 420px; border-radius: 12px; overflow: hidden; margin-bottom: 18px; border: 1px solid #ECECF1; }
.pp-mapa-tarjeta { display: block; width: 180px; text-decoration: none; color: var(--pp-texto) !important; text-align: center; }
.pp-mapa-tarjeta img { width: 100%; aspect-ratio: 160 / 118; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }

.pp-cuadricula { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
@media (min-width: 768px) { .pp-cuadricula { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1100px) { .pp-cuadricula { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; } }

/* Tarjeta de Ventas: la de la app (foto cuadrada, título en 2 líneas, categoría y precio). */
.pp-tarjeta-venta { display: flex; flex-direction: column; border: 1px solid var(--pp-borde-venta); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--pp-texto) !important; background: #fff; }
.pp-tv-foto { display: block; aspect-ratio: 1 / 1; background: #F4F4F7; }
.pp-tv-foto img { width: 100%; height: 100%; object-fit: cover; }
.pp-tv-cuerpo { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; }
.pp-tv-titulo { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pp-tv-categoria { font-size: 11.5px; color: var(--pp-gris); }
.pp-tv-precio { font-family: var(--pp-titulos); font-weight: 800; color: var(--pp-morado); font-size: 15px; }
.pp-tv-precio.pp-convenir { font-family: var(--pp-cuerpo); font-weight: 600; font-size: 12.5px; color: #8A8A8A; }

/* Tarjeta de Promos: la de la app (imagen 160:118 y título centrado debajo). */
.pp-tarjeta-promo { display: flex; flex-direction: column; border: 1px solid var(--pp-borde-promo); border-radius: 13px; overflow: hidden; text-decoration: none; color: var(--pp-texto) !important; background: #fff; }
.pp-tp-imagen { display: block; aspect-ratio: 160 / 118; background: #F4F4F7; }
.pp-tp-imagen img { width: 100%; height: 100%; object-fit: cover; }
.pp-tp-titulo { font-size: 13px; line-height: 1.35; text-align: center; padding: 8px 8px 10px; }
.pp-tp-distancia { font-size: 12px; color: var(--pp-gris); text-align: center; padding: 0 8px 10px; margin-top: -6px; }

.pp-paginacion { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 22px 0; }
.pp-pagina { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid #E0D7F2; text-decoration: none; font-weight: 600; background: #fff; cursor: pointer; font-family: inherit; font-size: 15px; color: var(--pp-morado); }
.pp-pagina-activa { background: var(--pp-morado); color: #fff !important; border-color: var(--pp-morado); }
.pp-puntos { align-self: center; color: var(--pp-gris); }

.pp-seo { color: #5A5466; font-size: 15px; border-top: 1px solid #EEE; margin-top: 24px; padding-top: 16px; }
.pp-vacio { text-align: center; padding: 32px 0; }
.pp-vacio h1 { font-family: var(--pp-titulos); font-weight: 800; font-size: 24px; }
.pp-vacio-icono { font-size: 54px; }
.pp-vacio .pp-recuadro { max-width: 460px; margin: 18px auto; }

/* ── Barra fija de descarga (§6.5) ───────────────────────────────────── */
.pp-barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid #ECECF1; box-shadow: 0 -4px 16px rgba(0,0,0,.06); display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.pp-icono { width: 38px; height: 38px; border-radius: 10px; flex: none; object-fit: contain; }
.pp-icono-texto { display: inline-flex; align-items: center; justify-content: center; background: var(--pp-morado); color: #fff; font-family: var(--pp-titulos); font-weight: 800; font-size: 10px; letter-spacing: .03em; }
.pp-barra-texto { flex: 1 1 auto; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pp-barra-texto strong { font-size: 14px; }
.pp-barra-texto span { font-size: 12px; color: var(--pp-gris); }
.pp-boton-morado { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border-radius: 5px; background: var(--pp-morado); color: #fff !important; text-decoration: none; font-family: var(--pp-titulos); font-weight: 700; font-size: 14px; border: 0; cursor: pointer; white-space: nowrap; }
.pp-ancho { width: 100%; margin: 6px 0 12px; }

/* ── Aviso «Sigue viendo en la app» (§6.6) ───────────────────────────── */
.pp-muro { position: fixed; inset: 0; z-index: 50; background: rgba(20, 10, 40, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pp-muro[hidden] { display: none; }
.pp-muro-caja { background: #fff; border-radius: 16px; max-width: 380px; width: 100%; padding: 24px 20px; text-align: center; box-shadow: 0 16px 48px rgba(0,0,0,.2); }
.pp-muro-caja .pp-icono { margin: 0 auto 10px; }
.pp-muro-caja h2 { font-family: var(--pp-titulos); font-weight: 800; font-size: 20px; margin: 0 0 8px; }
.pp-muro-caja p { margin: 0 0 12px; color: #4A4458; }
.pp-muro-caja .pp-tienda { background: #111; }
.pp-muro-volver { margin-top: 14px; background: none; border: 0; color: var(--pp-morado); font-weight: 700; font-size: 15px; cursor: pointer; }
body.pp-con-muro { overflow: hidden; }
