@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Roboto', Arial, sans-serif;
  background: #f9f9f9;
  color: #222;
}

a {
  color: #0072ce;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

/* Header comum */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  background: #f5f3f0;
  border-bottom: 2px solid #ffcc00;
}

.site-header > div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.menu-btn {
  background: none;
  border: none;
  color: #0071ad;
  font-size: 21px;
  cursor: pointer;
}

.logo img {
  height: 25px;
}

.login-link {
  color: #555577;
  font-size: 14px;
}

.main {
  flex: 1;
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 15px;
}

.breadcrumb {
  font-size: 12px;
  color: #555;
  margin-bottom: 15px;
}

.page-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #00416b;
}

.track-box {
  background: #f3f4f6;
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.track-box label {
  display: block;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 5px;
}

.track-box small {
  display: block;
  font-size: 16px;
  margin-bottom: 10px;
}

.input {
  width: 100%;
  max-width: 400px;
  padding: 8px;
  border: 1px solid #0072ce;
  border-radius: 4px;
  margin-bottom: 5px;
  font-size: 16px;
}

.input.error {
  border-color: #e53935;
  border-width: 2px;
}

.btn-primary {
  background: #0072ce;
  color: #fff;
  padding: 8px 15px;
  border: none;
  font-size: 14px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error-msg {
  color: #e53935;
  font-size: 14px;
  margin-bottom: 5px;
}

.warn-msg {
  color: #ff9800;
  font-size: 14px;
  margin-bottom: 5px;
}

.banner img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 4px;
}

/* Footer */
.site-footer {
  background: #ffe600;
  padding: 30px 10%;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-column h4 {
  font-size: 18px;
  color: #004b5a;
  margin: 0 0 10px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  font-size: 14px;
  color: #004b5a;
  margin-bottom: 8px;
}

.footer-copy {
  text-align: center;
  font-size: 12px;
  color: #444;
  margin-top: 20px;
}

.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-modal {
  background: #fff;
  border-radius: 12px;
  padding: 40px 30px;
  text-align: center;
  min-width: 320px;
  max-width: 400px;
  width: 90%;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e0e0e0;
  border-top-color: #0072ce;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Rastreio */
.status-container {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.status-box {
  display: flex;
  align-items: center;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  padding: 10px 15px;
  border-radius: 5px;
  margin-bottom: 15px;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: #ffc107;
  border-radius: 50%;
  margin-right: 8px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.package-container {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.name-overlay {
    position: absolute;

    /* posição dentro da imagem */
    top: 56.2%;
    left: 68%;

    transform: translate(-50%, -50%) rotate(1.4deg);
    transform-origin: center center;

    /* responsivo */
    font-size: clamp(11px, 2.8vw, 16px);
    line-height: 1;

    font-weight: bold;
    color: #2e2e2e;
    opacity: 0.7;

    width: 68%;
    max-width: 370px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    text-align: left;
    box-sizing: border-box;

    /* evita o texto ficar selecionável */
    user-select: none;
}

@media (max-width: 600px) {
    .name-overlay {
        top: 55.8%;
        left: 67%;

        width: 68%;
        font-size: clamp(10px, 3.2vw, 14px);

        transform: translate(-50%, -50%) rotate(1.4deg);
    }
}

.pay-button {
  background: #004680;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

.pay-button:hover {
  background: #003366;
}

.timeline {
  position: relative;
  margin-top: 30px;
}

.timeline-line {
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #ffcc00;
  transform: translateX(-50%);
}

.timeline-step {
  position: relative;
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  padding-top: 20px;
}

.step-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  border: 3px solid #fff;
  z-index: 1;
}

.step-icon.active { background: #ff6600; }
.step-icon.inactive { background: #ffcc00; }

.step-title.active { color: #cc3300; font-weight: 600; }
.step-title.inactive { color: #333; font-weight: 600; }

.step-desc {
  font-size: 13px;
  color: #333;
}

.step-date {
  font-size: 12px;
  color: #666;
}

.redirect-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  color: #fff;
  text-align: center;
  padding: 40px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-box {
  width: 90vw;
  max-width: 600px;
  aspect-ratio: 3 / 4;
  background-image: url('../images/popup.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 45px;
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 18px;
}

/* Checkout */
.checkout-page {
  background: #f4f4f4;
  min-height: 100vh;
}

.checkout-topbar {
  background: #f5f5f5;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #28a745;
  font-weight: 600;
  font-size: 14px;
}

.security-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #28a745;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-banner {
  background: #0072ce;
  color: #fff;
  text-align: center;
  padding: 15px 30px;
  font-size: 14px;
}

.checkout-banner img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.checkout-main {
  display: flex;
  gap: 20px;
  justify-content: center;
  padding: 30px 10px;
  max-width: 1200px;
  margin: 0 auto;
}

.checkout-left {
  flex: 1;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.card {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.form-label {
  display: block;
  font-size: 14px;
  margin-top: 12px;
}

.form-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  margin-top: 4px;
}

.oferta-box {
  border: 2px dashed orange;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.oferta-left {
  display: flex;
  gap: 10px;
  align-items: center;
}

.oferta-left img {
  height: 40px;
}

.preco-antigo {
  text-decoration: line-through;
  color: #888;
  font-size: 12px;
}

.preco-novo {
  color: green;
  font-weight: bold;
}

.btn-oferta {
  background: orange;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.btn-remover {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
  gap: 10px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  border-top: 1px solid #ccc;
  padding-top: 10px;
  margin-top: 15px;
}

.pix-box {
  display: inline-flex;
  align-items: center;
  padding: 12px;
  border: 2px solid #00c170;
  border-radius: 8px;
  background: #f9fdfc;
  margin: 10px 0;
}

.pix-info {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 6px;
  font-size: 14px;
  color: #555;
}

.btn-pix {
  width: 100%;
  padding: 15px;
  background: #00c170;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  margin-top: 20px;
}

.cart-sidebar {
  min-width: 400px;
  position: sticky;
  top: 30px;
  height: fit-content;
}

.checkout-footer {
  margin-top: 60px;
  padding: 30px;
  background: #fafafa;
  text-align: center;
  font-size: 13px;
  color: #777;
}

/* Finalizar */
.finalizar-page {
  background: #f2f2f2;
  min-height: 100vh;
}

.finalizar-topbar {
  background: #fff;
  padding: 30px 20px;
  display: flex;
  justify-content: center;
}

.finalizar-wrapper {
  width: 90%;
  max-width: 800px;
  margin: 30px auto;
  padding: 20px;
  border-radius: 12px;
  background: #f2f2f2;
}

.finalizar-content {
  display: flex;
  gap: 30px;
}

.payment-box {
  flex: 1;
  background: #fff;
  border-radius: 10px;
  text-align: center;
}

.timer-bar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #dbdbdb;
  color: #6b6b6b;
}

.qrcode-wrap {
  padding: 20px;
}

.qrcode-wrap canvas,
.qrcode-wrap img {
  width: 220px !important;
  height: 220px !important;
}

.pix-copy-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-family: monospace;
  text-align: center;
}

.btn-copy {
  width: 100%;
  margin-top: 10px;
  background: #41c286;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.details-box {
  flex: 1;
  max-width: 320px;
}

.instruction-list {
  list-style: none;
  padding: 0;
}

.instruction-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.circle-icon {
  min-width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #41c286;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Agradecimento */
.thanks-page {
  min-height: 100vh;
  background: #f2f2f2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 20px;
}

.thanks-content {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  max-width: 600px;
  width: 100%;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.thanks-banner {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: #fff;
  border-radius: 8px;
  padding: 25px;
  margin: 30px 0;
}

.tracking-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-top: 30px;
  text-align: left;
}

.btn-row {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.btn-secondary {
  background: transparent;
  color: #007bff;
  border: 2px solid #007bff;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.btn-blue {
  background: #007bff;
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 768px) {
  .checkout-main {
    flex-direction: column-reverse;
  }

  .cart-sidebar {
    display: none;
  }

  .finalizar-content {
    flex-direction: column;
  }

  .details-box {
    max-width: 100%;
  }

  .btn-row {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 20px;
  }

  .btn-primary {
    width: 100%;
    padding: 12px 20px;
  }

  .checkout-topbar {
    flex-direction: column;
    gap: 15px;
  }
}
