/* ======================== SECCIÓN PRECIOS ======================== */

.prices-section{
  --sec-bg: #FDF3EF;

  --title-color: #132B3F;
  --subtitle-color: #132B3F;

  --toggle-border: #132B3F;
  --toggle-slider-bg: #132B3F;
  --toggle-text: #132B3F;
  --toggle-text-selected: #ffffff;

  --card-radius: 18px;
  --card-bg-azul10: #F3F5F6;
  --card-bg-menta10: #E6EFF0;

  --plan-title: #132B3F;
  --plan-desc: #555;
  --plan-price: #132B3F;

  --btn-buy-bg: #132B3F;
  --btn-buy-bg-hover: #0e2130;
  --btn-buy-text: #ffffff;

  width: 100%;
  padding: 60px 20px 100px;
  background-color: var(--sec-bg);
  font-family: 'Montserrat', sans-serif;
  text-align: center;
  position: relative;
  transition: background-color .35s ease;
}

/* ======================== MODO CIMA ======================== */
.prices-section.is-cima{
  --sec-bg: #132B3F;

  --title-color: #ffffff;
  --subtitle-color: rgba(255,255,255,.9);

  --toggle-border: rgba(255,255,255,.55);
  --toggle-slider-bg: #ffffff;

  --toggle-text: rgba(255,255,255,.85);

  --toggle-text-selected: #132B3F;
}

/* ======================== ENCABEZADO ======================== */
.prices-title{
  color: var(--title-color);
  font-size: 48px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 20px;
  transition: color .35s ease;
}

.prices-subtitle{
  color: var(--subtitle-color);
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 40px;
  transition: color .35s ease;
}

.prices-subtitle strong{ font-weight: 800; }

/* ======================== TOGGLE ======================== */
.pricing-toggle-container{
  display: flex;
  justify-content: center;
  margin-bottom: 60px;
}

.toggle-bg{
  background: transparent;
  border: 1px solid var(--toggle-border);
  border-radius: 50px;
  padding: 4px;
  position: relative;
  display: inline-flex;
  width: 320px;
  height: 50px;
  align-items: center;
  transition: border-color .35s ease;
}

/* Ocultar inputs */
.toggle-bg input{ display:none; }

.toggle-label{
  flex: 1;
  text-align: center;
  z-index: 2;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--toggle-text);
  transition: color .35s ease;
  line-height: 42px;
}

.toggle-slider{
  position: absolute;
  top: 4px;
  left: 4px;
  width: 50%;
  height: calc(100% - 8px);
  background: var(--toggle-slider-bg);
  border-radius: 40px;
  z-index: 1;
  transition:
    transform .3s cubic-bezier(0.4, 0.0, 0.2, 1),
    background-color .35s ease;
}

/* Estados slider */
#option-public:checked ~ .toggle-slider{ transform: translateX(0); }
#option-cima:checked ~ .toggle-slider{ transform: translateX(98%); }

/* Texto seleccionado */
#option-public:checked + label{ color: var(--toggle-text-selected); }
#option-cima:checked ~ label[for="option-cima"]{ color: var(--toggle-text-selected); }

/* ======================== GRID TARJETAS ======================== */
.pricing-cards-grid{
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}

.price-card{
  border-radius: var(--card-radius);
  padding: 60px 40px;
  width: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: transform .3s;
}

.price-card:hover{ transform: translateY(-5px); }

/* Colores por tarjeta (Figma) */
.price-card.card-azul10{ background: var(--card-bg-azul10); }
.price-card.card-menta10{ background: var(--card-bg-menta10); }

/* Tipografías */
.plan-name{
  color: var(--plan-title);
  font-size: 32px;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 0 10px 0;
}

.plan-desc{
  color: var(--plan-desc);
  font-size: 16px;
  margin-bottom: 60px;
}

.price-amount-wrapper{
  margin-bottom: 30px;
  height: 40px;
}

.price-value{
  font-size: 32px;
  font-weight: 700;
  color: var(--plan-price);
  font-style: italic;
}

/* Botón comprar */
.btn-buy{
  background: var(--btn-buy-bg);
  color: var(--btn-buy-text);
  padding: 15px 60px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  transition: background .3s;
}

.btn-buy:hover{ background: var(--btn-buy-bg-hover); }

/* ======================== STICKY BOTTOM BAR ======================== */
.sticky-bottom-bar{
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  border-radius: 100px;
  background: rgba(172, 88, 57, 0.15);
  backdrop-filter: blur(10px);
  padding: 15px 30px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  z-index: 1000;
  border: 1px solid rgba(0,0,0,0.05);
}

.bar-content{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bar-rating{
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.rating-score{
  font-weight: 800;
  color: #132B3F;
  font-size: 16px;
}

.stars{
  color: #132B3F;
  font-size: 14px;
  letter-spacing: 2px;
}

.bar-meta{
  text-align: center;
  color: #132B3F;
  display: flex;
  gap: 20px;
  align-items: center;
}

.meta-days{ font-weight: 700; font-size: 16px; }
.meta-price{ font-size: 14px; color: #555; }
.meta-price strong{ color: #132B3F; font-size: 16px; }

.btn-cta-bar{
  background: #D98C27;
  color: #fff;
  padding: 12px 30px;
  border-radius: 30px;
  border-color: #D98C27;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  font-family; 'Montserrat';
  transition: background .3s;
}

.btn-cta-bar:hover{ background: #c27a1f; }

/* ======================== RESPONSIVE ======================== */
@media (max-width: 768px){
  .toggle-bg{ width: 280px; }
  .price-card{ width: 100%; margin-bottom: 20px; }

  .sticky-bottom-bar{
    width: 95%;
    bottom: 10px;
    padding: 10px 15px;
    border-radius: 15px;
  }

  .bar-content{
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  .bar-meta{
    width: 100%;
    justify-content: center;
    gap: 10px;
  }

  .btn-cta-bar{
    width: 100%;
    text-align: center;
  }
}
.prices-subtitle strong{
  font-weight: 800;
}

@media (max-width: 768px) {
  .prices-section {
    padding: 40px 16px 140px;
    /* Evita que el padding genere overflow */
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
  }

  .prices-title {
    font-size: 28px;
    margin-bottom: 12px;
  }

  .prices-subtitle {
    font-size: 14px;
    padding: 0 8px;
    margin-bottom: 28px;
  }

  .pricing-toggle-container {
    margin-bottom: 32px;
  }

  .toggle-bg {
    width: 260px;
    height: 46px;
  }

  .toggle-label {
    font-size: 13px;
    line-height: 38px;
  }

  .pricing-cards-grid {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    /* Clave: evitar que las cards se salgan */
    width: 100%;
    padding: 0;
  }

  .price-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box; /* ← MUY IMPORTANTE */
    padding: 36px 20px;
    margin-bottom: 0;
  }

  .plan-name { font-size: 24px; }
  .price-value { font-size: 26px; }

  .btn-buy {
    padding: 13px 32px;
    font-size: 15px;
  }

  /* Sticky bar */
  .sticky-bottom-bar {
    width: calc(100% - 20px); /* en vez de 95% para ser más preciso */
    bottom: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    box-sizing: border-box;
  }

  .bar-content {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .bar-rating { display: none; } /* opcional: ocultar en móvil para ahorrar espacio */

  .bar-meta {
    width: 100%;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .meta-days { font-size: 14px; }

  .btn-cta-bar {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
  }
}
