html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.page-wrapper {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
}

/* O resto do seu código de estilo_global.css continua aqui... */
html, body {
  background: #fff;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  color: #222;
  box-sizing: border-box;
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; 
}
.page-wrapper {
    min-height: calc(100vh - 60px); 
    display: flex;
    flex-direction: column;
}
main { 
    display: block;
    flex-grow: 1; 
}
.titulo-catalogo {
  text-align: center;
  font-size: clamp(1.8em, 6vw, 2.5em);
  font-weight: 900;
  letter-spacing: 1px;
  margin: 25px auto 20px auto;
  color: #C9A33A;
  max-width: 90vw;
  line-height: 1.2;
}
.catalogo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px 10px;
  max-width: 800px;
  margin: 0 auto 20px auto;
  padding: 0 10px;
  box-sizing: border-box;
}
.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
  padding: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.card-img {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 12px;
  background: #f1f1f1;
  cursor: pointer;
}
.card-desc, .card-ref {
  font-size: clamp(0.85em, 2.5vw, 0.9em);
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}
.card-ref {
  font-weight: 700;
  color: #111;
  letter-spacing: 0.5px;
}
.counter-outer {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.counter-group {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 25px;
  border: 1px solid #ddd;
  overflow: hidden;
  padding: 4px;
}
.counter-btn {
  color: #333;
  font-weight: bold;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  width: 38px;
  height: 38px;
  font-size: 1.5em;
}
.counter-value {
  width: 35px;
  height: 38px;
  background: transparent;
  color: #111;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  border: none;
  outline: none;
  font-family: inherit;
  -webkit-appearance: none;
  margin: 0;
}
.counter-sep { display: none; }
.total-pecas-box {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 10px auto;
  padding: 0 10px;
  box-sizing: border-box;
  text-align: right;
}
.total-pecas-info {
  font-size: 1em;
  font-weight: bold;
  color: #333;
  background: #f5f5f5;
  border-radius: 15px;
  padding: 5px 15px;
  border: 1px solid #ddd;
  display: inline-block;
}
footer {
  background: #f5f5f5;
  text-align: center;
  font-size: 0.9em;
  padding: 15px;
  color: #666;
  border-top: 1px solid #eee;
  margin-top: 20px;
}
.img-modal-bg { display: flex; position: fixed; left:0; top:0; width:100vw; height:100vh; z-index:9999; background: rgba(0,0,0,0.7); justify-content: center; align-items: center; visibility: hidden; opacity: 0; transition: opacity 0.2s, visibility 0.2s; padding: 20px; box-sizing: border-box;}
.img-modal-bg.active { visibility: visible; opacity: 1; }
.img-modal-content { max-width: 95vw; max-height: 90vh; background: #fff; border-radius: 10px; padding: 15px; position: relative; display: flex; align-items: center; justify-content: center; }
.img-modal-content img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.img-modal-close { position: absolute; top:-15px; right:-15px; width: 30px; height: 30px; font-size: 1.5em; color: #333; background: #fff; border-radius: 50%; border: none; font-weight: bold; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.img-modal-descricao { display: none !important; }
.modal-lupa-bg { display: flex; justify-content: center; align-items: flex-start; position: fixed; z-index: 12000; left: 0; top: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.5); visibility: hidden; opacity: 0; transition: opacity 0.2s, visibility 0.2s; padding-top: 20vh; }
.modal-lupa-bg.active { visibility: visible; opacity: 1; }
.modal-lupa-box { background: #fff; border-radius: 12px; padding: 20px; max-width: 90vw; width: 500px; position: relative; }
.modal-lupa-fechar { position: absolute; top: 10px; right: 10px; border: none; background: none; font-size: 24px; color: #000; cursor: pointer; line-height: 1; }
.modal-lupa-label { font-size: 1.1em; color: #333; margin-bottom: 15px; font-weight: bold; text-align: center; }
.modal-lupa-input-area { display: flex; width: 100%; gap: 8px; }
.modal-lupa-input { flex-grow: 1; font-size: 1em; padding: 10px; border-radius: 8px; border: 1px solid #ccc; }
.modal-lupa-buscar { font-size: 1em; padding: 10px 15px; border-radius: 8px; background: #333; color: #fff; border: none; cursor: pointer; }
.search-results-container { max-height: 200px; overflow-y: auto; width: 100%; margin-top: 15px; border-top: 1px solid #eee; }
.search-result-item { padding: 10px; color: #333; text-decoration: none; display: block; background-color: #fff; border-bottom: 1px solid #eee; }
.search-result-item:hover { background-color: #f5f5f5; }
.titulo-home { text-align: center; margin: 30px 15px; color: #333; font-size: 1.5em; }
.paragrafo-home { text-align: center; font-size: 1.1em; margin: 30px 15px; color: #555; }
.subtitulo-revisao { font-size: 0.6em; letter-spacing: 1px; font-weight: normal; color: #666; }
.mensagem-vazio { font-size: 1.1em; color: #888; text-align: center; padding: 40px 20px; }
@media (max-width: 600px) {
    .catalogo-grid { grid-template-columns: repeat(2, 1fr); }
    .titulo-catalogo { font-size: 1.5em; }
}
.botao-padrao { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 360px; margin: 20px auto; padding: 13px 26px; border: none; border-radius: 30px; font-size: 0.94em;  font-weight: 700; letter-spacing: 0.02em; box-shadow: 0 2px 8px rgba(201,163,58,0.13); cursor: pointer; transition: background 0.12s, transform 0.11s; text-align: center; color: #fff !important; white-space: nowrap; text-shadow: 1px 1px 2px #000, -1px -1px 2px #000, 1px -1px 2px #000, -1px 1px 2px #000, 0 2px 8px #333c; -webkit-tap-highlight-color: transparent; }
.botao-whatsapp { background: linear-gradient(90deg, #23b04a 5%, #04753b 95%); }
.botao-whatsapp:hover { background: linear-gradient(90deg, #04753b 10%, #23b04a 90%); filter: brightness(1.07); }
@keyframes pulse-verde { 0% { box-shadow: 0 0 0 0 #23b04a88,0 2px 8px #04753b22; } 70% { box-shadow: 0 0 0 12px #23b04a00,0 2px 8px #04753b22; } 100% { box-shadow: 0 0 0 0 #23b04a88,0 2px 8px #04753b22; } }
.botao-piscando { animation: pulse-verde 1.2s infinite; border: 2.5px solid #04753b; font-size: 0.98em; }
.voltar-ao-topo { position: fixed; bottom: 20px; right: 20px; z-index: 1000; background-color: #b49758; color: white; width: 50px; height: 50px; border-radius: 50%; border: none; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(20px); transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out, transform 0.3s ease-in-out; }
.voltar-ao-topo.visivel { opacity: 1; visibility: visible; transform: translateY(0); }
.voltar-ao-topo:hover { background-color: #c9a33a; }
.botao-dourado { background: #b49758; border: 2.5px solid #8e743f; }
.botao-dourado:hover { background: #c9a33a; filter: brightness(1.07); }
@keyframes pulse-dourado { 0% { box-shadow: 0 0 0 0 #b4975888, 0 2px 8px #8e743f22; } 70% { box-shadow: 0 0 0 12px #b4975800, 0 2px 8px #8e743f22; } 100% { box-shadow: 0 0 0 0 #b4975888, 0 2px 8px #8e743f22; } }
.botao-piscando-dourado { animation: pulse-dourado 1.2s infinite; font-size: 0.98em; }
.menu-item.carrinho .carrinho-num { background-color: #23b04a; }
#visualizarPedido { display: none; }
.item-img-container { position: relative; }
.btn-excluir-item { position: absolute; top: -2px; right: -2px; width: 20px; height: 20px; background: rgba(200, 0, 0, 0.8); color: white; border: 2px solid white; border-radius: 50%; font-size: 14px; line-height: 16px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.3); z-index: 10; transition: all 0.2s; }
.btn-excluir-item:hover { background: rgb(255, 0, 0); transform: scale(1.1); }
#resumoPedido .counter-group,
#areaPedidos .counter-group { padding: 2px; border-radius: 20px; }
#resumoPedido .counter-btn,
#areaPedidos .counter-btn { width: 27px; height: 27px; font-size: 1.1em; }
#resumoPedido .counter-value,
#areaPedidos .counter-value { width: 25px; height: 27px; font-size: 0.9em; }
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"] {
    font-size: 16px !important;
  }
}
.mensagem-sucesso { padding: 40px 20px; text-align: center; background-color: #e8f5e9; border: 1px solid #a5d6a7; border-radius: 8px; color: #2e7d32; }
.mensagem-sucesso h2 { margin-top: 0; font-size: 1.5em; color: #1b5e20; }
.redirect-message { background-color: #fff3cd; color: #856404; border: 1px solid #ffeeba; border-radius: 8px; padding: 15px; margin-bottom: 20px; text-align: center; }
.spinner-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); z-index: 21000; justify-content: center; align-items: center; flex-direction: column; }
.spinner { width: 56px; height: 56px; border: 7px solid rgba(255, 255, 255, 0.3); border-top-color: #C9A33A; border-radius: 50%; animation: spin 1.2s linear infinite; }
.spinner-text { color: white; margin-top: 20px; font-size: 1.1em; font-weight: 500; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.area-botoes-final.pedido-enviado .botao-padrao { width: 100%; max-width: 360px; box-sizing: border-box; }
.info-modal-bg { display: none; position: fixed; z-index: 15000; left: 0; top: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.6); justify-content: center; align-items: center; }
.info-modal-content { background-color: #fff; padding: 30px 40px; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); text-align: center; position: relative; width: 90%; max-width: 340px; box-sizing: border-box; }
.info-modal-content p { margin: 0; font-size: 1.1em; color: #333; line-height: 1.5; }
.info-modal-close { position: absolute; top: -10px; right: -10px; width: 28px; height: 28px; background: #dc3545; color: white; border: 2px solid white; border-radius: 50%; font-size: 18px; line-height: 24px; font-weight: bold; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.4); transition: all 0.2s; }
.info-modal-close:hover { background-color: #c82333; transform: scale(1.1); }