/* =============================================
   GESTESCOLAR – CHECKOUT PAGE (Side-by-side)
   ============================================= */

.checkout-page-wrapper {
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  background: #fff;
}

.checkout-page-wrapper .lp-footer {
  margin-top: auto;
}

.checkout-container {
  display: grid;
  grid-template-columns: 1fr 2fr 2fr 1fr;
  gap: 0;
  flex: 1;
  background: #fff;
  align-items: start;
}

/* ── ESQUERDA: FORMULÁRIO ── */
.checkout-left {
  grid-column: 2;
  background: #fff;
  padding: 48px 40px 48px 24px;
  overflow-y: auto;
  border-right: 1px solid #eee;
  min-height: calc(100vh - 140px);
}

.checkout-form-wrapper {
  max-width: 520px;
  margin: 0 auto;
}

.checkout-section {
  margin-bottom: 20px;
  padding: 20px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8eaed;
  transition: all 0.25s;
}

.checkout-section:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(26,115,232,0.08);
}

.checkout-section-title {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 700;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── FORMULÁRIO ── */
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 13px;
  transition: all 0.2s;
  background: #fafafa;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
  outline: none;
}

/* ── DIREITA: PAGAMENTO ── */
.checkout-right {
  grid-column: 3;
  background: #f6f8fb;
  padding: 48px 24px 48px 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: calc(100vh - 140px);
}

/* ── CABEÇALHO DO PRODUTO ── */
.checkout-product-header {
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  border-radius: 16px;
  padding: 20px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.checkout-product-header::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

.checkout-product-title {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.checkout-product-title > i {
  font-size: 28px;
  opacity: .9;
}

.checkout-product-name {
  font-size: 13px;
  font-weight: 700;
  opacity: .85;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.checkout-product-price {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
  margin-top: 2px;
}

.checkout-product-price span {
  font-size: 13px;
  font-weight: 500;
  opacity: .8;
  margin-left: 2px;
}

.checkout-saving-badge {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #a5d6a7;
  background: rgba(255,255,255,0.12);
  padding: 4px 10px;
  border-radius: 20px;
  position: relative;
  z-index: 1;
}

/* ── PAGAMENTO ── */
.checkout-payment {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e8eaed;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.checkout-payment-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.checkout-tab {
  padding: 11px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  color: #666;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.checkout-tab:hover {
  border-color: var(--primary);
  background: rgba(26,115,232,0.04);
}

.checkout-tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.checkout-tab-content {
  display: none;
  animation: fadeIn 0.25s;
}

.checkout-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── CUPOM ── */
.checkout-coupon {
  margin: 14px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
}

/* ── RESUMO ── */
.checkout-summary {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0 0;
  border: 1px solid #e0e0e0;
}

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 13px;
  color: #666;
}

/* ══════════════════════════════════════════════
   ANIMAÇÃO DO CARTÃO DE CRÉDITO
══════════════════════════════════════════════ */
.cc-scene {
  width: 100%;
  perspective: 1000px;
  margin-bottom: 4px;
}

.cc-card {
  width: 100%;
  max-width: 340px;
  height: 195px;
  margin: 0 auto;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
  cursor: default;
}

.cc-card.flipped {
  transform: rotateY(180deg);
}

/* Frente */
.cc-front,
.cc-back {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  padding: 22px 24px;
  box-sizing: border-box;
  overflow: hidden;
}

.cc-front {
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.4s;
}

.cc-front::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}

.cc-front::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -20px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.cc-front-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Chip */
.cc-chip {
  width: 38px;
  height: 28px;
  background: linear-gradient(135deg, #d4a017, #f0c040);
  border-radius: 5px;
  position: relative;
  overflow: hidden;
}

.cc-chip::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(0,0,0,0.2);
}

.cc-chip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0,0,0,0.2);
}

.cc-brand-logo {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 50px;
  height: 28px;
}

/* Número */
.cc-number {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 3px;
  font-family: 'Courier New', monospace;
  position: relative;
  z-index: 2;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.cc-front-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 2;
}

.cc-label {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.cc-holder {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-expiry {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  font-family: 'Courier New', monospace;
}

/* Verso */
.cc-back {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}

.cc-stripe {
  height: 42px;
  background: #111;
  margin-bottom: 18px;
  margin-top: 18px;
}

.cc-sig-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
}

.cc-sig {
  flex: 1;
  height: 34px;
  background: repeating-linear-gradient(
    -45deg,
    #fff,
    #fff 4px,
    #f0f0f0 4px,
    #f0f0f0 8px
  );
  border-radius: 4px;
}

.cc-cvv-box {
  background: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  text-align: center;
  min-width: 48px;
}

.cc-cvv-val {
  font-size: 14px;
  font-weight: 900;
  color: #333;
  letter-spacing: 2px;
  font-family: 'Courier New', monospace;
}

.cc-back-logo {
  position: absolute;
  bottom: 16px;
  right: 20px;
}

/* ── RESPONSIVO ── */
@media (max-width: 1200px) {
  .checkout-container { grid-template-columns: 0.5fr 2fr 2fr 0.5fr; }
}

@media (max-width: 900px) {
  .checkout-container {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .checkout-left {
    grid-column: 1;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid #eee;
    padding: 36px 24px;
  }
  .checkout-right {
    grid-column: 1;
    min-height: auto;
    padding: 36px 24px;
  }
  .checkout-row {
    grid-template-columns: 1fr;
  }
  .checkout-payment-tabs {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .checkout-left  { padding: 24px 16px; }
  .checkout-right { padding: 24px 16px; }
  .checkout-form-wrapper { max-width: 100%; }
  .checkout-section { padding: 14px; margin-bottom: 14px; }
  .checkout-payment { padding: 16px; }
  .cc-number { font-size: 15px; letter-spacing: 2px; }
  .cc-card { height: 170px; }
}

/* ── ANIMAÇÕES DE ENTRADA ── */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.checkout-left  { animation: slideIn 0.4s ease-out 0.05s both; }
.checkout-right { animation: slideIn 0.4s ease-out 0.1s both; }

.checkout-section {
  animation: slideUp 0.4s ease-out forwards;
  opacity: 0;
}

.checkout-section:nth-child(1) { animation-delay: 0.15s; }
.checkout-section:nth-child(2) { animation-delay: 0.2s; }
.checkout-section:nth-child(3) { animation-delay: 0.25s; }
.checkout-section:nth-child(4) { animation-delay: 0.3s; }
