/* ============================================================
   VIP BEACH TENNIS — Carrinho · Checkout · Confirmação
   ============================================================ */

/* ── Página base ─────────────────────────────────────────── */
.cart-page {
  min-height: 100vh;
  padding-top: calc(var(--nav-h) + 48px);
  padding-bottom: 80px;
}

.cart-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.cart-page-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}
.cart-page-title em {
  color: var(--red);
  font-style: normal;
}
.cart-page-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 40px;
}

/* ── Layout dois colunas ─────────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
}

/* ── Seção de itens ──────────────────────────────────────── */
.cart-items-section {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
}

.cart-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 24px;
  background: var(--bg-card);
  transition: background .2s;
}
.cart-item:hover { background: var(--bg-3); }

.cart-item-img {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  display: block;
}

.cart-item-info { min-width: 0; }
.cart-item-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.cart-item-price {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}
.cart-item-subtotal {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}

.cart-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* Stepper de quantidade */
.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.qty-btn {
  width: 32px;
  height: 32px;
  background: var(--bg-2);
  border: none;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.qty-btn:hover { background: var(--red); color: #fff; }
.qty-input {
  width: 44px;
  height: 32px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  color: var(--text);
  text-align: center;
  font-size: 14px;
  font-family: var(--font-sans);
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-input:focus { outline: none; }

/* Botão remover */
.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  transition: color .15s;
}
.cart-item-remove:hover { color: var(--red); }

/* ── Estado vazio ────────────────────────────────────────── */
.cart-empty {
  text-align: center;
  padding: 80px 40px;
  grid-column: 1 / -1;
}
.cart-empty-icon {
  width: 72px;
  height: 72px;
  background: var(--bg-3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  border: 1px solid var(--border-soft);
}
.cart-empty-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cart-empty h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 8px;
}
.cart-empty p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 32px;
}

/* ── Painel de resumo (sidebar) ──────────────────────────── */
.cart-summary {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 28px 24px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.cart-summary-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

/* Cupom */
.coupon-form {
  margin-bottom: 20px;
  display: flex;
  gap: 8px;
}
.coupon-input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  font-family: var(--font-sans);
  transition: border-color .2s;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.coupon-input::placeholder { text-transform: none; letter-spacing: 0; color: var(--text-muted); }
.coupon-input:focus {
  outline: none;
  border-color: var(--red);
}
.coupon-btn {
  padding: 10px 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  white-space: nowrap;
}
.coupon-btn:hover { background: var(--red); border-color: var(--red); }

.coupon-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(232, 25, 44, 0.08);
  border: 1px solid rgba(232, 25, 44, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
}
.coupon-applied-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--red-light);
  font-weight: 600;
}
.coupon-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  transition: color .15s;
}
.coupon-remove-btn:hover { color: var(--red); }

.coupon-feedback {
  font-size: 12px;
  margin-top: 6px;
  min-height: 16px;
}
.coupon-feedback.is-error   { color: var(--red-light); }
.coupon-feedback.is-success { color: #4caf88; }

/* Linhas de total */
.summary-lines { margin-bottom: 20px; }
.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 6px 0;
}
.summary-line-label { color: var(--text-muted); }
.summary-line-value { font-weight: 500; }
.summary-line.discount .summary-line-value { color: #4caf88; }
.summary-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 0;
  border-top: 1px solid var(--border-soft);
  margin-top: 8px;
}
.summary-total-label {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}
.summary-total-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--red);
}

.cart-checkout-btn {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .2s, transform .15s;
  margin-top: 20px;
}
.cart-checkout-btn:hover {
  background: var(--red-light);
  transform: translateY(-1px);
}
.cart-checkout-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.cart-continue-link {
  display: block;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 12px;
  text-decoration: none;
  transition: color .15s;
}
.cart-continue-link:hover { color: var(--text); }

/* ── Badges de segurança ─────────────────────────────────── */
.security-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.security-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
}
.security-badge svg { width: 14px; height: 14px; }

/* ── Progress bar ────────────────────────────────────────── */
.checkout-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}
.progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.progress-step.active { color: var(--text); }
.progress-step.done   { color: #4caf88; }
.progress-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.progress-step.active .progress-step-num {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.progress-step.done .progress-step-num {
  background: #4caf88;
  border-color: #4caf88;
  color: #fff;
}
.progress-divider {
  width: 48px;
  height: 1px;
  background: var(--border);
  margin: 0 4px;
}

/* ── Checkout layout ─────────────────────────────────────── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
}

/* ── Formulário de checkout ──────────────────────────────── */
.checkout-section {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 28px 28px;
  margin-bottom: 20px;
}
.checkout-section-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkout-section-icon {
  width: 32px;
  height: 32px;
  background: var(--red-glow);
  border: 1px solid rgba(232,25,44,.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.checkout-section-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--red);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Grid de campos */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: 1; }
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.form-input,
.form-select {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font-sans);
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(232, 25, 44, .1);
}
.form-input.is-invalid {
  border-color: var(--red);
}
.form-input-hint {
  font-size: 11px;
  color: var(--text-muted);
}

/* Seleção de método de pagamento */
.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 500px) {
  .payment-methods { grid-template-columns: 1fr; }
}
.payment-method-option {
  display: none;
}
.payment-method-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--bg-2);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  position: relative;
}
.payment-method-label:hover {
  border-color: rgba(232,25,44,.4);
  background: var(--bg-3);
}
.payment-method-option:checked + .payment-method-label {
  border-color: var(--red);
  background: var(--red-glow);
}
.payment-method-label .method-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-3);
}
.payment-method-label .method-icon svg {
  width: 20px;
  height: 20px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.method-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Campos do cartão */
.card-fields {
  display: none;
  margin-top: 20px;
}
.card-fields.visible { display: block; }

/* ── Resumo do checkout (sidebar) ────────────────────────── */
.checkout-order-summary {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 24px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.checkout-order-summary h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.checkout-item-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.checkout-item-mini-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.checkout-item-mini-info {
  min-width: 0;
  flex: 1;
}
.checkout-item-mini-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.checkout-item-mini-qty {
  font-size: 12px;
  color: var(--text-muted);
}
.checkout-item-mini-price {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* Botão finalizar */
.checkout-submit-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background .2s, transform .15s;
  margin-top: 20px;
}
.checkout-submit-btn:hover { background: var(--red-light); transform: translateY(-1px); }
.checkout-submit-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── PIX Modal ───────────────────────────────────────────── */
.pix-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pix-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 40px 32px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  animation: pix-slide-up .4s var(--ease-out) both;
}
@keyframes pix-slide-up {
  from { opacity: 0; transform: translateY(32px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.pix-modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}
.pix-modal-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}
.pix-qr-wrap {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  display: inline-block;
  margin: 0 auto 24px;
}
.pix-qr-wrap img { width: 200px; height: 200px; display: block; }
.pix-copy-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.pix-copy-area {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.pix-copy-input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11px;
  color: var(--text-dim);
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pix-copy-btn {
  padding: 10px 16px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.pix-copy-btn:hover { background: var(--red-light); }

.pix-timer {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.pix-timer strong { color: var(--text); }

.pix-confirm-link {
  display: block;
  padding: 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.pix-confirm-link:hover { border-color: var(--text-muted); color: var(--text); }

/* ── Confirmação de pedido ───────────────────────────────── */
.order-confirmed {
  min-height: 100vh;
  padding-top: calc(var(--nav-h) + 48px);
  padding-bottom: 80px;
}
.order-confirmed-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 40px;
}
.order-confirmed-icon {
  width: 80px;
  height: 80px;
  background: rgba(76, 175, 136, .12);
  border: 1px solid rgba(76, 175, 136, .3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.order-confirmed-icon svg {
  width: 40px;
  height: 40px;
  stroke: #4caf88;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.order-confirmed h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}
.order-confirmed-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
}
.order-code {
  display: inline-block;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 12px;
  font-family: monospace;
  font-size: 13px;
  color: var(--text-dim);
}

.order-details-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
}
.order-details-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}
.order-details-body { padding: 20px 24px; }

.order-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
}
.order-detail-row:last-child { border-bottom: none; }
.order-detail-label { color: var(--text-muted); }
.order-detail-value { font-weight: 500; text-align: right; max-width: 60%; }

.order-items-list { list-style: none; padding: 0; }
.order-items-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.order-items-list li:last-child { border-bottom: none; }
.order-item-qty { color: var(--text-muted); font-size: 12px; }

.order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-3);
  border-top: 1px solid var(--border-soft);
}
.order-total-label {
  font-family: var(--font-display);
  font-weight: 700;
}
.order-total-value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--red);
}

.order-next-steps {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
}
.order-next-steps h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
}
.next-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-muted);
}
.next-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--text);
}

/* ── Admin pedidos ───────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.status-pendente           { background: rgba(115,115,115,.15); color: #a3a3a3; }
.status-aguardando_pagamento { background: rgba(255,152,0,.1);  color: #ff9800; }
.status-pago               { background: rgba(76,175,136,.12); color: #4caf88; }
.status-enviado            { background: rgba(33,150,243,.1);  color: #2196f3; }
.status-entregue           { background: rgba(76,175,136,.2);  color: #4caf88; }
.status-cancelado          { background: rgba(232,25,44,.1);   color: var(--red-light); }
.status-estornado          { background: rgba(156,39,176,.1);  color: #ce93d8; }

/* ── Responsivo mobile ───────────────────────────────────── */
@media (max-width: 600px) {
  .cart-container { padding: 0 16px; }
  .cart-item { grid-template-columns: 64px 1fr; gap: 12px; padding: 16px; }
  .cart-item-right { flex-direction: row; justify-content: space-between; align-items: center; }
  .checkout-section { padding: 20px 16px; }
  .pix-modal { padding: 28px 20px; }
  .order-confirmed-inner { padding: 0 16px; }
}
