/* ═══════════════════════════════════════════════════
       CHECKOUT LAYOUT
       - Body & Global structure
       - Main Cards & Containers
       - Header & Footer
    ═══════════════════════════════════════════════════ */

body {
  font-family: var(--font);
  background: var(--page-bg);
  color: var(--gray-900);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.checkout-card {
  max-width: 520px;
  margin: 20px auto;
  background: var(--card-bg);
  border: 1.5px solid #7b8794;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10), 0 2px 6px rgba(0, 0, 0, 0.06);
}

.checkout-inner {
  padding: 16px 16px 0;
}

/* ── Product Header ── */
.product-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  border-bottom: 1px solid var(--gray-200);
  background: #fff;
}

.product-thumb {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--gray-200);
}

.product-info {
  flex: 1;
  min-width: 0;
}

.product-name {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.5;
}

.product-author {
  font-size: var(--text-1);
  color: var(--gray-600);
  margin-top: 2px;
}

.product-price-display {
  font-size: var(--text-3);
  font-weight: 800;
  color: var(--gray-900);
  margin-top: 4px;
  line-height: 1;
}

.product-country-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  color: var(--gray-600);
  font-family: var(--font);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Footer ── */
.checkout-footer {
  padding: 36px 24px 28px;
  text-align: center;
  background: #18181b;
  color: #d4d4d8;
  border-top: 1px solid #27272a;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.footer-container {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 13px;
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.25);
  text-underline-offset: 3px;
  font-weight: 500;
  transition: text-decoration-color 0.2s, color 0.2s;
}

.footer-link:hover {
  color: #fff;
  text-decoration-color: rgba(255,255,255,0.7);
}

.footer-support-txt {
  font-size: 12px;
  color: #a1a1aa;
  margin: 0 0 10px;
  line-height: 1.5;
}

/* CKTID box */
.footer-cktid-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #09090b;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 auto 18px;
  width: fit-content;
}

.footer-cktid-block:hover {
  border-color: #52525b;
  background: #111113;
}

.footer-cktid-text {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 13px;
  color: #e4e4e7;
  letter-spacing: 0.03em;
  user-select: all;
}

.footer-copy-icon {
  color: #71717a;
  flex-shrink: 0;
  transition: color 0.2s;
}

.footer-cktid-block:hover .footer-copy-icon {
  color: #a1a1aa;
}

.footer-copy-icon.copied {
  color: #22c55e !important;
}

.footer-auto-p {
  font-size: 12px;
  color: #a1a1aa;
  margin: 0 0 20px;
  line-height: 1.6;
}

.footer-link-inline {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.3);
  text-underline-offset: 2px;
  font-size: 12px;
  transition: text-decoration-color 0.2s;
}

.footer-link-inline:hover {
  text-decoration-color: rgba(255,255,255,0.8);
}

.footer-legal-block {
  font-size: 13px;
  color: #71717a;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 20px;
}

.footer-legal-block a {
  color: #a1a1aa;
  text-decoration: underline;
  text-decoration-color: rgba(161,161,170,0.4);
}

.footer-copyright {
  font-size: 13px;
  font-weight: 700;
  color: #e4e4e7;
  margin: 0 0 6px;
}

.footer-ref {
  font-size: 9px;
  color: #52525b;
  margin: 0;
}

/* ── Address Section Smooth Reveal ── */
#section-address {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease,
              transform 0.35s ease;
  pointer-events: none;
}

#section-address.show {
  max-height: 600px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── Responsividade ── */
@media (max-width: 600px) {
  .checkout-card {
    border-radius: 14px;
    border: 1.5px solid #7b8794;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10), 0 2px 6px rgba(0, 0, 0, 0.06);
    max-width: 100%;
  }

  .checkout-inner {
    padding: 12px 12px 0;
  }

  .product-header {
    padding: 10px;
    gap: 8px;
  }

  .product-thumb {
    width: 48px;
    height: 48px;
  }

  .product-name {
    font-size: 14px;
  }

  .product-price-display {
    font-size: 18px;
  }

  .product-country-btn {
    padding: 4px 6px;
    font-size: 11px;
  }
}

@media (max-width: 400px) {
  .checkout-inner {
    padding: 10px 10px 0;
  }
  
  .product-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cc-dropdown-wrap {
    width: 100%;
  }
  
  .product-country-btn {
    width: 100%;
    justify-content: center;
  }
}
