/* --- CONFIGURAÇÕES GERAIS E VARIÁVEIS --- */
:root {
  --cor-principal: #ea1d2c;
  --cor-fundo: #f8f9fa;
  --cor-texto: #212529;
  --cor-borda: #e9ecef;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--cor-fundo);
  color: var(--cor-texto);
  padding: 15px;
  max-width: 1000px;
  margin: 0 auto;
}

/* --- CABEÇALHO --- */
header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

#logo-container img, 
#loja-logo {
  width: 90px;
  height: 90px;
  min-width: 90px;
  min-height: 90px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #ddd;
}

#loja-nome {
  font-size: 1.4rem;
  font-weight: 700;
}

#loja-subtitulo {
  font-size: 0.85rem;
  color: #6c757d;
}

.status-loja {
  display: inline-block;
  font-size: 0.8rem;
  color: #2b8a3e;
  font-weight: 600;
  margin-top: 4px;
}

/* --- CAMPO DE BUSCA --- */
.busca-container {
  margin-bottom: 15px;
  width: 100%;
}

.busca-container input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--cor-borda);
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.busca-container input:focus {
  border-color: var(--cor-principal);
}

/* --- CATEGORIAS (CHIPS) --- */
#nav-categorias {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 15px;
  -webkit-overflow-scrolling: touch;
}

#nav-categorias::-webkit-scrollbar {
  display: none;
}

.chip {
  background-color: #ffffff;
  color: #495057;
  border: 1px solid var(--cor-borda);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip.active, .chip:hover {
  background-color: var(--cor-principal);
  color: #ffffff;
  border-color: var(--cor-principal);
}

/* --- CARDÁPIO / GRID DE PRODUTOS --- */
#cardapio-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
  margin-bottom: 80px;
}

.card-produto {
  background: #ffffff;
  border: 1px solid var(--cor-borda);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-produto:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.info-prod {
  flex: 1;
}

.nome-prod {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.desc-prod {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 8px;
}

.preco-prod {
  font-size: 0.9rem;
  font-weight: 700;
  color: #2b8a3e;
}

.img-prod {
  width: 85px !important;
  height: 85px !important;
  min-width: 85px;
  min-height: 85px;
  object-fit: cover;
  border-radius: 8px;
}

/* --- MODAIS (OCULTOS POR PADRÃO) --- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  justify-content: center;
  align-items: center;
  padding: 15px;
}

.modal-conteudo {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  width: 100%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.btn-fechar-modal {
  position: absolute;
  top: 12px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #888;
}

.modal-conteudo textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--cor-borda);
  border-radius: 6px;
  margin-top: 5px;
  resize: vertical;
}

.controles-qtd {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 15px 0;
}

.controles-qtd button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--cor-borda);
  background: #f1f3f5;
  font-weight: bold;
  cursor: pointer;
}

.btn-principal {
  width: 100%;
  background: var(--cor-principal);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.95rem;
}

/* --- BARRA FIXA DO CARRINHO (RODAPÉ) --- */
.barra-sacola-fixa {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  padding: 12px 20px;
  border-top: 1px solid var(--cor-borda);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 900;
}