/* Páginas legales (Términos y Privacidad) con el estilo de vdk.pe/unitaria.
   Header: el mismo de la tienda unitaria (flotante y fijo). Footer: el de siempre.
   Todo queda dentro de .terms-page para no tocar header ni footer. */
body.legal-body { background: #fff; color: #111; }

.terms-page {
  --legal-line: #e4e2de;
  --legal-muted: #6b6b6b;
  --legal-soft: #f7f7f6;
  --legal-top: calc(var(--vdk-u-header-bottom, 104px) + 24px);
  box-sizing: border-box;
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--vdk-u-header-bottom, 104px) + 40px) 24px 80px;
  color: #111;
  font-size: 14px;
  line-height: 1.75;
}
.terms-page *, .terms-page *::before, .terms-page *::after { box-sizing: border-box; }
.terms-page .card { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
.terms-page a { color: #111; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.terms-page a:hover { color: #555; }
.terms-page strong { font-weight: 600; }

/* ---------- Encabezado ---------- */
.terms-page .terms-hero {
  max-width: 760px;
  margin: 0 auto 44px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--legal-line);
}
.terms-page .terms-hero h1 {
  margin: 0 0 10px;
  text-align: center;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #111;
}
.terms-page .terms-last-update { margin: 0 0 26px; text-align: center; color: var(--legal-muted); font-size: 12px; }
.terms-page .terms-last-update strong { font-weight: 500; color: #444; }
.terms-page .terms-hero p:not(.terms-last-update) { margin: 0 0 14px; color: #444; font-size: 14px; line-height: 1.8; }
.terms-page .terms-hero p:last-child { margin-bottom: 0; }

/* ---------- Índice + contenido ---------- */
.terms-page .terms-layout { display: grid; grid-template-columns: 250px minmax(0, 760px); justify-content: center; gap: 56px; align-items: start; }

.terms-page .terms-nav { position: sticky; top: var(--legal-top); max-height: calc(100vh - var(--legal-top) - 24px); overflow: auto; scrollbar-width: thin; }
.terms-page .terms-nav h2 { margin: 0 0 14px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #111; }
.terms-page .terms-nav ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 1px solid var(--legal-line); }
.terms-page .terms-nav a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 14px;
  border-left: 1px solid transparent;
  color: var(--legal-muted);
  font-size: 12.5px;
  line-height: 1.4;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease;
}
.terms-page .terms-nav a:hover { color: #111; }
.terms-page .terms-nav a.is-active { color: #111; border-left-color: #111; }

.terms-page .terms-content { display: grid; gap: 0; min-width: 0; }
.terms-page .term-section { padding: 0 0 30px; margin: 0 0 30px; border-bottom: 1px solid var(--legal-line); scroll-margin-top: var(--legal-top); }
.terms-page .term-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.terms-page .term-section h2 { margin: 0 0 14px; font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: 0; color: #111; }
.terms-page .term-section p,
.terms-page .term-section li { margin: 0 0 12px; color: #333; font-size: 14px; line-height: 1.75; }
.terms-page .term-section ul,
.terms-page .term-section ol { margin: 0 0 14px; padding-left: 18px; }
.terms-page .term-section li::marker { color: #9a9a9a; }
.terms-page .term-section li:last-child,
.terms-page .term-section p:last-child { margin-bottom: 0; }

/* ---------- Tablet y celular ---------- */
@media (max-width: 980px) {
  .terms-page .terms-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .terms-page .terms-nav { position: static; max-height: none; padding: 18px 20px; background: var(--legal-soft); }
  .terms-page .terms-nav ol { max-height: 260px; overflow: auto; border-left: 0; }
  .terms-page .terms-nav a { margin-left: 0; padding: 7px 0; border-left: 0; }
  .terms-page .terms-nav a.is-active { text-decoration: underline; text-underline-offset: 3px; }
}
@media (max-width: 760px) {
  .terms-page { padding: calc(var(--vdk-u-header-bottom, 96px) + 26px) 16px 56px; font-size: 13.5px; }
  .terms-page .terms-hero { margin-bottom: 30px; padding-bottom: 26px; }
  .terms-page .terms-hero h1 { font-size: 17px; letter-spacing: .12em; }
  .terms-page .terms-hero p:not(.terms-last-update),
  .terms-page .term-section p,
  .terms-page .term-section li { font-size: 13.5px; }
  .terms-page .term-section { padding-bottom: 24px; margin-bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) { .terms-page .terms-nav a { transition: none; } }

/* Footer de siempre: los estilos de la tienda unitaria (body 13px, títulos sin negrita, márgenes de <p>)
   no deben cambiarlo. Se devuelven sus valores originales. */
body.legal-body #vdkSharedFooter { font-size: 16px; line-height: normal; }
body.legal-body #vdkSharedFooter .vdk-shared-footer__title,
body.legal-body #vdkSharedFooter .vdk-shared-footer__column-title { font-weight: 700; }
body.legal-body #vdkSharedFooter .vdk-shared-footer__schedule { margin: 0; }
