/* ==========================================================================
   CHECKOUT DESIGN SYSTEM & PROPORTIONS
   Proportions: Col 1 (390px) | Col 2 (390px) | Col 3 (353px) | Gap: 24px
   ========================================================================== */

:root {
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-headings: 'Inter', sans-serif;
  --font-labels: 'Rubik', 'Inter', sans-serif;
  --font-summary: 'Montserrat', 'Inter', sans-serif;

  --color-bg: #FFFFFF;
  --color-page-bg: #FFFFFF;
  --color-card-bg: #FFFFFF;
  --color-border: #E5E7EB;
  --color-border-hover: #D1D5DB;
  --color-text-main: #111827;
  --color-text-heading: #0F172A;
  --color-text-muted: #64748B;
  --color-placeholder: #9CA3AF;

  --color-primary: #111827;
  --color-primary-hover: #000000;
  --color-accent-green: #16A34A;
  --color-green-light: #F0FDF4;
  --color-notice-bg: #00416B;
  --color-notice-text: #F9FAFB;

  --radius-card: 12px;
  --radius-input: 12px;
  --radius-button: 12px;
  --radius-pill: 9999px;
  --input-height: 45px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-base);
  color: var(--color-text-main);
  background-color: var(--color-page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-width: 320px;
  min-height: 100vh;
  background-color: var(--color-page-bg);
  font-size: 13px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   TOP DECORATIVE LINE & SITE HEADER
   ========================================================================== */

.topline {
  height: 4px;
  background: var(--color-primary);
  width: 100%;
}

.site-header {
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  z-index: 10;
}

.site-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  text-decoration: none;
  color: var(--color-text-main);
  display: flex;
  flex-direction: column;
}

.brand-logo {
  display: block;
  width: 160px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.secure-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  background-color: #FFFFFF;
}

.secure-mark svg {
  flex-shrink: 0;
}

.secure-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.secure-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #000000;
}

.secure-subtitle {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #000000;
}

/* ==========================================================================
   NOTICE BANNER
   ========================================================================== */

.notice {
  background-color: var(--color-notice-bg);
  color: var(--color-notice-text);
  text-align: center;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.notice:empty {
  display: none;
}

/* ==========================================================================
   DESKTOP 3-COLUMN CHECKOUT LAYOUT
   Exact Grid Proportions: 390px (Col 1) - 390px (Col 2) - 353px (Col 3)
   ========================================================================== */

.checkout-layout {
  width: 100%;
  max-width: 1240px;
  margin: 32px auto 48px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 390px 390px 353px;
  align-items: start;
  gap: 24px;
  justify-content: center;
}

.panel {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-sizing: border-box;
}

.panel-header {
  margin-bottom: 20px;
}

.panel-header h1,
.panel-header h2 {
  font-family: var(--font-headings);
  font-size: 18px;
  font-weight: 700;
  line-height: 28px;
  color: var(--color-text-heading);
}

.panel-intro {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-heading);
  margin-top: 4px;
  line-height: 1.4;
}

/* ==========================================================================
   COLUMN 1: IDENTIFICAÇÃO (FORM STYLING)
   ========================================================================== */

#checkout-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-family: var(--font-labels);
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  margin-bottom: 6px;
  text-align: left;
}

input:not([type=radio]) {
  width: 100%;
  height: var(--input-height);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  padding: 0 14px;
  background-color: #FFFFFF;
  color: var(--color-text-main);
  font-family: var(--font-base);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:not([type=radio])::placeholder {
  color: var(--color-placeholder);
  font-size: 13px;
}

input:not([type=radio]):focus {
  border-color: #111827;
  box-shadow: 0 0 0 1px #111827;
}

.cpf-group {
  max-width: 240px;
}

/* Phone input with country code badge */
.phone-group {
  max-width: 240px;
}

.phone-input-shell {
  display: flex;
  align-items: center;
  height: var(--input-height);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  background-color: #FFFFFF;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.phone-input-shell:focus-within {
  border-color: #111827;
  box-shadow: 0 0 0 1px #111827;
}

.phone-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 100%;
  background-color: #FFFFFF;
  border-right: 1px solid #E5E7EB;
  color: #111827;
  font-size: 13px;
  font-weight: 500;
  user-select: none;
  flex-shrink: 0;
}

.flag-icon {
  border-radius: 2px;
  object-fit: cover;
}

.phone-input-shell input {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 12px !important;
  height: 100% !important;
  flex: 1;
}

/* Field rows */
.field-row {
  display: grid;
  gap: 12px;
}

.cep-row {
  grid-template-columns: 1.4fr 1fr;
}

.city-row {
  grid-template-columns: 1.6fr 0.8fr;
}

.address-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #384456;
  font-size: 12px;
  font-weight: 600;
  margin: 6px 0 2px;
}

.address-divider::before,
.address-divider::after {
  content: "";
  height: 1px;
  background-color: #E5E7EB;
  flex: 1;
}

/* Pix Savings Banner */
.pix-savings {
  background: linear-gradient(135deg, #F3F4F6, #F3F4F6);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.pix-savings-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pix-savings-icon img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.pix-savings-text {
  font-size: 12px;
  line-height: 1.3;
}

.pix-savings-title {
  font-weight: 600;
  color: #1A1A1A;
}

.green-highlight {
  color: var(--color-accent-green);
  font-weight: 700;
}

.pix-savings-sub {
  font-weight: 600;
  color: #1A1A1A;
}

/* ==========================================================================
   COLUMN 2: PAGAMENTO & FORMAS DE ENVIO
   ========================================================================== */

.payment-option {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 18px 16px;
  background-color: #FFFFFF;
}

.payment-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.radio-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #111827;
}

.pix-logo-wrap {
  width: 30px;
  height: 30px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #FFFFFF;
  flex-shrink: 0;
}

.pix-logo-wrap img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.payment-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.approved {
  margin-left: auto;
  background-color: #4CC97A;
  color: #FFFFFF;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 3px 6px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.payment-title-row .radio-indicator {
  margin-left: 2px;
}

.payment-copy {
  font-size: 12px;
  line-height: 1.45;
  color: #4B5563;
  margin-bottom: 14px;
}

.pix-amount {
  font-size: 14px;
  color: #111827;
  margin-bottom: 20px;
}

.pix-amount strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-accent-green);
}

.offers-label {
  display: flex;
  justify-content: center;
  margin: 0 0 12px;
}

.offers-label span {
  background-color: #111827;
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
}

/* Shipping cards */
.shipping-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shipping-card {
  display: block;
  cursor: pointer;
}

.shipping-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.shipping-card-content {
  display: block;
  border: 1.5px dashed #D1D5DB;
  border-radius: 12px;
  padding: 12px 14px;
  background-color: #FFFFFF;
  transition: all 0.15s ease;
}

.shipping-card input:checked + .shipping-card-content {
  border-style: solid;
  border-color: var(--color-accent-green);
  background-color: var(--color-green-light);
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.15);
}

.shipping-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #E5E7EB;
}

.shipping-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.free-icon {
  background-color: #DCFCE7;
  color: var(--color-accent-green);
  font-size: 20px;
  font-weight: 700;
}

.express-icon {
  background-color: #FFDC00;
  padding: 3px;
  overflow: hidden;
}

.sedex-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.shipping-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shipping-meta strong {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.shipping-cost {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-accent-green);
}

.shipping-description {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  line-height: 1.4;
  color: #4B5563;
  padding: 8px 0 10px;
}

.shipping-description strong {
  color: #1F2937;
  font-weight: 600;
}

.shipping-choose {
  display: block;
  border-radius: var(--radius-pill);
  background-color: #111827;
  color: #FFFFFF;
  text-align: center;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.shipping-card input:checked + .shipping-card-content .shipping-choose {
  background-color: #DCFCE7;
  color: #15803D;
}

.shipping-card input:checked + .shipping-card-content .shipping-choose::after {
  content: " · selecionada ✓";
}

/* Independent order bumps: both checkboxes may remain selected together. */
.order-bumps {
  margin-top: 18px;
}

.order-bumps .offers-label {
  margin-bottom: 9px;
}

.order-bump-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-bump-card {
  display: block;
  position: relative;
  cursor: pointer;
}

.order-bump-card > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.order-bump-content {
  display: block;
  padding: 12px 14px;
  border: 1.5px dashed #111827;
  border-radius: 15px;
  background: #FFFFFF;
  transition: border-color .15s ease, background-color .15s ease;
}

.order-bump-card > input:checked + .order-bump-content {
  border-style: solid;
  border-color: var(--color-accent-green);
  background: #F0FDF4;
}

.order-bump-card > input:focus-visible + .order-bump-content {
  outline: 3px solid rgba(22, 163, 74, .35);
  outline-offset: 2px;
}

.order-bump-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #AEB5C1;
}

.order-bump-image {
  display: block;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #E5E7EB;
  background: #F3F4F6;
}

.order-bump-name-price {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.order-bump-name-price strong {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.order-bump-name-price b {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-accent-green);
}

.order-bump-description {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 0;
  font-size: 12px;
  line-height: 1.35;
  color: #111827;
}

.order-bump-description strong {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
}

.order-bump-action {
  display: block;
  min-height: 38px;
  padding: 10px 12px;
  border-radius: 9999px;
  background: #111827;
  color: #FFFFFF;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.add-offer,
.remove-offer {
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.add-offer { display: flex; }
.remove-offer { display: none; }

.fake-checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid #FFFFFF;
  border-radius: 4px;
}

.order-bump-card > input:checked + .order-bump-content .order-bump-action {
  background: #DCFCE7;
  color: #15803D;
}

.order-bump-card > input:checked + .order-bump-content .add-offer { display: none; }
.order-bump-card > input:checked + .order-bump-content .remove-offer { display: block; }

.order-bump-disclaimer {
  margin: 8px 2px 0;
  color: var(--color-text-muted);
  font-size: 10px;
  line-height: 1.35;
}

.shipping-note {
  font-size: 11px;
  line-height: 1.4;
  color: var(--color-text-muted);
  margin: 12px 0 14px;
}

/* Finish button */
.finish-button {
  height: 48px;
  width: 100%;
  margin-top: 24px;
  border: none;
  border-radius: var(--radius-button);
  background-color: #16A34A;
  color: #FFFFFF;
  font-family: var(--font-base);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}

.finish-button:hover {
  background-color: #15803D;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.finish-button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.form-error {
  margin-top: 12px;
  color: #DC2626;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

/* Pix Result Card */
.pix-result {
  margin-top: 20px;
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
  text-align: center;
}

.pix-result h2 {
  font-size: 17px;
  font-weight: 700;
  color: #0F172A;
}

.pix-result > p {
  font-size: 12px;
  color: #475569;
  margin: 6px 0 14px;
}

.pix-result img {
  display: block;
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin: 14px auto;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px;
  background-color: #FFFFFF;
}

.copy-label {
  display: block;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #111827;
}

.pix-result textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 11px;
  font-family: monospace;
  background-color: #F9FAFB;
  resize: vertical;
  overflow-wrap: anywhere;
}

.copy-button {
  height: 42px;
  width: 100%;
  border: none;
  border-radius: 10px;
  background-color: var(--color-notice-bg);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.15s ease;
}

.copy-button:hover {
  background-color: #002d4b;
}

.order-status {
  font-weight: 700;
  color: #D97706;
  font-size: 12px;
  margin-top: 14px;
}

.order-status.paid {
  color: var(--color-accent-green);
}

.order-id {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* ==========================================================================
   COLUMN 3: RESUMO DO PEDIDO (353px)
   ========================================================================== */

.summary-panel {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 24px;
}

.desktop-summary-title {
  font-family: var(--font-summary);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  color: #0F172A;
  margin-bottom: 16px;
}

/* Hide mobile summary toggle on desktop */
.summary-toggle {
  display: none;
}

.cart-resume {
  background-color: #F8FAFC;
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 20px;
  border: 1px solid #F1F5F9;
}

.summary-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-labels);
  font-weight: 500;
  font-size: 12px;
  color: #333333;
  line-height: 1.4;
}

.summary-line-value {
  text-align: right;
  font-weight: 500;
}

.summary-total {
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.summary-total-label {
  font-family: var(--font-summary);
  font-weight: 700;
  font-size: 12px;
  color: #000000;
}

.summary-total-value {
  font-family: var(--font-summary);
  font-weight: 700;
  font-size: 16px;
  color: #000000;
  text-align: right;
}

/* Product list item */
.summary-product {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 4px 0 0;
}

.product-thumb-wrap {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.product-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.product-title {
  font-family: var(--font-labels);
  font-weight: 500;
  font-size: 12px;
  color: #333333;
  line-height: 1.3;
}

.product-variant,
.product-qty {
  font-size: 11px;
  color: var(--color-text-muted);
}

.product-price {
  font-family: var(--font-labels);
  font-weight: 600;
  font-size: 13px;
  color: #333333;
  white-space: nowrap;
}

/* ==========================================================================
   FOOTER & TOAST
   ========================================================================== */

.site-footer {
  margin-top: auto;
  min-height: 0;
  box-sizing: border-box;
  background-color: #FFD400;
  border-top: 1px solid var(--color-border);
  padding: 24px 20px 28px;
  text-align: center;
  color: #111827;
}

.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-payment-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 600;
}

.footer-payment-badge {
  width: 52px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
}

.footer-payment-badge img {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.footer-store-link {
  color: inherit;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-copyright {
  max-width: 600px;
  margin: 0;
  color: inherit;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 400;
}

@media (max-width: 768px) {
  .site-footer {
    min-height: 0;
    padding-top: 20px;
  }

  .site-footer-inner {
    gap: 8px;
  }

  .footer-payment-title {
    font-size: 15px;
  }

  .footer-store-link {
    font-size: 13px;
  }

  .footer-copyright {
    font-size: 11px;
  }
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 15px);
  background-color: #111827;
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 9999;
}

/* Blocking progress state while the payment provider creates the Pix charge. */
.pix-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
}

.pix-loading-overlay[hidden] {
  display: none;
}

.pix-loading-sheet {
  width: min(100%, 800px);
  height: min(600px, 85vh);
  min-height: 420px;
  padding: 34px 24px 48px;
  border-radius: 24px 24px 0 0;
  background: #FFFFFF;
  text-align: center;
}

.pix-loading-handle {
  display: block;
  width: 200px;
  height: 16px;
  margin: 0 auto;
  border-radius: 999px;
  background: #F0F0F2;
}

.pix-loading-message {
  padding-top: clamp(64px, 11vh, 88px);
}

.pix-loading-message h2 {
  color: #111827;
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 700;
  line-height: 1.25;
}

.pix-loading-message p {
  margin-top: 8px;
  color: #6B7280;
  font-size: clamp(19px, 3vw, 30px);
  font-weight: 600;
  line-height: 1.3;
}

.pix-loading-spinner {
  display: block;
  width: 64px;
  height: 64px;
  margin: 48px auto 0;
  border: 10px solid #C9C9C9;
  border-top-color: #303030;
  border-left-color: #303030;
  border-radius: 50%;
  animation: pix-loading-spin 0.9s linear infinite;
}

body.pix-loading-active {
  overflow: hidden;
}

@keyframes pix-loading-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .pix-loading-spinner { animation-duration: 2.5s; }
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */

/* Intermediate adjustments (769px to 1180px) */
@media (min-width: 769px) and (max-width: 1180px) {
  .checkout-layout {
    grid-template-columns: 1fr 1fr;
    max-width: 820px;
    gap: 20px;
  }
  .summary-panel {
    grid-column: span 2;
    position: static;
  }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
  body {
    background-color: #F8FAFC;
  }

  .site-header-inner {
    padding: 12px 18px;
  }

  .brand-logo {
    width: 150px;
    height: 44px;
  }

  .checkout-layout {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 0;
    padding: 0;
    gap: 0;
    background-color: #FFFFFF;
  }

  /* Order Summary moves to top as collapsible mobile bar */
  .summary-panel {
    order: -1;
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    position: static;
    background-color: #FFFFFF;
  }

  .desktop-summary-title {
    display: none;
  }

  .summary-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    padding: 12px 18px;
    background-color: #F7F7F7;
    border: none;
    cursor: pointer;
    font-family: var(--font-base);
  }

  .summary-toggle-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #0A0A0A;
  }

  .summary-chevron {
    transition: transform 0.2s ease;
    color: #0A0A0A;
  }

  .summary-panel:not(.collapsed) .summary-chevron {
    transform: rotate(180deg);
  }

  .mobile-summary-price {
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    font-variant-numeric: tabular-nums;
  }

  .summary-panel.collapsed .summary-content {
    display: none;
  }

  .summary-content {
    padding: 16px 18px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
  }

  .summary-product {
    order: 0;
    gap: 12px;
    padding: 0;
    margin-bottom: 12px;
  }

  .product-thumb-wrap {
    width: 56px;
    height: 56px;
  }

  .product-title {
    font-size: 14px;
    font-weight: 500;
  }

  .product-qty {
    font-size: 14px;
    color: #111827;
  }

  .product-price {
    font-size: 14px;
    font-weight: 700;
    color: #000000;
  }

  .cart-resume {
    order: 1;
    padding: 8px 0 0;
    margin: 0;
    background: #FFFFFF;
    border: 0;
  }

  .summary-lines {
    gap: 8px;
  }

  .summary-line {
    font-size: 14px;
  }

  .summary-line-value {
    font-weight: 400;
  }

  .summary-total-label,
  .summary-total-value {
    font-size: 16px;
    font-weight: 700;
  }

  .summary-total-label {
    font-family: var(--font-base);
  }

  .summary-total-value {
    font-family: var(--font-base);
  }

  /* Form Panels on Mobile */
  .identity-panel,
  .payment-panel {
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 24px 18px;
  }

  .identity-panel {
    border-bottom: 1px solid var(--color-border);
  }

  .cpf-group,
  .phone-group {
    max-width: 100%;
  }

  .finish-button {
    height: 50px;
    font-size: 16px;
  }
}

.pix-screen { flex: 1; display: flex; justify-content: center; padding: 24px 16px 40px; }
.pix-screen[hidden], .checkout-layout[hidden], .notice[hidden] { display: none; }
.pix-card { width: 100%; max-width: 460px; background: #fff; border: 1px solid var(--color-border); border-radius: 16px; padding: 28px 22px; text-align: center; box-shadow: 0 8px 30px rgba(17,24,39,.06); }
.pix-card h1 { margin: 0 0 4px; font-size: 24px; }
.pix-lead { margin: 0 0 16px; color: #4b5563; }
.pix-amount { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.pix-amount span { font-size: 13px; color: #6b7280; }
.pix-amount strong { font-size: 30px; }
.pix-timer { margin: 0 0 8px; font-size: 14px; color: #4b5563; }
.pix-steps { text-align: left; margin: 18px 0 8px; padding-left: 20px; color: #374151; font-size: 14px; line-height: 1.6; }
.pix-card .copy-label { display: block; text-align: left; }
.pix-qrsvg { width: 240px; height: 240px; margin: 0 auto 16px; padding: 10px; background: #fff; border: 1px solid #d9dee7; border-radius: 12px; }
.pix-qrsvg[hidden], .pix-result img[hidden] { display: none; }
.pix-qrsvg svg { display: block; width: 100%; height: 100%; }

.pix-card textarea { width: 100%; min-height: 84px; padding: 10px; border: 1px solid var(--color-border); border-radius: 8px; font-size: 12px; font-family: monospace; background-color: #F9FAFB; resize: vertical; overflow-wrap: anywhere; box-sizing: border-box; }
.pix-card .copy-button { height: 48px; font-size: 15px; }
.pix-card .order-status { font-size: 13px; }
.pix-qrsvg { width: 260px; height: 260px; }
body.pix-screen-active { background: #f5f7fa; }

.pix-card .copy-button.copied { background-color: #16A34A; transition: background-color .15s ease; }
.pix-how { margin-top: 20px; padding-top: 18px; border-top: 2px dotted #d1d5db; text-align: left; }
.pix-how h2 { margin: 0 0 14px; font-size: 17px; font-weight: 700; color: #111827; }
.pix-card .pix-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 15px; line-height: 1.35; }
.pix-steps li { display: flex; align-items: center; gap: 14px; color: #9ca3af; }
.pix-steps .step-num { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #e5e7eb; color: #9ca3af; font-weight: 700; font-size: 15px; }
.pix-steps li.active { color: #111827; font-weight: 600; }
.pix-steps li.active .step-num { background: #000; color: #fff; }
.pix-steps li.done { color: #16A34A; }
.pix-steps li.done .step-num { background: #16A34A; color: #fff; }
.pix-steps strong { font-weight: 700; }
