/* ============================================
   CALCULADORA DE MEMBRESÍAS
   ============================================ */

.calculadora {
  background: linear-gradient(180deg, var(--bg-light) 0%, var(--privital-white) 100%);
  position: relative;
  overflow: hidden;
}

.calculadora::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(23, 190, 187, 0.06) 0%, transparent 70%);
  top: -10%;
  right: -10%;
  border-radius: 50%;
  pointer-events: none;
}

.calculadora__wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
}

.calculadora__panel {
  background: var(--privital-white);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-light);
}

.calculadora__group {
  margin-bottom: var(--space-2xl);
}

.calculadora__group:last-child {
  margin-bottom: 0;
}

.calculadora__label {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.calculadora__hint {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* --- Plan picker --- */
.calculadora__plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.plan-pick {
  position: relative;
  background: var(--privital-white);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  cursor: pointer;
  text-align: left;
  transition: all 0.3s ease;
  font-family: inherit;
}

.plan-pick:hover {
  border-color: var(--privital-celeste);
  background: rgba(23, 190, 187, 0.03);
  transform: translateY(-2px);
}

.plan-pick--active {
  border-color: var(--privital-celeste);
  background: linear-gradient(135deg, rgba(23, 190, 187, 0.08) 0%, rgba(86, 217, 176, 0.08) 100%);
  box-shadow: 0 8px 24px rgba(23, 190, 187, 0.15);
}

.plan-pick__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(23, 190, 187, 0.12);
  color: var(--privital-celeste);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  transition: all 0.3s ease;
}

.plan-pick--active .plan-pick__icon {
  background: var(--privital-gradient);
  color: white;
}

.plan-pick__name {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.plan-pick__from {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.plan-pick__price {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--privital-celeste);
  margin-top: 4px;
}

.plan-pick__price span {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
}

.plan-pick__badge {
  position: absolute;
  top: -10px;
  right: var(--space-md);
  background: var(--acerta-naranja);
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Counter --- */
.counter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-light);
  padding: 8px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-light);
}

.counter__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--privital-white);
  border: none;
  color: var(--privital-celeste);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.counter__btn:hover {
  background: var(--privital-gradient);
  color: white;
  transform: scale(1.05);
}

.counter__btn:active {
  transform: scale(0.95);
}

.counter__value {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-primary);
  min-width: 40px;
  text-align: center;
}

/* --- Periodo --- */
.calculadora__period {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.period-pick {
  position: relative;
  background: var(--privital-white);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-sm);
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  font-family: inherit;
}

.period-pick:hover {
  border-color: var(--privital-celeste);
  transform: translateY(-2px);
}

.period-pick--active {
  border-color: var(--privital-celeste);
  background: linear-gradient(135deg, rgba(23, 190, 187, 0.08) 0%, rgba(86, 217, 176, 0.08) 100%);
}

.period-pick__name {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.period-pick__desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.period-pick__badge {
  position: absolute;
  top: -10px;
  right: 50%;
  transform: translateX(50%);
  background: var(--privital-gradient);
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* --- Resumen --- */
.calculadora__resumen {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a2a3a 50%, #0a2e2e 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  color: var(--privital-white);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.calculadora__resumen::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(23, 190, 187, 0.15) 0%, transparent 70%);
  top: -50px;
  right: -50px;
  border-radius: 50%;
  pointer-events: none;
}

.resumen__header {
  position: relative;
  margin-bottom: var(--space-xl);
}

.resumen__header .badge {
  margin-bottom: var(--space-sm);
}

.resumen__header h3 {
  color: var(--privital-white);
  font-size: var(--text-2xl);
  margin-bottom: 0;
}

.resumen__lineas {
  position: relative;
  margin-bottom: var(--space-xl);
}

.resumen__linea {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-md) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: var(--space-md);
}

.resumen__linea[hidden] {
  display: none;
}

.resumen__linea-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.resumen__linea-label strong {
  color: var(--privital-white);
  font-size: var(--text-sm);
  font-weight: 600;
}

.resumen__linea-label span {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-xs);
}

.resumen__linea-precio {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--privital-white);
  white-space: nowrap;
}

.resumen__linea--sub .resumen__linea-label strong,
.resumen__linea--sub .resumen__linea-precio {
  color: rgba(255, 255, 255, 0.85);
}

.resumen__linea-precio--neg {
  color: #56D9B0 !important;
}

.resumen__total {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  background: linear-gradient(135deg, rgba(23, 190, 187, 0.15) 0%, rgba(86, 217, 176, 0.1) 100%);
  border: 1px solid rgba(23, 190, 187, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.resumen__total-label {
  display: flex;
  flex-direction: column;
}

.resumen__total-label span {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--privital-white);
}

.resumen__total-label small {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.resumen__total-precio {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.resumen__total-currency {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

.resumen__total-precio span:last-child {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 800;
  background: linear-gradient(135deg, #17BEBB 0%, #56D9B0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.resumen__ahorro {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 117, 70, 0.15);
  border: 1px solid rgba(255, 117, 70, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  color: var(--acerta-naranja);
  font-size: var(--text-sm);
}

.resumen__ahorro[hidden] {
  display: none;
}

.resumen__ahorro strong {
  color: #ff9a76;
}

.resumen__resumen .btn {
  margin-top: var(--space-md);
}

.resumen__nota {
  position: relative;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin-top: var(--space-md);
  margin-bottom: 0;
}

/* Responsive */
@media (min-width: 640px) {
  .calculadora__plans {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .calculadora__wrap {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }

  .calculadora__resumen {
    position: sticky;
    top: 100px;
  }
}
