/* Primible — Módulos de la home de servicio: campo de pedido del hero,
   títulos en dos tonos, precios y plazos (section-precios.php) y local y
   contacto (section-local.php).

   Regla del home: los envoltorios de sección son transparentes. El
   filamento de la boquilla (.primible-page-filament) pasa por detrás de
   cada módulo y solo se ve a través de fondos transparentes. Las tarjetas
   internas sí llevan superficie. */

/* ---------- Encabezados compartidos ---------- */
.sec-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--pv-lilac, #D66BFF);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.sec-eyebrow::before {
  width: 18px;
  height: 1px;
  background: currentColor;
  content: "";
}

.sec-title {
  margin: 18px 0 0;
  color: #fff;
  font-size: clamp(36px, 4.2vw, 60px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.02;
  text-transform: none;
}
.tone-muted { color: #d66bff; }

/* ---------- Hero: campo de pedido ---------- */
.primible-hero__ask {
  max-width: 600px;
  margin: 6px 0 0;
  animation: heroIn .8s .38s both;
}

.primible-hero__ask-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--pv-line-strong, rgba(255, 255, 255, .14));
  border-radius: 999px;
  background: rgba(30, 30, 30, .6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.primible-hero__ask-tabs label { position: relative; cursor: pointer; }
.primible-hero__ask-tabs input { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; margin: 0 !important; border: 0 !important; opacity: 0; cursor: pointer; }
.primible-hero__ask-tabs span {
  display: block;
  padding: 9px 16px;
  border-radius: 999px;
  color: #b9b9c0;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .25s var(--pv-ease, ease), color .25s ease;
}
.primible-hero__ask-tabs label:hover span { color: #fff; }
.primible-hero__ask-tabs input:checked + span { background: #fff; color: #18181a; }
.primible-hero__ask-tabs input:focus-visible + span { box-shadow: var(--pv-ring); }

.primible-hero__ask-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border: 1px solid rgba(214, 107, 255, .35);
  border-radius: 20px;
  background: rgba(24, 24, 26, .78);
  box-shadow: 0 0 0 6px rgba(177, 20, 255, .07), 0 30px 60px -30px rgba(177, 20, 255, .55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.primible-hero__ask-field:focus-within {
  border-color: var(--pv-lilac, #D66BFF);
  box-shadow: 0 0 0 6px rgba(177, 20, 255, .16), 0 30px 60px -30px rgba(177, 20, 255, .7);
}
/* Línea de luz que recorre el borde superior del campo. */
.primible-hero__ask-field::before {
  position: absolute;
  top: -1px;
  left: 18%;
  width: 40%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #E3A6FF, transparent);
  content: "";
  animation: askGlow 4.5s ease-in-out infinite;
}
@keyframes askGlow {
  0%, 100% { transform: translateX(-30%); opacity: .2; }
  50% { transform: translateX(80%); opacity: 1; }
}

.primible-hero__ask-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(177, 20, 255, .2);
  color: #E3A6FF;
  font-size: 11px;
  font-weight: 600;
}

/* Especificidad alta: design-system.css pinta todos los inputs en modo
   oscuro con html.dark-mode input:not(…)×5 y !important. */
html.dark-mode .section--hero .primible-hero__ask .primible-hero__ask-field input[name="d"][type="text"][autocomplete],
.primible-hero__ask-field input {
  height: 46px !important;
  border-radius: 0 !important;
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #fff !important;
  font: inherit;
  font-size: 16.5px !important;
}
.primible-hero__ask-field input::placeholder { color: #8e8e96; }

.primible-hero__ask-field button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: var(--pv-violet, #B114FF);
  box-shadow: var(--pv-glow);
  color: #fff;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s var(--pv-ease, ease);
}
.primible-hero__ask-field button:hover { background: var(--pv-plum, #8D0DCC); }
.primible-hero__ask-field button span { transition: transform .2s var(--pv-ease, ease); }
.primible-hero__ask-field button:hover span { transform: translateX(3px); }

.primible-hero__ask-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.primible-hero__ask-chips button {
  padding: 7px 13px;
  border: 1px solid var(--pv-line-strong, rgba(255, 255, 255, .14));
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: #c9c9d1;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.primible-hero__ask-chips button:hover { border-color: rgba(214, 107, 255, .6); background: rgba(177, 20, 255, .1); color: #fff; }

.section--hero .primible-hero__ask-alt,
.primible-hero__ask-alt { max-width: none !important; margin: 16px 0 0 !important; color: #8e8e96 !important; font-size: 14px !important; font-weight: 400; }
.primible-hero__ask-alt a { color: #E3A6FF; text-decoration: none; }
.primible-hero__ask-alt a:hover { text-decoration: underline; }

@media (max-width: 1024px) {
  .primible-hero__ask { margin-right: auto; margin-left: auto; text-align: center; }
  .primible-hero__ask-chips { justify-content: center; }
}

/* La fila de ejemplos (sin salto en celular) no debe ensanchar la columna
   del hero: sin min-width: 0 el grid la estira más allá de la pantalla. */
.primible-hero__content { min-width: 0; }
/* brand-ui centra la columna con margin: auto (ancho «fit-content»), así que
   la fila de ejemplos sin salto la ensanchaba; width: 100% la fija. */
@media (max-width: 1024px) {
  .section--hero .primible-hero__content { width: 100%; }
}
.primible-hero__ask { min-width: 0; }

@media (max-width: 600px) {
  .primible-hero__ask { width: 100%; }
  .primible-hero__ask-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; border-radius: 18px; }
  .primible-hero__ask-tabs span { height: 100%; padding: 8px 6px; font-size: 12.5px; line-height: 1.25; text-align: center; white-space: normal; display: grid; place-items: center; border-radius: 14px; }
  .primible-hero__ask-field { flex-wrap: wrap; padding: 10px; }
  .primible-hero__ask-field input { flex-basis: calc(100% - 44px); text-align: left; }
  .primible-hero__ask-field button { width: 100%; justify-content: center; }
  .primible-hero__ask-chips { flex-wrap: nowrap; justify-content: flex-start; margin-right: -16px; padding-right: 16px; overflow-x: auto; scrollbar-width: none; }
  .primible-hero__ask-chips button { flex: none; }
}

/* ---------- Precios y plazos ---------- */
.precios-primible { padding: clamp(64px, 8vw, 120px) 0; background: transparent; color: #fff; }

.precios-primible__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.precios-primible__head { position: sticky; top: calc(var(--pv-nav-h, 74px) + 40px); }
.precios-primible__intro { margin: 22px 0 30px; color: var(--pv-muted, #b9b9c0); font-size: 17px; line-height: 1.65; }
.precios-primible__head .btn { display: inline-flex; align-items: center; min-height: 50px; padding: 0 24px; }

.precios-primible__table-wrap {
  border: 1px solid var(--pv-line-strong, rgba(255, 255, 255, .14));
  border-radius: var(--pv-r-lg, 24px);
  background: rgba(36, 36, 38, .72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.precios-primible__table { width: 100%; border-collapse: collapse; }
.precios-primible__table thead th {
  padding: 18px 24px;
  border-bottom: 1px solid var(--pv-line, rgba(255, 255, 255, .08));
  color: #8e8e96;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-align: left;
  text-transform: uppercase;
}
.precios-primible__table tbody tr { transition: background-color .25s ease; }
.precios-primible__table tbody tr:hover { background: rgba(177, 20, 255, .07); }
.precios-primible__table tbody th,
.precios-primible__table tbody td {
  padding: 22px 24px;
  border-bottom: 1px solid var(--pv-line, rgba(255, 255, 255, .08));
  text-align: left;
  vertical-align: middle;
}
.precios-primible__table tbody tr:last-child > * { border-bottom: 0; }
.precios-primible__table tbody th { color: #e4e2e8; font-size: 15.5px; font-weight: 400; line-height: 1.45; }
.precios-primible__table tbody td:nth-child(2) { color: #fff; font-size: 18px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.precios-primible__table tbody td:nth-child(3) { color: #8e8e96; font-size: 14px; white-space: nowrap; }

.precios-primible__note {
  margin: 0;
  padding: 16px 24px;
  border-top: 1px solid var(--pv-line, rgba(255, 255, 255, .08));
  background: rgba(0, 0, 0, .14);
  color: #8e8e96;
  font-size: 13px;
}

@media (max-width: 900px) {
  .precios-primible__inner { grid-template-columns: 1fr; }
  .precios-primible__head { position: static; }
}

@media (max-width: 600px) {
  .precios-primible__table thead { display: none; }
  .precios-primible__table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--pv-line, rgba(255, 255, 255, .08));
  }
  .precios-primible__table tbody tr:last-child { border-bottom: 0; }
  .precios-primible__table tbody th { grid-column: 1 / -1; padding: 0; border: 0; font-size: 15px; }
  .precios-primible__table tbody td { padding: 0; border: 0; white-space: normal; }
  .precios-primible__table tbody td:nth-child(2) { font-size: 17px; }
  .precios-primible__table tbody td:nth-child(3) { align-self: end; text-align: right; }
}

/* ---------- Local y contacto ---------- */
.local-primible { padding: clamp(64px, 8vw, 120px) 0; background: transparent; color: #fff; }

.local-primible__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: stretch;
}

.local-primible__lead { margin: 22px 0 30px; color: var(--pv-muted, #b9b9c0); font-size: 17px; line-height: 1.65; }

.local-primible__data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 0 0 30px;
  border: 1px solid var(--pv-line-strong, rgba(255, 255, 255, .14));
  border-radius: var(--pv-r, 18px);
  background: var(--pv-line-strong, rgba(255, 255, 255, .14));
  overflow: hidden;
}
.local-primible__data > div { padding: 16px 18px; background: rgba(36, 36, 38, .92); }
.local-primible__data dt { margin-bottom: 4px; color: #8e8e96; font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.local-primible__data dd { margin: 0; color: #fff; font-size: 15px; line-height: 1.4; }
.local-primible__data a { color: #fff; text-decoration: none; }
.local-primible__data a:hover { color: #E3A6FF; }

.local-primible__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.local-primible__actions .btn,
.local-primible__actions .btn-outline { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; }

.local-primible__map {
  position: relative;
  min-height: 420px;
  border: 1px solid var(--pv-line-strong, rgba(255, 255, 255, .14));
  border-radius: var(--pv-r-lg, 24px);
  background: #303030;
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8);
}
/* Mapa en modo oscuro para que no rompa la paleta. */
.local-primible__map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: invert(.92) hue-rotate(180deg) saturate(.6) brightness(.95) contrast(.95);
}
/* Mapa interactivo: modo oscuro solo en las calles (el pin no se filtra) */
.local-map, .local-map.maplibregl-map { position: absolute; inset: 0; z-index: 0; background: #1d1c21; }
/* Sin la sombra interior que apagaba el mapa */
.local-primible__map:has(.local-map)::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.local-map .maplibregl-ctrl-group { overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; background: rgba(29, 28, 33, .85); box-shadow: none; }
.local-map .maplibregl-ctrl-group button { width: 34px; height: 34px; }
.local-map .maplibregl-ctrl-group button + button { border-top: 1px solid rgba(255, 255, 255, .12); }
.local-map .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1); }
.local-map .maplibregl-ctrl-group button:hover { background: #b114ff; }
.local-map .maplibregl-ctrl-attrib { background: rgba(29, 28, 33, .8); color: rgba(255, 255, 255, .6); font-size: 10px; }
.local-map .maplibregl-ctrl-attrib a { color: #d66bff; }
.local-map .maplibregl-ctrl-attrib-button { filter: invert(1); background-color: transparent; }
.local-pin-icon { background: none; border: 0; }

/* Pin morado anclado a la dirección */
.local-pin {
  position: relative;
  display: grid;
  justify-items: center;
  width: 40px;
  height: 52px;
}
.local-pin svg { position: relative; z-index: 1; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .55)); }
.local-pin__pulse {
  position: absolute;
  bottom: -11px;
  left: 50%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-radius: 50%;
  background: rgba(177, 20, 255, .55);
  animation: localPulse 2.2s ease-out infinite;
}
.local-pin__label {
  position: absolute;
  bottom: calc(100% + 6px);
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  color: #18181b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}
@keyframes localPulse {
  0% { transform: scale(.6); opacity: .9; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* Botón para dejar reseña en Google, sobre el mapa */
.local-review {
  position: absolute;
  right: 16px;
  bottom: 28px;
  left: 16px;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(24, 24, 24, .78);
  color: #fff !important;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.local-review:hover { border-color: #b114ff; background: #b114ff; }
.local-review__stars { color: #f5c542; letter-spacing: 1px; }
@media (prefers-reduced-motion: reduce) { .local-pin__pulse { animation: none; } }
.local-primible__map::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), inset 0 -80px 80px -60px rgba(41, 41, 41, .7);
  content: "";
  pointer-events: none;
}

@media (max-width: 900px) {
  .local-primible__inner { grid-template-columns: 1fr; }
  .local-primible__map { min-height: 320px; }
}

@media (max-width: 600px) {
  .local-primible__data { grid-template-columns: 1fr; }
  .local-primible__actions .btn,
  .local-primible__actions .btn-outline { flex: 1 1 auto; }
}

/* design-system.css pinta todo <section> en modo oscuro
   (html.dark-mode section). Estos módulos deben quedar transparentes para
   que el filamento de la boquilla se vea al hacer scroll. */
html.dark-mode .precios-primible,
html.dark-mode .local-primible,
html.dark-mode .faq-primible,
html .precios-primible,
html .local-primible,
html .faq-primible {
  background: transparent !important;
}

/* Tabla de precios: la primera columna manda; precio y plazo se ajustan. */
.precios-primible__table { table-layout: fixed; }
.precios-primible__table thead th:nth-child(1) { width: 46%; }
.precios-primible__table thead th:nth-child(2) { width: 30%; }
.precios-primible__table tbody td:nth-child(2),
.precios-primible__table tbody td:nth-child(3) { white-space: normal; }
