/* Checkout — 20260731-checkout-kids-simple / items-fix */
/* checkout-kids-simple — soft navy + store blue, big labels/CTA, no neon/gold/yellow */
.kb-checkout {
  --co-navy: #071018;
  --co-panel: #0c1624;
  --co-panel-2: #0a1420;
  --co-edge: hsl(var(--primary) / 0.22);
  --co-ink: #041018;
  --co-muted: rgba(226, 232, 240, 0.64);
  --co-line: rgba(148, 163, 184, 0.14);
  --co-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --co-dur: 0.2s;
  --co-radius: 1rem;
  --co-radius-sm: 0.75rem;
  position: relative;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 767px) {
  .kb-checkout {
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
  }
}
.kb-checkout__header {
  margin-bottom: 1.5rem;
  text-align: center;
}
.kb-checkout__title {
  margin: 0 0 1.1rem;
  font-family: Kanit, Geist, sans-serif;
  font-size: clamp(1.55rem, 3.4vw, 1.95rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: #f8fafc;
}
/* Progress — segmented rail (not classic numbered circles) */
.kb-checkout__steps {
  display: flex;
  justify-content: center;
}
.kb-checkout__stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 auto;
  padding: 0.28rem;
  list-style: none;
  width: 100%;
  max-width: 22rem;
  border-radius: 0.85rem;
  border: 1px solid var(--co-line);
  background: rgba(4, 10, 18, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.kb-checkout__step {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.55rem 0.45rem;
  border-radius: 0.65rem;
  color: rgba(226, 232, 240, 0.45);
  transition:
    background var(--co-dur) var(--co-ease),
    color var(--co-dur) var(--co-ease),
    box-shadow var(--co-dur) var(--co-ease);
}
.kb-checkout__step + .kb-checkout__step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: var(--co-line);
  pointer-events: none;
}
.kb-checkout__step.is-done {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.1);
}
.kb-checkout__step.is-current {
  color: var(--co-ink);
  background: hsl(var(--primary));
  box-shadow: 0 0 0 1px hsl(var(--primary) / 0.35);
}
.kb-checkout__step-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-family: Kanit, Geist, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  min-width: 1.1rem;
}
.kb-checkout__step-check {
  width: 0.85rem;
  height: 0.85rem;
  stroke-width: 2.75;
}
.kb-checkout__step-label {
  font-family: Kanit, Geist, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
}
@media (max-width: 380px) {
  .kb-checkout__step {
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.5rem 0.3rem;
  }
  .kb-checkout__step-label {
    font-size: 0.62rem;
  }
}
/* Grid */
.kb-checkout__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (min-width: 768px) {
  .kb-checkout__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 1.5rem;
  }
}
.kb-checkout__main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  order: 2;
}
.kb-checkout__summary {
  order: 1;
}
@media (min-width: 768px) {
  .kb-checkout__main {
    order: 1;
  }
  .kb-checkout__summary {
    order: 2;
    position: sticky;
    top: calc(1rem + 80px);
    align-self: start;
  }
}
/* Soft panels — thin border, no glow */
.kb-checkout__card,
.kb-checkout__summary {
  background: var(--co-panel);
  border: 1px solid var(--co-edge);
  border-radius: var(--co-radius);
  box-shadow: 0 10px 28px -20px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.kb-checkout__section {
  padding: 1.15rem 1.15rem 0.35rem;
}
.kb-checkout__section--nested {
  margin: 0.35rem 1rem 0.65rem;
  padding: 0.85rem 0.9rem;
  border-radius: var(--co-radius-sm);
  border: 1px solid var(--co-line);
  background: rgba(4, 10, 18, 0.35);
}
.kb-checkout__section-divider {
  height: 1px;
  margin: 0.65rem 1.15rem 0;
  background: var(--co-line);
}
.kb-checkout__section-head,
.kb-checkout__summary-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}
.kb-checkout__section-icon {
  width: 1.15rem;
  height: 1.15rem;
  color: hsl(var(--primary));
  flex-shrink: 0;
}
.kb-checkout__section-title {
  margin: 0;
  font-family: Kanit, Geist, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f8fafc;
}
.kb-checkout__section-body {
  padding-bottom: 0.85rem;
}
.kb-checkout__section-body--stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
/* Labels + fields */
.kb-checkout__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.72);
}
.kb-checkout__field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 560px) {
  .kb-checkout__field-row {
    grid-template-columns: 1fr 1fr;
  }
}
.kb-checkout__field {
  min-width: 0;
}
.kb-checkout input:not([type="checkbox"]):not([type="radio"]),
.kb-checkout select,
.kb-checkout textarea,
.kb-checkout__input {
  min-height: 2.85rem;
  height: auto;
  padding: 0.7rem 0.9rem;
  border-radius: var(--co-radius-sm);
  border: 1px solid var(--co-line);
  background: rgba(4, 10, 18, 0.55);
  color: #f8fafc;
  font-size: 0.9375rem;
  transition:
    border-color var(--co-dur) ease,
    box-shadow var(--co-dur) ease,
    background var(--co-dur) ease;
}
.kb-checkout input:not([type="checkbox"]):not([type="radio"]):hover,
.kb-checkout select:hover,
.kb-checkout__input:hover {
  border-color: hsl(var(--primary) / 0.35);
}
.kb-checkout input:not([type="checkbox"]):not([type="radio"]):focus,
.kb-checkout input:not([type="checkbox"]):not([type="radio"]):focus-visible,
.kb-checkout select:focus,
.kb-checkout select:focus-visible,
.kb-checkout__input:focus,
.kb-checkout__input:focus-visible {
  outline: none;
  border-color: hsl(var(--primary) / 0.65);
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.18);
  background: rgba(4, 10, 18, 0.72);
}
.kb-checkout input[readonly] {
  opacity: 0.72;
}
/* Gateways */
.kb-checkout__gateways {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.kb-checkout__gateway {
  text-align: start;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--co-radius-sm);
  border: 1.5px solid var(--co-line);
  background: rgba(4, 10, 18, 0.4);
  cursor: pointer;
  transition:
    border-color var(--co-dur) ease,
    background var(--co-dur) ease;
}
.kb-checkout__gateway:hover {
  border-color: hsl(var(--primary) / 0.4);
  background: hsl(var(--primary) / 0.05);
}
.kb-checkout__gateway[data-selected="true"] {
  border-color: hsl(var(--primary) / 0.65);
  background: hsl(var(--primary) / 0.1);
}
.kb-checkout__gateway-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 0.65rem;
  border: 1px solid var(--co-line);
  background: rgba(4, 10, 18, 0.65);
}
.kb-checkout__gateway-icon img {
  width: 1.45rem;
  height: 1.45rem;
}
.kb-checkout__gateway-meta {
  min-width: 0;
  flex: 1;
}
.kb-checkout__gateway-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.kb-checkout__gateway-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
}
.kb-checkout__gateway-hint {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--co-muted);
}
.kb-checkout__gateway-check {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.35);
  background: transparent;
}
.kb-checkout__gateway[data-selected="true"] .kb-checkout__gateway-check {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary));
  box-shadow: inset 0 0 0 3px var(--co-panel);
}
/* Soft badges — green soft, not neon */
.kb-checkout__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.kb-checkout__badge--fast {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.22);
}
.kb-checkout__badge--card,
.kb-checkout__badge--secure {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.22);
}
.kb-checkout__badge--off {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.1);
  border-color: hsl(var(--primary) / 0.28);
}
.kb-checkout__secure {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.22);
  white-space: nowrap;
}
/* Actions + pay */
.kb-checkout__actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.85rem 1.15rem 1.25rem;
}
.kb-checkout__terms {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--co-muted);
}
.kb-checkout__terms input[type="checkbox"] {
  margin-top: 0.15rem;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  accent-color: hsl(var(--primary));
  cursor: pointer;
}
.kb-checkout__terms a {
  color: #f8fafc;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.kb-checkout__terms a:hover,
.kb-checkout__terms a:focus-visible {
  color: hsl(var(--primary));
  outline: none;
}
/* Huge friendly Pagar — solid store blue, no yellow/gold, no neon bloom */
.kb-checkout__pay,
.kb-checkout #pay-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3.65rem;
  height: auto;
  padding: 1rem 1.35rem;
  font-family: Kanit, Geist, sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--co-radius-sm);
  border: none;
  background: hsl(var(--primary));
  background-color: hsl(var(--primary));
  color: var(--co-ink);
  text-shadow: none;
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.45);
  transition:
    transform var(--co-dur) var(--co-ease),
    filter var(--co-dur) ease,
    opacity var(--co-dur) ease;
}
.kb-checkout__pay-sep {
  opacity: 0.55;
  font-weight: 600;
}
.kb-checkout__pay:hover:not(:disabled),
.kb-checkout #pay-button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
}
.kb-checkout__pay:active:not(:disabled),
.kb-checkout #pay-button:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
  filter: brightness(0.98);
}
.kb-checkout__pay:focus-visible,
.kb-checkout #pay-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.35);
}
.kb-checkout__pay:disabled,
.kb-checkout #pay-button:disabled {
  opacity: 0.75;
  cursor: wait;
}
/* Summary */
.kb-checkout__summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem 0;
}
.kb-checkout__summary-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.45rem 1.1rem 1rem;
  min-width: 0;
}
.kb-checkout__items {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  container-type: inline-size;
  container-name: kb-checkout-items;
}
.kb-checkout__empty {
  font-size: 0.875rem;
  color: var(--co-muted);
}
.kb-checkout__divider {
  height: 1px;
  width: 100%;
  background: var(--co-line);
  border: 0;
}
/* Coupon */
.kb-checkout #coupon .flex,
.kb-checkout__coupon {
  display: flex;
  gap: 0.5rem;
  min-height: 2.85rem;
  height: 2.85rem;
}
.kb-checkout #coupon input {
  flex: 1;
  height: 100%;
  min-width: 0;
  padding-inline: 0.85rem;
}
.kb-checkout #coupon button,
.kb-checkout__coupon-btn {
  flex-shrink: 0;
  height: 100%;
  min-width: 5.5rem;
  padding-inline: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: var(--co-radius-sm);
  font-family: Kanit, Geist, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid hsl(var(--primary) / 0.4);
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  cursor: pointer;
  transition:
    background var(--co-dur) ease,
    border-color var(--co-dur) ease;
}
.kb-checkout #coupon button:hover,
.kb-checkout__coupon-btn:hover {
  background: hsl(var(--primary) / 0.2);
  border-color: hsl(var(--primary) / 0.6);
}
.kb-checkout #coupon button[data-state="remove"] {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}
/* Pricing */
.kb-checkout__pricing,
.kb-checkout #pricing {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.kb-checkout #pricing li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--co-muted);
}
.kb-checkout #pricing .discount-value {
  color: #4ade80;
}
.kb-checkout #pricing li:last-child {
  margin-top: 0.25rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--co-line);
  font-family: Kanit, Geist, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
}
.kb-checkout #pricing .total-value {
  color: hsl(var(--primary));
}
/* Line items — 20260731-checkout-items-fix: colunas claras, sem overlap nome/qty */
.kb-checkout-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  padding: 0.4rem 0;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
/* Só vira linha quando o painel Resumo tem largura de verdade (não o viewport) */
@container kb-checkout-items (min-width: 420px) {
  .kb-checkout-item {
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
  }
  .kb-checkout-item__ops {
    justify-content: flex-end;
    margin-left: auto;
  }
}
.kb-checkout-item__main {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.kb-checkout-item__thumb {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: 0.65rem;
  border: 1px solid var(--co-line);
  background: rgba(4, 10, 18, 0.55);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.kb-checkout-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kb-checkout-item__info {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.kb-checkout-item__name {
  font-size: 0.875rem;
  font-weight: 650;
  color: #f1f5f9;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kb-checkout-item__unit {
  font-size: 0.75rem;
  color: var(--co-muted);
  margin-top: 0.12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kb-checkout-item__ops {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex: 0 0 auto;
  flex-shrink: 0;
  min-width: 0;
}
.kb-checkout-item__controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  flex-shrink: 0;
}
.kb-checkout-item__controls button {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 0.6rem;
  border: 1px solid var(--co-line);
  background: rgba(4, 10, 18, 0.5);
  color: #e2e8f0;
  cursor: pointer;
  transition:
    border-color var(--co-dur) ease,
    background var(--co-dur) ease,
    color var(--co-dur) ease;
}
@media (min-width: 400px) {
  .kb-checkout-item__controls button {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 44px;
    min-height: 44px;
  }
}
.kb-checkout-item__controls button:hover {
  border-color: hsl(var(--primary) / 0.45);
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.08);
}
.kb-checkout-item__controls button[data-cart-action="remove"] {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}
.kb-checkout-item__controls input {
  flex: 0 0 auto;
  width: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  height: 2.5rem;
  text-align: center;
  padding: 0;
  background: transparent;
  box-sizing: border-box;
}
@media (min-width: 400px) {
  .kb-checkout-item__controls input {
    width: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    height: 2.75rem;
  }
}
.kb-checkout-item__line {
  flex: 0 0 auto;
  flex-shrink: 0;
  min-width: 4.75rem;
  text-align: end;
  font-family: Kanit, Geist, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #f8fafc;
  white-space: nowrap;
}
@media (max-width: 380px) {
  .kb-checkout-item__ops {
    flex-wrap: wrap;
  }
  .kb-checkout-item__line {
    min-width: auto;
    margin-left: auto;
  }
}
.kb-checkout #upsell-recommendations .rounded-cc,
.kb-checkout #upsell-recommendations [class*="rounded"] {
  border-color: var(--co-line);
}
.kb-checkout #upsell-recommendations p {
  font-family: Kanit, Geist, sans-serif;
}
.kb-checkout #discord-login {
  border-radius: var(--co-radius-sm);
  min-height: 2.85rem;
}
/* Compat: old panel class names if referenced elsewhere */
.kb-checkout__panel {
  background: var(--co-panel);
  border: 1px solid var(--co-edge);
  border-radius: var(--co-radius);
  overflow: hidden;
}
.kb-checkout__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--co-line);
}
.kb-checkout__panel-title {
  margin: 0;
  font-family: Kanit, Geist, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}
.kb-checkout__panel-body {
  padding: 1rem 1.1rem;
}
.kb-checkout__panel-body--stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (prefers-reduced-motion: reduce) {
  .kb-checkout__gateway,
  .kb-checkout__pay,
  .kb-checkout #pay-button,
  .kb-checkout #coupon button,
  .kb-checkout-item__controls button {
    transition: none;
  }
  .kb-checkout__pay:hover:not(:disabled),
  .kb-checkout #pay-button:hover:not(:disabled) {
    transform: none;
  }
}