/* LojaMaster.cc - MOBILE FIRST - iPhone 13 Recondicionado */
:root {
  --bg-dark: #000;
  --bg-hero: #0a0a0a;
  --bg-light: #f5f5f7;
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --text-light: #f5f5f7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --border: #d2d2d7;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', 'Helvetica Neue', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  color: var(--text-primary);
  background: #0a0a0a;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* Papel de parede em vídeo - fundo meio escurecido, tela inteira */
.video-bg-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: -1;
  overflow: hidden;
}
.video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center center;
}
.video-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.9);
  height: 48px;
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  color: var(--text-light);
  font-size: 18px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
}

.nav-links a {
  color: var(--text-light);
  font-size: 11px;
  opacity: 0.9;
}

.btn-nav {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 6px 12px !important;
  border-radius: 20px !important;
  font-size: 11px !important;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 15px;
  text-align: center;
  border-radius: 24px;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-large {
  padding: 14px 24px;
  font-size: 16px;
}

.btn-full {
  width: 100%;
  max-width: 100%;
}

/* Hero - Mobile */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-hero);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 16px 40px;
  text-align: center;
  width: 100%;
}

.hero-content {
  margin-bottom: 24px;
}

.hero-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.hero-title {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 6px;
}

.hero-subtitle {
  font-size: 20px;
  font-weight: 400;
  opacity: 0.9;
  margin-bottom: 6px;
}

.hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
}

.hero-actions .btn {
  width: 100%;
}

.hero-image {
  margin-top: 16px;
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.iphone-product-img {
  width: 280px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Produtos - escolha */
.produtos-escolha {
  background: var(--bg-light);
}

.produtos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 640px;
  margin: 0 auto;
}

.produto-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.produto-card-img {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
}

.produto-card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.produto-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.produto-card-preco {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.produto-card .btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
}

@media (min-width: 768px) {
  .produtos-grid {
    gap: 32px;
  }
  .produto-card-img {
    height: 180px;
  }
  .produto-card h3 {
    font-size: 16px;
  }
  .produto-card-preco {
    font-size: 22px;
  }
}

/* Sections - Mobile */
main {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.section-inner {
  width: 100%;
  max-width: 100%;
  padding: 40px 16px;
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
  padding: 0 8px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 24px;
  padding: 0 8px;
}

/* Features */
.features {
  background: var(--bg-light);
}

.features-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}

.feature-icon {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Specs */
.specs-table {
  width: 100%;
  max-width: 100%;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.spec-value {
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  max-width: 55%;
  word-break: break-word;
}

/* CTA */
.cta {
  background: var(--bg-light);
}

.price-box {
  width: 100%;
  max-width: 100%;
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
}

.price-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.price-value {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 4px;
}

.price-value span {
  font-size: 22px;
  font-weight: 500;
  color: var(--text-secondary);
}

.price-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.price-box .btn {
  width: 100%;
}

/* Footer */
.footer {
  background: var(--bg-dark);
  color: var(--text-secondary);
  padding: 20px 16px;
  text-align: center;
}

.footer p {
  font-size: 12px;
}

/* Modal - Mobile */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  z-index: 2000;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.modal-overlay.active {
  display: block;
}

.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 16px 32px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 24px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
  padding: 4px;
}

.modal h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
  min-width: 0;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.form-group select {
  background: #fff;
  cursor: pointer;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-row .form-group {
  margin-bottom: 16px;
}

.form-group-small,
.form-group-flex {
  flex: none;
  width: 100%;
}

.form-note {
  margin-bottom: 16px;
  font-size: 14px;
}

.pix-instruction {
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.pix-qr {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  padding: 12px;
}

.pix-qr canvas,
.pix-qr .pix-qr-image {
  max-width: 220px !important;
  width: 100% !important;
  height: auto !important;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.pix-qr .pix-qr-image {
  background: #fff;
  padding: 8px;
  box-sizing: border-box;
}

.pix-pos-pagamento {
  margin-top: 20px;
  padding: 16px;
  background: rgba(76, 175, 80, 0.12);
  border-radius: 10px;
  border: 1px solid var(--pagamento-border);
}

.pix-pos-pagamento p {
  font-size: 14px;
  color: #1b5e20;
  margin: 0;
  line-height: 1.5;
}

.pix-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.pix-copy input {
  width: 100%;
  max-width: 100%;
  padding: 10px;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: monospace;
  box-sizing: border-box;
}

.pix-timer {
  font-size: 12px;
  color: var(--text-secondary);
}

.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

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

.btn.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -2px;
}

/* Desktop - min-width 768px */
@media (min-width: 768px) {
  .nav-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
  }

  .nav-logo { font-size: 21px; }
  .nav-links a { font-size: 12px; }
  .nav-links { gap: 24px; }

  .hero {
    padding: 80px 22px 60px;
  }

  .hero-title { font-size: 64px; }
  .hero-subtitle { font-size: 28px; }
  .hero-desc { font-size: 19px; }

  .hero-actions {
    flex-direction: row;
    max-width: none;
  }

  .hero-actions .btn { width: auto; }

  .iphone-product-img {
    width: 380px;
  }

  .section-inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 80px 22px;
  }

  .section-title { font-size: 40px; }
  .section-subtitle { font-size: 21px; margin-bottom: 48px; }

  .features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .specs-table {
    max-width: 600px;
    margin: 0 auto;
  }

  .spec-row { padding: 20px 24px; }

  .price-box {
    max-width: 400px;
    margin: 0 auto;
    padding: 48px 32px;
  }

  .price-value { font-size: 48px; }
  .price-value span { font-size: 28px; }

  .modal-overlay { padding: 24px; }
  .modal {
    max-width: 420px;
    padding: 32px 24px;
  }

  .form-row {
    flex-direction: row;
    gap: 12px;
  }

  .form-group-small { flex: 0 0 90px; }
  .form-group-flex { flex: 1; min-width: 0; }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========== Página Checkout (formulário separado) ========== */
.page-checkout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-light);
}

.checkout-main {
  flex: 1;
  padding: 80px 16px 40px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.checkout-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 24px 40px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.checkout-card h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.checkout-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.checkout-back {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
}

.checkout-back a {
  color: var(--accent);
}

@media (min-width: 768px) {
  .checkout-card {
    padding: 40px 32px 48px;
  }
  .checkout-card h1 {
    font-size: 28px;
  }
}

/* ========== Página Pagamento (semi-verde, confiança) ========== */
:root {
  --pagamento-bg: #e8f5e9;
  --pagamento-card: #f1f8f2;
  --pagamento-green: #2e7d32;
  --pagamento-green-light: #4caf50;
  --pagamento-border: #a5d6a7;
}

.page-pagamento {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--pagamento-bg);
  background: linear-gradient(160deg, #e8f5e9 0%, #c8e6c9 50%, #a5d6a7 100%);
}

.nav-pagamento {
  background: rgba(46, 125, 50, 0.95);
}

.nav-trust {
  display: flex;
  align-items: center;
}

.trust-badge {
  font-size: 12px;
  color: rgba(255,255,255,0.95);
  padding: 6px 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
}

.pagamento-main {
  flex: 1;
  padding: 80px 16px 40px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.pagamento-card {
  width: 100%;
  max-width: 520px;
  background: var(--pagamento-card);
  background: linear-gradient(180deg, #ffffff 0%, #f1f8f2 100%);
  border-radius: 16px;
  padding: 32px 24px 40px;
  box-shadow: 0 8px 32px rgba(46, 125, 50, 0.15);
  border: 1px solid var(--pagamento-border);
}

.pagamento-header {
  text-align: center;
  margin-bottom: 24px;
}

.pagamento-shield {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--pagamento-green);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pagamento-card h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--pagamento-green);
  margin-bottom: 8px;
}

.pagamento-sub {
  font-size: 14px;
  color: #1b5e20;
  opacity: 0.9;
}

.pagamento-trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: center;
  padding: 14px 16px;
  background: rgba(76, 175, 80, 0.12);
  border-radius: 10px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--pagamento-green);
  font-weight: 500;
}

/* Seleção de produto na página de pagamento */
.pagamento-escolha-produto {
  margin-bottom: 24px;
}

.pagamento-escolha-produto h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.produto-opcoes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.produto-opcao {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  background: #fff;
  border: 2px solid var(--pagamento-border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.produto-opcao input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.produto-opcao.selected,
.produto-opcao:has(input:checked) {
  border-color: var(--pagamento-green);
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
  background: rgba(76, 175, 80, 0.06);
}

.produto-opcao-img {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  overflow: hidden;
}

.produto-opcao-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.produto-opcao-nome {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 6px;
  line-height: 1.3;
  color: var(--text-primary);
}

.produto-opcao-preco {
  font-size: 16px;
  font-weight: 600;
  color: var(--pagamento-green);
}

.pagamento-resumo {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--pagamento-border);
}

.pagamento-resumo h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.pagamento-resumo p {
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.pagamento-valor {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: var(--pagamento-green) !important;
  margin-top: 8px !important;
}

.pagamento-step {
  margin-bottom: 20px;
}

.pagamento-instruction {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-align: center;
}

.btn-pagamento {
  background: var(--pagamento-green);
  color: #fff;
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-pagamento:hover {
  background: #1b5e20;
}

.pagamento-footer-trust {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--pagamento-border);
  font-size: 13px;
  color: var(--pagamento-green);
}

.pagamento-footer-trust p {
  margin-bottom: 4px;
}

.pagamento-back {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
}

.pagamento-back a {
  color: var(--pagamento-green);
  font-weight: 500;
}

.footer-pagamento {
  background: rgba(46, 125, 50, 0.2);
  color: #1b5e20;
}

.pix-fallback {
  color: var(--text-secondary);
  padding: 16px;
  font-size: 14px;
  text-align: center;
}

@media (min-width: 768px) {
  .pagamento-card {
    padding: 40px 32px 48px;
  }
  .pagamento-card h1 {
    font-size: 28px;
  }
}
