/* ==========================================================================
   ChipMascotas — estilos de las páginas SEO
   Fichas de producto (/productos/*) y guías por intención.
   Depende solo de los tokens de styles.css (:root) y de las clases ya
   existentes: .legal, .legal__head, .legal-card, .faq, .product, .legal__cta.
   Mobile-first, misma columna de 480px que el resto del sitio.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Migas de pan (dentro del encabezado morado)
   -------------------------------------------------------------------------- */
.crumbs {
  margin: 14px 0 0;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.71rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.6);
}

.crumbs li {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.crumbs li + li::before {
  content: "›";
  font-size: 1rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.36);
}

.crumbs a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.crumbs a svg {
  flex: none;
  width: 13px;
  height: 13px;
}

.crumbs li[aria-current] {
  font-weight: 600;
  color: var(--c-white);
}

@media (hover: hover) {
  .crumbs a:hover {
    color: var(--c-white);
    text-decoration: underline;
    text-underline-offset: 2px;
  }
}

/* Filas superiores compactas: rubro + logo, sin botón de regreso duplicado. */
.legal__top--head {
  align-items: center;
  margin-bottom: 10px;
}

.legal__top--head .legal__eyebrow {
  margin: 0;
  max-width: 62%;
  line-height: 1.35;
}

.legal__top--head .legal__brand img {
  width: 96px;
}

.seo-page .legal__lead {
  margin-top: 10px;
  font-size: 0.83rem;
  line-height: 1.5;
}

/* Los datos clave del encabezado, más compactos que en las páginas legales. */
.seo-page .legal__stats {
  margin-top: 14px;
}

.seo-page .legal__stat {
  padding: 10px 12px;
}

.seo-page .legal__stat b {
  font-size: 1.15rem;
}

.seo-page .legal__stat span {
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   2. Cabecera de ficha de producto
   -------------------------------------------------------------------------- */
.pp__head {
  padding-bottom: 20px;
}

.pp__head .legal__title {
  margin-top: 0;
}

.pp__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
  margin: 14px 0 0;
}

.pp__price-now {
  font-size: clamp(1.8rem, 1.6rem + 1vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--c-white);
}

.pp__price-now small {
  font-size: 0.44em;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

.pp__price-old {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: line-through;
}

.pp__off {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--c-pink);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #3c1c48;
}

.pp__ship {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.78);
}

.pp__ship svg {
  flex: none;
  width: 15px;
  height: 15px;
}

/* --------------------------------------------------------------------------
   3. Carrusel de fotos del producto
   -------------------------------------------------------------------------- */
.pp__media {
  position: relative;
  margin: 0 calc(var(--space-page) * -1);
}

.pp__gallery {
  display: flex;
  gap: 12px;
  padding: 0 var(--space-page) 2px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.pp__gallery::-webkit-scrollbar {
  display: none;
}

.pp__gallery:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 3px;
  border-radius: 26px;
}

.pp__gallery.is-dragging {
  scroll-behavior: auto;
  cursor: grabbing;
}

.pp__shot {
  display: grid;
  flex: 0 0 86%;
  place-items: center;
  margin: 0;
  aspect-ratio: 4 / 5;
  max-height: 62svh;
  scroll-snap-align: center;
  border-radius: 26px;
  background: radial-gradient(
    120% 100% at 50% 0%,
    #ffffff 0%,
    #f7f5fb 58%,
    #ede7f6 100%
  );
  box-shadow: inset 0 0 0 1px rgba(108, 58, 155, 0.1),
    0 20px 34px -30px rgba(42, 22, 65, 0.65);
}

.pp__shot img {
  width: 100%;
  height: 100%;
  padding: 14px;
  object-fit: contain;
}

.pp__count {
  position: absolute;
  top: 12px;
  right: calc(var(--space-page) + 4px);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(42, 22, 65, 0.62);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c-white);
  backdrop-filter: blur(6px);
}

.pp__count[hidden] {
  display: none;
}

.pp__nav {
  position: absolute;
  top: 50%;
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--c-purple);
  box-shadow: 0 10px 20px -12px rgba(42, 22, 65, 0.7);
  transform: translateY(-50%);
  cursor: pointer;
  transition: opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}

.pp__nav svg {
  width: 16px;
  height: 16px;
}

.pp__nav--prev {
  left: 10px;
}

.pp__nav--next {
  right: 10px;
}

.pp__nav[disabled] {
  opacity: 0;
  pointer-events: none;
}

.pp__nav:active {
  transform: translateY(-50%) scale(0.94);
}

.pp__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0;
}

.pp__dots[hidden] {
  display: none;
}

.pp__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(108, 58, 155, 0.22);
  cursor: pointer;
  transition: width var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out);
}

.pp__dot.is-active {
  width: 22px;
  border-radius: var(--radius-pill);
  background: var(--c-purple);
}

@media (hover: hover) {
  .pp__dot:hover {
    background: rgba(108, 58, 155, 0.45);
  }
}

@media (hover: hover) and (min-width: 720px) {
  .pp__nav {
    display: grid;
  }
}

/* --------------------------------------------------------------------------
   4. Bloque de compra
   -------------------------------------------------------------------------- */
.pp__buy {
  margin: 20px 0 0;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--c-surface);
  box-shadow: inset 0 0 0 1px rgba(108, 58, 155, 0.1);
}

/* Precio junto al botón: al hacer scroll ya no se ve el del encabezado. */
.pp__buy-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 0 0 12px;
}

.pp__buy-price strong {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-purple-deep);
}

.pp__buy-price strong span {
  font-size: 0.58em;
  font-weight: 600;
  opacity: 0.6;
}

.pp__buy-price s {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(42, 22, 65, 0.4);
}

.pp__buy-price em {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(18, 161, 80, 0.14);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
  color: #0f8a45;
}

.pp__add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--c-blue);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-white);
  box-shadow: 0 14px 24px -14px rgba(0, 140, 255, 0.9);
  cursor: pointer;
  transition: transform var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out);
}

.pp__add svg {
  width: 18px;
  height: 18px;
}

.pp__add:active {
  transform: scale(0.98);
}

@media (hover: hover) {
  .pp__add:hover {
    background: var(--c-blue-deep);
  }
}

.pp__wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--c-white);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--c-purple);
  text-decoration: none;
  box-shadow: inset 0 0 0 1.5px rgba(108, 58, 155, 0.22);
}

.pp__wa svg {
  width: 16px;
  height: 16px;
}

.pp__note {
  margin: 12px 0 0;
  font-size: 0.72rem;
  line-height: 1.5;
  text-align: center;
  color: rgba(42, 22, 65, 0.55);
}

/* --------------------------------------------------------------------------
   5. Listas incluidas y especificaciones
   -------------------------------------------------------------------------- */
.pp__includes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pp__includes li {
  position: relative;
  margin: 0 0 7px;
  padding-left: 24px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.pp__includes li::before {
  content: "";
  position: absolute;
  top: 0.45em;
  left: 2px;
  width: 12px;
  height: 7px;
  border-left: 2.2px solid var(--c-blue);
  border-bottom: 2.2px solid var(--c-blue);
  transform: rotate(-45deg);
}

.pp__includes li:last-child {
  margin-bottom: 0;
}

.pp__specs {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.pp__specs th,
.pp__specs td {
  padding: 9px 0;
  border-bottom: 1px solid rgba(108, 58, 155, 0.12);
  text-align: left;
  vertical-align: top;
}

.pp__specs tr:last-child th,
.pp__specs tr:last-child td {
  border-bottom: 0;
}

.pp__specs th {
  width: 42%;
  padding-right: 12px;
  font-weight: 500;
  color: rgba(42, 22, 65, 0.6);
}

.pp__specs td {
  font-weight: 500;
  color: rgba(42, 22, 65, 0.88);
}

/* --------------------------------------------------------------------------
   6. Guías: rejilla de tarjetas y tabla comparativa
   -------------------------------------------------------------------------- */
.lp__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.lp__actions .cta {
  flex: 1 1 180px;
  justify-content: center;
}

.lp__grid {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp__grid li {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(108, 58, 155, 0.06);
  font-size: 0.88rem;
  line-height: 1.55;
}

.lp__grid strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.94rem;
  color: var(--c-purple-deep);
}

.lp__table-wrap {
  margin: 0 calc(var(--space-page) * -1);
  padding: 0 var(--space-page);
  overflow-x: auto;
}

.lp__table {
  width: 100%;
  min-width: 300px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.lp__table caption {
  padding-bottom: 8px;
  font-size: 0.72rem;
  text-align: left;
  color: rgba(42, 22, 65, 0.5);
}

.lp__table th,
.lp__table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(108, 58, 155, 0.12);
  text-align: left;
  vertical-align: top;
}

.lp__table thead th {
  border-bottom: 2px solid rgba(108, 58, 155, 0.2);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(42, 22, 65, 0.55);
}

.lp__table tbody th {
  font-weight: 500;
  color: rgba(42, 22, 65, 0.9);
}

.lp__table td {
  font-weight: 700;
  white-space: normal;
  color: var(--c-purple-deep);
}

/* La última columna de las tablas de precio nunca se parte. */
.lp__table td:last-child {
  white-space: nowrap;
}

.lp__table tr:last-child th,
.lp__table tr:last-child td {
  border-bottom: 0;
}

.lp__steps {
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp__steps li {
  position: relative;
  margin: 0 0 14px;
  padding-left: 40px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.lp__steps li:last-child {
  margin-bottom: 0;
}

.lp__steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -2px;
  left: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(108, 58, 155, 0.1);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-purple);
}

.lp__steps strong {
  color: var(--c-purple-deep);
}

/* Tarjetas de producto dentro de una guía (sobre fondo blanco) */
.lp__products .product,
.pp__related .product {
  box-shadow: 0 16px 30px -26px rgba(42, 22, 65, 0.8),
    inset 0 0 0 1px rgba(108, 58, 155, 0.1);
}

/* --------------------------------------------------------------------------
   7. Enlaces de continuación (hub de guías)
   -------------------------------------------------------------------------- */
.lp__next {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp__next a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 16px;
  background: var(--c-white);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--c-purple-deep);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(108, 58, 155, 0.14);
}

.lp__next a svg {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--c-purple);
}

@media (hover: hover) {
  .lp__next a:hover {
    box-shadow: inset 0 0 0 1.5px var(--c-purple);
  }
}

/* --------------------------------------------------------------------------
   8. Carrito flotante y footer de tres columnas
   -------------------------------------------------------------------------- */
.seo-cart {
  position: fixed;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 40;
  color: var(--c-purple);
  text-decoration: none;
}

.seo-cart[hidden] {
  display: none;
}

.footer__cols--three {
  grid-template-columns: 1fr 1fr;
}

.footer__cols--three .footer__col:first-child {
  grid-column: 1 / -1;
}

.footer__legal a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product__link {
  color: inherit;
  text-decoration: none;
}

.product__link:focus-visible {
  outline: 2px solid var(--c-purple);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   9. Pantallas anchas: la columna se ensancha un poco para fichas y guías
   -------------------------------------------------------------------------- */
@media (min-width: 720px) {
  .seo-page {
    max-width: 640px;
    border-radius: 30px 30px 0 0;
    overflow: hidden;
  }

  .pp__shot {
    flex-basis: 62%;
  }

  .lp__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__cols--three {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .footer__cols--three .footer__col:first-child {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pp__gallery {
    scroll-behavior: auto;
  }
}
