/*
 * La maqueta se estila contra las clases de slick (.slick-slide, .slick-dots,
 * .slick-prev/.slick-next). El front usa Swiper, así que aquí se replican esas
 * mismas reglas sobre las clases equivalentes de Swiper. Sin esto los slides
 * quedan ocultos, porque main.css depende de .slick-initialized.
 */

/* La maqueta no declara fondo y en navegadores en modo oscuro el lienzo sale negro. */
html {
  color-scheme: light;
  background: #fff;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}

/* Buscador: oculto por defecto; no usar display:block del main.css */
.caja-buscador {
  display: none !important;
}

.caja-buscador.is-open {
  display: block !important;
}

/* Sidebar cerrado no debe ensanchar el documento en iOS/Android */
.sidebar:not(.sidebar-view) {
  visibility: hidden;
  pointer-events: none;
}

/* ---------- Slider del home ---------- */
.slider .swiper {
  position: relative;
  clear: both;
}

.slider .swiper-slide img {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 2000px;
  height: auto;
  visibility: visible;
}

.slider .swiper-pagination {
  text-align: center;
  font-size: 0.85em;
  line-height: 1;
  margin: 1em 0;
  width: 100%;
  position: absolute;
  bottom: -40px;
}

.slider .swiper-pagination-bullet {
  background: var(--secundario);
  display: inline-block;
  vertical-align: middle;
  width: 10px;
  height: 10px;
  margin: 0 3px;
  border: 0 none;
  border-radius: 10px;
  opacity: 0.5;
  transition: width 0.3s ease;
}

.slider .swiper-pagination-bullet-active {
  background: var(--primario);
  opacity: 1;
  width: 25px;
}

.slider .swiper-button-prev,
.slider .swiper-button-next {
  position: absolute;
  top: 50%;
  margin-top: -16px;
  outline: 0;
  width: 45px;
  height: 45px;
  text-indent: -9999px;
  z-index: 98;
  opacity: 0.5;
  border: 0 none;
  border-radius: 50px;
  box-shadow: rgba(80, 80, 80, 0.3) 0 2px 6px;
}

.slider .swiper-button-prev {
  left: 10px;
  background: #fff url(../img/arrow-left.svg) no-repeat center;
}

.slider .swiper-button-next {
  right: 10px;
  background: #fff url(../img/arrow-right.svg) no-repeat center;
}

/* ---------- Galería del detalle (medidas admin 1200×900 → display máx 768×576) ---------- */
/* Thumbs 95px + gap 25px; principal float right calc(100% - 120px); ratio 4:3. */
.foto-slider img {
  visibility: visible;
}

.fp-foto-gallery {
  display: block;
  width: 100%;
  overflow: hidden;
}

.fp-foto-gallery::after {
  content: '';
  display: table;
  clear: both;
}

.fp-foto-gallery .foto-slider {
  float: right;
  width: calc(100% - 120px);
  max-width: 768px;
  position: relative;
  margin-bottom: 2rem;
}

/* Sin thumbs: mismo ancho útil que con riel (no estirar a todo el 48%). */
.fp-foto-gallery--solo .foto-slider {
  float: right;
  width: calc(100% - 120px);
  max-width: 768px;
}

.fp-foto-gallery .fp-foto-swiper {
  position: relative;
  width: 100%;
  max-width: 768px;
}

.fp-foto-gallery .foto-slider img,
.fp-foto-gallery .swiper-slide img {
  display: block;
  width: 100%;
  max-width: 768px;
  max-height: 576px;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  visibility: visible;
}

.fp-foto-gallery .slider-nav-thumbnails {
  width: 95px;
  display: inline-block;
  vertical-align: top;
  margin: 0 25px 0 0;
  padding: 0;
  list-style: none;
}

.fp-foto-gallery .slider-nav-thumbnails li {
  display: block !important;
  clear: both;
  width: 95px !important;
  margin: 0 0 10px;
  padding: 0;
  border-left: 5px solid #fff;
  opacity: 0.5;
  cursor: pointer;
  list-style: none;
  box-sizing: border-box;
}

.fp-foto-gallery .slider-nav-thumbnails li:last-child {
  margin-bottom: 0;
}

.fp-foto-gallery .slider-nav-thumbnails li.is-active {
  opacity: 1;
  border-left: 5px solid var(--primario);
}

.fp-foto-gallery .slider-nav-thumbnails li img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.fp-foto-gallery .swiper-button-prev,
.fp-foto-gallery .swiper-button-next {
  position: absolute;
  top: 40%;
  margin-top: -16px;
  outline: 0;
  width: 45px;
  height: 45px;
  text-indent: -9999px;
  z-index: 98;
  opacity: 0.5;
  border: 0 none;
  border-radius: 50px;
  box-shadow: rgba(80, 80, 80, 0.3) 0 2px 6px;
}

.fp-foto-gallery .swiper-button-prev {
  left: 10px;
  background: #fff url(../img/arrow-left.svg) no-repeat center;
}

.fp-foto-gallery .swiper-button-next {
  right: 10px;
  background: #fff url(../img/arrow-right.svg) no-repeat center;
}

@media only screen and (max-width: 992px) {
  .fp-foto-gallery .foto-slider,
  .fp-foto-gallery--solo .foto-slider {
    float: left;
    width: 100%;
    max-width: 768px;
  }

  .fp-foto-gallery .slider-nav-thumbnails {
    width: 100% !important;
    display: block;
    margin-right: 0;
    margin-top: 10px;
    white-space: nowrap;
    overflow-x: auto;
  }

  .fp-foto-gallery .slider-nav-thumbnails li {
    display: inline-block !important;
    clear: none;
    width: 95px !important;
    margin: 0 8px 0 0;
    vertical-align: top;
  }
}

/* ---------- Carrusel de calugas ---------- */
.lista-dctos.carrusel .swiper-slide,
.lista-dctos.carrusel li {
  visibility: visible;
  float: none;
  height: auto;
}

.carrusel .swiper-button-prev,
.carrusel .swiper-button-next {
  position: absolute;
  top: 40%;
  margin-top: -16px;
  outline: 0;
  width: 45px;
  height: 45px;
  text-indent: -9999px;
  z-index: 98;
  opacity: 0.5;
  border: 0 none;
  border-radius: 50px;
  box-shadow: rgba(80, 80, 80, 0.3) 0 2px 6px;
}

.carrusel .swiper-button-prev {
  left: -10px;
  background: #fff url(../img/arrow-left.svg) no-repeat center;
}

.carrusel .swiper-button-next {
  right: -10px;
  background: #fff url(../img/arrow-right.svg) no-repeat center;
}

.carrusel .swiper-button-prev:hover,
.carrusel .swiper-button-next:hover,
.slider .swiper-button-prev:hover,
.slider .swiper-button-next:hover {
  opacity: 1;
}

/* Swiper dibuja las flechas con un ::after tipográfico que aquí sobra. */
.swiper-button-prev::after,
.swiper-button-next::after {
  display: none;
}

.swiper-button-disabled {
  opacity: 0.2;
}

/* ---------- Estados de carga / vacío ---------- */
.fp-loading,
.fp-empty,
.fp-error {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--gris2);
}

.fp-error {
  color: var(--primario);
}

/* ---------- Copy rich (condiciones / cómo acceder) ---------- */
.fp-rich-html {
  font-size: inherit;
  line-height: 1.45;
  color: inherit;
}

.fp-rich-html p {
  margin: 0 0 0.5rem;
}

.fp-rich-html p:last-child {
  margin-bottom: 0;
}

.fp-rich-html ul,
.fp-rich-html ol {
  margin: 0;
  padding-left: 1.1rem;
}

.fp-rich-html li {
  margin-bottom: 5px;
}

.fp-rich-html a {
  color: var(--primario);
  text-decoration: underline;
  font-weight: 600;
}

.consejos .fp-rich-html li,
.condiciones2 .fp-rich-html li {
  list-style: disc;
}

/* CTA del detalle: espacio como en maqueta */
.columna-texto .caluga-obtener {
  display: block;
  clear: both;
  position: relative;
  z-index: 1;
  margin-top: 1.75rem;
}

.columna-texto .beneficio-no-disponible {
  display: block;
  margin: 1rem 0;
  padding: 1rem;
  background: var(--secundario-light);
}

.columna-texto .beneficio-no-disponible .nivel-circulo {
  background: #fff;
  display: inline-block;
  vertical-align: middle;
  width: 30%;
}

.columna-texto .beneficio-no-disponible span {
  display: inline-block;
  vertical-align: middle;
  width: calc(100% - 35%);
  padding: 10px;
  box-sizing: border-box;
}

.columna-texto .beneficio-no-disponible .nivel-circulo img {
  width: 100%;
  height: auto;
  display: block;
}

.columna-texto .beneficio-no-disponible strong {
  color: var(--primario);
}

.columna-texto .detalle-dcto-interior {
  margin-bottom: 0.5rem;
}

/*
 * Detalle: texto | foto+sociales arriba.
 * .caracteristicas debajo de ambos, solo ~48% (columna izquierda),
 * no al lado de las redes ni a todo el ancho del site.
 */
.info-container-detalle .columnas {
  -webkit-align-items: flex-start;
  -ms-flex-align: start;
  align-items: flex-start;
}

.info-container-detalle .columnas > .caracteristicas {
  -webkit-flex: 0 1 48%;
  -ms-flex: 0 1 48%;
  flex: 0 1 48%;
  width: 48%;
  max-width: 48%;
  box-sizing: border-box;
  list-style: none;
  margin: 0;
  padding: 2rem 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr;
  grid-column-gap: 10px;
  grid-row-gap: 0;
}

.info-container-detalle .columnas > .caracteristicas li {
  margin: 0;
  list-style: none;
  border-right: 1px solid #ccc;
  padding: 0 20px 0 40px;
  font-size: 14px;
  color: #5d5d5d;
  background-repeat: no-repeat;
  background-size: 30px;
  background-position: left top;
  min-height: 32px;
  box-sizing: border-box;
}

.info-container-detalle .columnas > .caracteristicas li:before {
  content: none !important;
  display: none !important;
}

.info-container-detalle .columnas > .caracteristicas li:last-of-type {
  border-right: 0 none;
}

.info-container-detalle .columnas > .caracteristicas li.tipo-dcto {
  background-image: url(/img/dcto2.svg);
}

.info-container-detalle .columnas > .caracteristicas li.tipo-compras {
  background-image: url(/img/compras02.svg);
}

.info-container-detalle .columnas > .caracteristicas li.tipo-medio {
  background-image: url(/img/fono.svg);
}

.info-container-detalle .columnas > .caracteristicas li.tipo-accesibilidad {
  background-image: url(/img/ticks.svg);
}

.info-container-detalle .columnas > .caracteristicas li span {
  display: block;
  line-height: 1.35;
}

@media only screen and (max-width: 1200px) {
  .info-container-detalle .columnas > .caracteristicas {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    grid-column-gap: 12px;
    grid-row-gap: 12px;
  }

  .info-container-detalle .columnas > .caracteristicas li.tipo-compras {
    border-right: 0 none;
  }
}

@media only screen and (max-width: 768px) {
  .info-container-detalle .columnas > .caracteristicas {
    -webkit-flex: 0 0 100%;
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }
}

.info-container-detalle .columnas > .info-descto,
.info-container-detalle .columnas > .alcances,
.info-container-detalle .columnas > p {
  -webkit-flex: 0 0 100%;
  -ms-flex: 0 0 100%;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.info-container-detalle .columnas > .alcances .fp-rich-html {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.info-container-detalle .fp-alcance-vacio {
  margin: 0;
  color: #7d868c;
}

/* ---------- Mi Club: solo niveles ya pasados en gris (maqueta02) ---------- */
.niveles-pag li.grayscale {
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
  opacity: 0.7;
}

/* ---------- Colecciones (maqueta02) ---------- */
.colecciones {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-column-gap: 24px;
  grid-row-gap: 24px;
  margin: 1.5rem 0 3rem;
}

.colecciones img {
  width: 100%;
  height: auto;
  display: block;
}

.colecciones a:hover {
  opacity: 0.8;
}

.flipbook {
  width: 100%;
  display: block;
  position: relative;
  min-height: 600px;
  overflow: hidden;
  border: 1px solid #ccc;
  margin-bottom: 2rem;
}

.flipbook iframe,
.flipbook .fp-iframe {
  display: block;
  width: 100%;
  min-height: 600px;
  border: 0;
}

.sidebar .botonera a.desuscripcion {
  height: 35px;
  color: var(--primario);
  font-weight: 500;
  padding: 0.3rem 1rem;
  border: 0;
}

@media only screen and (max-width: 768px) {
  /* Evitar que márgenes negativos de calugas desborden el viewport */
  .lista-dctos#convenios {
    margin-left: 0;
    margin-right: 0;
    min-width: 0;
    width: 100%;
  }

  .lista-dctos#convenios li {
    flex: 0 1 50% !important;
    max-width: 50%;
    box-sizing: border-box;
  }

  footer .container .footer-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 1.5rem;
  }

  footer h2 img {
    width: min(220px, 70vw);
  }

  .footer-content .half:last-of-type img {
    max-width: 140px;
    height: auto;
  }

  /* Buscador full-width debajo del header, sin transform raro */
  .caja-buscador.is-open {
    position: fixed !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    height: auto !important;
    padding: 12px 16px !important;
    box-sizing: border-box;
  }

  .caja-buscador .search-container {
    width: calc(100% - 44px);
  }

  .sidebar {
    width: min(350px, 100vw);
  }

  .home > .container,
  .container {
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media only screen and (max-width: 480px) {
  .colecciones {
    grid-template-columns: 1fr;
  }
}

@media only screen and (max-width: 400px) {
  .lista-dctos#convenios li {
    flex: 0 1 100% !important;
    max-width: 100%;
  }
}

.trimestres.sin-login li {
  border: 2px solid var(--primario);
  -webkit-filter: grayscale(0%);
  filter: grayscale(0%);
}

.crear-cuenta {
  position: relative;
  width: 100%;
  background: url(/img/crear-cuenta-bg.jpg) repeat center top;
  background-size: 180px;
  margin: 0;
}

.crear-cuenta .container {
  padding-bottom: 0;
}

.crear-cuenta-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 16px;
  margin-bottom: -16px;
}

.crear-cuenta-content .medio-01 {
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 1.1rem;
  padding: 1.5rem;
  text-align: left;
}

.crear-cuenta-content .medio-01:last-of-type {
  align-items: center;
  justify-content: flex-end;
  padding: 0;
}

.crear-cuenta-content .medio-01 img {
  max-width: 80%;
  height: auto;
}

.crear-cuenta-content h3 {
  font-size: 2.4em;
  margin: 0;
  line-height: 1.1em;
  text-align: left;
  font-weight: 900;
  color: #fff;
}

.crear-cuenta-content h3 span {
  font-size: 1.2em;
  display: block;
}

.crear-cuenta .ver-historia {
  padding: 6px 42px 6px 22px;
  color: var(--primario);
  border: 0 none;
  font-weight: 900;
  display: inline-block;
  text-align: center;
  background: #fff url(/img/arrow-right.svg) no-repeat center right 10px;
  font-size: 1.2em;
  text-decoration: none;
}

.crear-cuenta .recuerda {
  background: var(--primario-darker, #7a1238);
  font-size: 0.8em;
  padding: 0.5em 2rem;
  display: block;
  border-radius: 40px;
  color: #fff;
  width: 100%;
  margin: 2rem auto;
  box-sizing: border-box;
}

@media only screen and (max-width: 992px) {
  .trimestres {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    grid-column-gap: 12px;
    grid-row-gap: 12px;
  }

  .crear-cuenta-content {
    display: block;
    width: 100%;
    margin-bottom: 0;
  }

  .crear-cuenta-content .medio-01 img {
    max-width: 100%;
  }
}

/* Los errores del formulario quedaban recortados: cada campo mide 100px y la fila oculta el sobrante. */
.formulario .form_inputs {
  height: auto;
  min-height: 100px;
}

.formulario .form_inputs .info-clave,
.formulario .form_inputs .error {
  float: none;
  clear: both;
  width: 100%;
  height: auto;
  box-sizing: border-box;
}

.ser-parte {
  position: relative;
  width: 100%;
  background: url(/img/crear-cuenta-bg.jpg) repeat center top;
  background-size: 180px;
  margin: 0;
}

.ser-parte .container {
  padding-bottom: 0;
}

.ser-parte-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 16px;
  margin-bottom: -16px;
}

.ser-parte-content .medio-01 {
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 1.1rem;
  padding: 1.5rem;
  text-align: left;
}

.ser-parte-content h3 {
  font-size: 3em;
  margin: 0;
  line-height: 1.1em;
  text-align: left !important;
  font-weight: 900;
}

.ser-parte-content h3 span {
  font-size: 1.2em;
  display: block;
  color: var(--oro);
}

.titulares h2 p {
  font-size: 18px;
  margin-bottom: 0;
  font-weight: 400;
}

.info-ser-parte {
  border-left: 3px solid #fff;
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-ser-parte li {
  padding: 16px 16px 16px 100px;
}

.info-ser-parte li strong {
  font-size: 1.2em;
}

.info-ser-parte li.todas {
  background: url(/img/compras.png) no-repeat left 20px top 24px;
  background-size: 70px;
}

.info-ser-parte li.recuerda-rut {
  background: url(/img/id.png) no-repeat left 20px top 24px;
  background-size: 70px;
}

@media only screen and (max-width: 992px) {
  .ser-parte-content {
    grid-template-columns: 1fr;
    row-gap: 16px;
  }

  .ser-parte-content .medio-01:last-of-type {
    margin-bottom: 40px;
  }
}

@media only screen and (max-width: 640px) {
  footer .container .footer-content {
    display: block;
  }

  .ser-parte-content .medio-01 {
    padding: 0.5rem;
  }

  .ser-parte-content .medio-01 h3 {
    font-size: 2.3em;
  }

  .titulares h2 p {
    font-size: 15px;
  }
}
