/* ==========================================
   PymeSoftware — Página de compra
   ========================================== */

.buy-page {
  padding: 90px 0 60px;
  min-height: 100vh;
  background: var(--bg-gray);
}

.buy-header {
  text-align: center;
  margin-bottom: 36px;
}
.buy-header h1 {
  font-size: 34px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}
.buy-header p {
  color: var(--text-light);
  font-size: 15px;
}

/* ---- Product selector tabs ---- */
.product-selector {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.prod-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border: 2px solid var(--border);
  border-radius: 100px;
  background: var(--bg);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  font-family: inherit;
  transition: all .2s;
}
.prod-tab:hover { border-color: var(--primary); color: var(--primary); }
.prod-tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.tab-icon { font-size: 16px; }

/* ---- Layout ---- */
.buy-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  align-items: start;
}

/* ---- Plans column ---- */
.plan-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: border-color .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.plan-card:hover { border-color: var(--primary); }
.plan-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.plan-popular-tag {
  position: absolute;
  top: 0; right: 0;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 0 0 0 8px;
}
.plan-radio {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  position: relative;
  transition: border-color .2s;
}
.plan-radio.selected {
  border-color: var(--primary);
  background: var(--primary);
}
.plan-radio.selected::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: #fff;
  border-radius: 50%;
}
.plan-info { flex: 1; }
.plan-name { font-weight: 700; font-size: 15px; color: var(--dark); margin-bottom: 3px; }
.plan-desc { font-size: 13px; color: var(--text-light); }
.plan-price { font-size: 18px; font-weight: 800; color: var(--dark); flex-shrink: 0; }

.includes-box {
  background: var(--primary-l);
  border: 1px solid #BFDBFE;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 8px;
}
.includes-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.includes-box ul { display: flex; flex-direction: column; gap: 8px; }
.includes-box li { font-size: 14px; color: var(--text); }

/* ---- Payment column ---- */
.payment-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}

/* Order summary */
.order-summary {
  background: var(--bg-gray);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
}
.summary-row:last-child { margin-bottom: 0; }
.summary-row.small { color: var(--text-light); font-size: 13px; }
.summary-row.total {
  font-weight: 800;
  font-size: 17px;
  color: var(--dark);
  margin-top: 4px;
}
.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

/* Pay sections */
.pay-section { margin-bottom: 20px; }
.pay-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 10px;
}

/* Card brand logos row */
.card-logos-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.card-logo {
  width: 48px;
  height: 30px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* PayPal label logo */
.paypal-label-logo {
  width: 72px;
  height: 45px;
  object-fit: contain;
  margin-bottom: 10px;
  display: block;
}

/* Stripe area */
.stripe-area { display: flex; flex-direction: column; gap: 8px; }
.stripe-note {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
}

/* Divider */
.pay-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-light);
  font-size: 12px;
}
.pay-divider::before, .pay-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* PayPal */
#paypal-button-container { min-height: 48px; }
.paypal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: var(--bg-gray);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-light);
}
.loading-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.paypal-note {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  margin-top: 8px;
}

/* Stripe button */
.btn-stripe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  background: #635BFF;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background .2s;
  text-decoration: none;
}
.btn-stripe:hover { background: #4F46E5; }

/* Security bar */
.security-bar {
  display: flex;
  justify-content: space-between;
  padding: 14px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.sec-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 900px) {
  .buy-layout { grid-template-columns: 1fr; }
  .payment-col { order: -1; }
}
@media (max-width: 600px) {
  .security-bar { flex-direction: column; gap: 6px; }
}
