/* Checkout — extraído de theme-after-platform.css (limite sync CentralCart) */
/* Checkout: campos com ícone e cupom do resumo */
body.kingdom-checkout {
  position: relative;
  isolation: isolate;
  background: #0d0f14;
}

body.kingdom-checkout::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: var(--checkout-product-bg, none);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: var(--checkout-product-bg-opacity, 0);
  filter: blur(16px) saturate(0.72) brightness(0.62);
  transform: scale(1.06);
  transition: opacity 0.28s ease, background-image 0.28s ease;
  pointer-events: none;
}

body.kingdom-checkout::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 85% 62% at 50% 8%, rgba(13, 15, 20, 0.42), rgba(13, 15, 20, 0.86) 62%, #0d0f14 100%),
    linear-gradient(180deg, rgba(13, 15, 20, 0.82), #0d0f14 82%);
  pointer-events: none;
}

body.kingdom-checkout #checkout {
  max-width: min(94vw, 1320px) !important;
  padding-top: 2rem !important;
}

body.kingdom-checkout #checkout > .grid {
  gap: 1rem !important;
}

@media (min-width: 1024px) {
  body.kingdom-checkout #checkout > .grid {
    gap: 1.15rem !important;
  }
}

body.kingdom-checkout #checkout .checkout-card,
body.kingdom-checkout #checkout .checkout-summary-panel {
  border-radius: 1rem !important;
  border-color: rgba(148, 163, 184, 0.14) !important;
  background: rgba(10, 12, 17, 0.92) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

body.kingdom-checkout #checkout .checkout-card > div:first-child,
body.kingdom-checkout #checkout .checkout-summary-panel > div:first-child {
  padding: 1rem 1.15rem !important;
  background: rgba(255, 255, 255, 0.025);
}

body.kingdom-checkout #checkout .checkout-card > div:not(:first-child),
body.kingdom-checkout #checkout .checkout-summary-panel > div:not(:first-child) {
  padding: 1.15rem !important;
}

body.kingdom-checkout #checkout .checkout-card > div:first-child > span,
body.kingdom-checkout #checkout .checkout-summary-panel > div:first-child span:first-child {
  border-radius: 0.78rem !important;
}

body.kingdom-checkout #checkout [data-payment-method] {
  border-radius: 0.85rem !important;
  padding: 1rem !important;
  background: rgba(255, 255, 255, 0.028) !important;
}

body.kingdom-checkout #checkout [data-payment-method] > div {
  gap: 1rem !important;
}

body.kingdom-checkout #checkout [data-payment-method] .size-16 {
  width: 3.3rem !important;
  height: 3.3rem !important;
  border-radius: 0.75rem !important;
}

body.kingdom-checkout #checkout input,
body.kingdom-checkout #checkout select {
  border-radius: 0.75rem !important;
  background-color: rgba(8, 10, 15, 0.78) !important;
  color: #f8fafc !important;
  caret-color: #45d1ff;
  -webkit-text-fill-color: #f8fafc !important;
}

body.kingdom-checkout #checkout input[name='client_name'],
body.kingdom-checkout #checkout input[name='client_email'] {
  min-height: 3.45rem !important;
  border-radius: 0.9rem !important;
  font-size: 1.05rem !important;
  font-weight: 600;
}

body.kingdom-checkout #checkout input[name='client_name'].checkout-input-with-icon,
body.kingdom-checkout #checkout input[name='client_email'].checkout-input-with-icon {
  padding-left: 3.15rem !important;
}

body.kingdom-checkout #checkout input::placeholder,
body.kingdom-checkout #checkout select::placeholder {
  color: rgba(148, 163, 184, 0.82) !important;
  -webkit-text-fill-color: rgba(148, 163, 184, 0.82) !important;
}

body.kingdom-checkout #checkout input:-webkit-autofill,
body.kingdom-checkout #checkout input:-webkit-autofill:hover,
body.kingdom-checkout #checkout input:-webkit-autofill:focus,
body.kingdom-checkout #checkout select:-webkit-autofill,
body.kingdom-checkout #checkout select:-webkit-autofill:hover,
body.kingdom-checkout #checkout select:-webkit-autofill:focus {
  border-color: rgba(69, 209, 255, 0.26) !important;
  box-shadow: 0 0 0 1000px rgba(8, 10, 15, 0.96) inset !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(8, 10, 15, 0.96) inset !important;
  -webkit-text-fill-color: #f8fafc !important;
  caret-color: #45d1ff;
}

body.kingdom-checkout #checkout #empty-packages,
body.kingdom-checkout #checkout #pricing,
body.kingdom-checkout #checkout .checkout-coupon-card,
body.kingdom-checkout #checkout .checkout-terms-label {
  border-radius: 0.85rem !important;
}

body.kingdom-checkout #checkout #packages-list {
  gap: 0.75rem !important;
}

body.kingdom-checkout #checkout .checkout-summary-panel > .space-y-6 {
  gap: 1rem !important;
}

body.kingdom-checkout #checkout #pay-button {
  min-height: 3.35rem !important;
  border-radius: 0.9rem !important;
  padding-block: 0.85rem !important;
}

body.kingdom-checkout #checkout .checkout-field-with-icon {
  position: relative;
}

body.kingdom-checkout #checkout .checkout-input-icon,
body.kingdom-checkout #checkout .checkout-field-with-icon > svg {
  position: absolute !important;
  left: 0.95rem !important;
  top: 50% !important;
  z-index: 2;
  width: 1.05rem !important;
  height: 1.05rem !important;
  transform: translateY(-50%) !important;
  color: rgba(148, 163, 184, 0.92) !important;
  pointer-events: none;
}

body.kingdom-checkout #checkout .checkout-field-with-icon > i.checkout-input-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

body.kingdom-checkout #checkout .checkout-input-with-icon {
  padding-left: 3rem !important;
}

body.kingdom-checkout #checkout [data-field-type='ROBLOX'] input {
  padding-left: 3rem !important;
}

body.kingdom-checkout #checkout [data-field-type='ROBLOX'] [data-lucide='search'],
body.kingdom-checkout #checkout [data-field-type='ROBLOX'] [id^='roblox-input-avatar-'] {
  left: 0.95rem !important;
  z-index: 2;
}

body.kingdom-checkout #checkout .checkout-coupon-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 0% 0%, rgba(69, 209, 255, 0.1), transparent 34%),
    rgba(255, 255, 255, 0.025);
  padding: 1rem;
}

body.kingdom-checkout #checkout .checkout-coupon-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(69, 209, 255, 0.08), transparent 46%);
}

body.kingdom-checkout #checkout .checkout-coupon-card > * {
  position: relative;
  z-index: 1;
}

body.kingdom-checkout #checkout .checkout-coupon-label__icon {
  box-shadow: 0 0 18px -10px hsl(var(--primary));
}

body.kingdom-checkout #checkout .checkout-coupon-row {
  align-items: stretch;
}

body.kingdom-checkout #checkout .checkout-coupon-input {
  border-color: rgba(148, 163, 184, 0.16) !important;
  background: rgba(8, 10, 15, 0.72) !important;
}

body.kingdom-checkout #checkout .checkout-coupon-input:focus {
  border-color: hsl(var(--primary) / 0.55) !important;
}

body.kingdom-checkout #checkout .checkout-coupon-submit {
  min-width: 8.25rem;
  box-shadow: 0 12px 28px -18px hsl(var(--primary) / 0.72) !important;
}

@media (max-width: 639px) {
  body.kingdom-checkout #checkout {
    max-width: min(100vw, 34rem) !important;
    padding-inline: 0.75rem !important;
    padding-top: 1.25rem !important;
  }

  body.kingdom-checkout #checkout .checkout-card,
  body.kingdom-checkout #checkout .checkout-summary-panel {
    border-radius: 0.9rem !important;
  }

  body.kingdom-checkout #checkout .checkout-card > div:first-child,
  body.kingdom-checkout #checkout .checkout-summary-panel > div:first-child {
    gap: 0.75rem !important;
    padding: 0.85rem 0.9rem !important;
  }

  body.kingdom-checkout #checkout .checkout-card > div:not(:first-child),
  body.kingdom-checkout #checkout .checkout-summary-panel > div:not(:first-child) {
    padding: 0.9rem !important;
  }

  body.kingdom-checkout #checkout [data-payment-method] {
    padding: 0.85rem !important;
  }

  body.kingdom-checkout #checkout [data-payment-method] > div {
    gap: 0.8rem !important;
  }

  body.kingdom-checkout #checkout [data-payment-method] .size-16 {
    width: 2.85rem !important;
    height: 2.85rem !important;
  }

  body.kingdom-checkout #checkout input[name='client_name'],
  body.kingdom-checkout #checkout input[name='client_email'] {
    min-height: 3.15rem !important;
    font-size: 0.98rem !important;
  }

  body.kingdom-checkout #checkout [data-field-type='ROBLOX'] input {
    min-height: 3rem !important;
    padding-left: 3.1rem !important;
  }

  body.kingdom-checkout #checkout .checkout-coupon-row {
    flex-direction: column;
  }

  body.kingdom-checkout #checkout .checkout-coupon-submit {
    width: 100%;
    min-width: 0;
  }
}

/* Stepper */
.checkout-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checkout-step {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.checkout-step__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  font-weight: 700;
}

.checkout-step--done {
  border-color: rgba(69, 209, 255, 0.2);
  color: rgba(255, 255, 255, 0.78);
}

.checkout-step--done .checkout-step__dot {
  background: rgba(69, 209, 255, 0.15);
  color: hsl(var(--primary));
}

.checkout-step--current {
  border-color: rgba(69, 209, 255, 0.35);
  background: rgba(69, 209, 255, 0.1);
  color: #fff;
}

.checkout-step--current .checkout-step__dot {
  background: hsl(var(--primary));
  color: #0a0a0a;
}

.checkout-step--upcoming {
  opacity: 0.72;
}

/* Pagamento em grid no desktop */
@media (min-width: 900px) {
  body.kingdom-checkout #checkout .checkout-payment-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem !important;
  }

  body.kingdom-checkout #checkout .checkout-payment-option {
    padding: 1rem !important;
    min-height: 100%;
  }
}

/* Carrinho vazio — compacto */
.checkout-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 1.1rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
}

.checkout-empty-state__icon {
  width: 1.35rem;
  height: 1.35rem;
  color: hsl(var(--primary));
  opacity: 0.85;
}

.checkout-empty-state__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.checkout-empty-state__link {
  font-size: 0.82rem;
  font-weight: 600;
  color: hsl(var(--primary));
  text-decoration: underline;
  text-underline-offset: 2px;
}

.checkout-empty-state__link:hover {
  color: hsl(var(--primary) / 0.85);
}

/* Itens do resumo — lista compacta */
.checkout-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.checkout-item:last-child {
  border-bottom: 0;
}

.checkout-item__thumb {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  overflow: hidden;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.checkout-item__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checkout-item__main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 0.35rem;
}

.checkout-item__head,
.checkout-item__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.checkout-item__name {
  min-width: 0;
  flex: 1;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.checkout-item__unit {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.45);
}

.checkout-item__unit span {
  color: rgba(255, 255, 255, 0.32);
}

.checkout-item__total {
  flex-shrink: 0;
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: hsl(var(--primary));
  white-space: nowrap;
}

.checkout-item__controls {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.checkout-item__qty-btn,
.checkout-item__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.checkout-item__qty-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.checkout-item__qty-input {
  width: 1.85rem;
  height: 1.65rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
}

.checkout-item__remove {
  margin-left: 0.15rem;
  border-color: rgba(248, 113, 113, 0.22);
  color: #fca5a5;
}

.checkout-item__remove:hover {
  background: rgba(248, 113, 113, 0.1);
}

/* Remarketing no checkout */
.checkout-remarketing {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.15rem;
}

.checkout-order-bump-wrap:not(.hidden) {
  display: block;
}

.checkout-order-bump {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.85rem;
  border: 1px dashed rgba(69, 209, 255, 0.35);
  background: linear-gradient(135deg, rgba(69, 209, 255, 0.08), rgba(255, 255, 255, 0.02));
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.checkout-order-bump:hover {
  border-color: rgba(69, 209, 255, 0.5);
  background: linear-gradient(135deg, rgba(69, 209, 255, 0.12), rgba(255, 255, 255, 0.03));
}

.checkout-order-bump--active {
  border-style: solid;
  border-color: rgba(69, 209, 255, 0.45);
}

.checkout-order-bump__check {
  margin-top: 0.15rem;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  accent-color: hsl(var(--primary));
  cursor: pointer;
}

.checkout-order-bump__thumb {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: cover;
}

.checkout-order-bump__body {
  min-width: 0;
  flex: 1;
}

.checkout-order-bump__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: hsl(var(--primary));
}

.checkout-order-bump__name {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
}

.checkout-order-bump__price {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}

.checkout-upsell__title {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
}

.checkout-upsell__track {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.checkout-upsell__track::-webkit-scrollbar {
  height: 4px;
}

.checkout-upsell__track::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.checkout-upsell-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 8.5rem;
  scroll-snap-align: start;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.checkout-upsell-card__thumb {
  display: block;
  width: 100%;
  height: 4.5rem;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
}

.checkout-upsell-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem;
}

.checkout-upsell-card__name {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.checkout-upsell-card__price {
  font-size: 0.78rem;
  font-weight: 700;
  color: hsl(var(--primary));
}

.checkout-upsell-card__btn {
  margin-top: auto;
  min-height: 1.85rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(69, 209, 255, 0.28);
  background: rgba(69, 209, 255, 0.1);
  font-size: 0.72rem;
  font-weight: 700;
  color: hsl(var(--primary));
  transition: background-color 0.2s ease;
}

.checkout-upsell-card__btn:hover {
  background: rgba(69, 209, 255, 0.18);
}

.checkout-upsell-card__btn:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Cupom recolhível */
.checkout-coupon-toggle[aria-expanded='true'] .checkout-coupon-toggle__chevron {
  transform: rotate(180deg);
}

body.kingdom-checkout #checkout .checkout-coupon-card {
  padding: 0.85rem !important;
}

.checkout-coupon-body:not(.hidden) {
  animation: checkout-coupon-open 0.2s ease;
}

@keyframes checkout-coupon-open {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Resumo sticky reforçado */
body.kingdom-checkout #checkout .checkout-summary-panel {
  top: calc(var(--site-header-sticky-below, 7.5rem) + 0.5rem) !important;
}

.checkout-pay-hint {
  margin: 0;
}

/* Termos no checkout — área de toque maior no mobile */
body.kingdom-checkout #checkout .checkout-terms-label {
  margin-top: 0.15rem;
  padding: 0.85rem 0.9rem !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.9rem !important;
  -webkit-tap-highlight-color: transparent;
}

body.kingdom-checkout #checkout .checkout-terms-label:has(#terms-checkbox:checked) {
  border-color: hsl(var(--primary) / 0.35) !important;
  background: hsl(var(--primary) / 0.07);
}

body.kingdom-checkout #checkout .checkout-terms-checkbox {
  width: 1.35rem !important;
  height: 1.35rem !important;
  min-width: 1.35rem;
  min-height: 1.35rem;
}

@media (max-width: 639px) {
  body.kingdom-checkout #checkout .checkout-terms-label {
    min-height: 3.35rem;
    padding: 0.95rem 1rem !important;
    gap: 0.85rem !important;
  }

  body.kingdom-checkout #checkout .checkout-terms-label span {
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
  }

  body.kingdom-checkout #checkout .checkout-terms-checkbox {
    width: 1.45rem !important;
    height: 1.45rem !important;
    min-width: 1.45rem;
    min-height: 1.45rem;
    margin-top: 0.1rem !important;
  }

  body.kingdom-checkout #checkout .checkout-pay-block {
    position: sticky;
    bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
    z-index: 4;
    padding-top: 0.35rem;
    background: linear-gradient(180deg, rgba(8, 10, 14, 0), rgba(8, 10, 14, 0.92) 28%, rgba(8, 10, 14, 1));
  }

  body.kingdom-checkout #checkout #pay-button {
    min-height: 3.55rem !important;
    font-size: 1.05rem !important;
  }
}