/* ============================================================
   PALETA DE CORES E VARIÁVEIS - ZÉLIA BORDADOS
   ============================================================ */
:root {
  --bg: #F3F4EF;            /* Branco Algodão / Fundo Tecido */  
  --card: #FFFFFF;         /* Cards limpos para contraste */  
  --muted: #6B7D6A;        /* Verde Acinzentado (texto secundário) */  
  --text: #2F4F2F;         /* Verde Musgo Escuro (texto principal) */  
  --acc: #3F6B3A;          /* Verde Bordado (destaque principal) */  
  --line: #C9A441;         /* Dourado Artesanal (linhas/detalhes) */  
  --primary-btn: #3F6B3A;  /* Botão principal */  
  --secondary-btn: #C9A441;/* Botão secundário premium */  
  --whatsapp: #2FA44F;     /* Verde WhatsApp harmonizado */  
  --shadow: rgba(47, 79, 47, 0.15); /* Sombra verde suave */
}

/* ============================================================
   RESET E CONFIGURAÇÕES GERAIS
   ============================================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Libre Baskerville', serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Previne scroll quando o modal ou lightbox estiver aberto */
body.modal-open {
  overflow: hidden;
}

/* ============================================================
   TOPBAR (HEADER FIXO)
   ============================================================ */
.topbar.glass {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 164, 65, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  z-index: 1000;
  box-shadow: 0 4px 15px var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 45px;
  width: auto;
}

.brand-name {
  font-weight: 700;
  color: var(--acc);
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.btn-cart {
  background: var(--acc);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  transition: 0.3s;
  position: relative;
}

.btn-cart:hover {
  background: var(--text);
  transform: scale(1.05);
}

#cart-count {
  background: var(--secondary-btn);
  color: var(--text);
  font-size: 0.75rem;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  position: absolute;
  top: -5px;
  right: -5px;
  border: 2px solid var(--white);
}

/* ============================================================
   TÍTULO DA SEÇÃO (CORREÇÃO DA IMAGEM E ALINHAMENTO)
   ============================================================ */
.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px; /* Espaço entre a imagem e o texto */
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--acc);
  text-align: center;
}

#toalha, .section-title img {
  width: 50px;  /* Tamanho solicitado */
  height: 50px; /* Mantém proporção quadrada se for ícone */
  object-fit: contain;
  display: block;
}

/* ============================================================
   GRID DE PRODUTOS
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 100px auto 50px;
  padding: 0 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

/* ============================================================
   CARD DE PRODUTO
   ============================================================ */
.card {
  background: var(--card);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 20px var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(201, 164, 65, 0.1);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(47, 79, 47, 0.25);
}

.card-media {
  width: 100%;
  height: 250px;
  overflow: hidden;
  cursor: zoom-in;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

.card:hover .card-media img {
  transform: scale(1.1);
}

.card-content {
  padding: 20px;
  flex-grow: 1;
}

.card-content h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 8px;
}

.card-content p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 15px;
}

.price-tag {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--acc);
}

/* Ações do Card (Qtd + Botão) */
.card-actions {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qty-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9f5;
  border-radius: 8px;
  padding: 5px;
  border: 1px solid #e0e4d9;
}

.qty-btn {
  background: none;
  border: none;
  width: 35px;
  height: 35px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--acc);
  transition: 0.2s;
}

.qty-btn:hover {
  color: var(--text);
  background-color: #C9A44180;
  border-radius: 50px;
}

.qty-num {
  margin: 0 15px;
  font-weight: 700;
  font-size: 1.1rem;
}

.btn-add-cart {
  width: 100%;
  background: var(--acc);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.btn-add-cart:hover {
  background: var(--secondary-btn);
}

/* ============================================================
   MODAL DE CHECKOUT (ESTRUTURA PIZZARIA)
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 15px;
}

.modal-box {
  background: #fff;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.4);
  animation: modalSlide .3s ease-out;
}

@keyframes modalSlide {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  flex-shrink: 0;
  background: var(--acc);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.3rem;
}

#close-modal {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Lista de Itens no Carrinho */
.pedido-lista {
  margin-bottom: 20px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 15px;
}

.pedido-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px;
  background: #fcfcfc;
  border-radius: 10px;
  border: 1px solid #f0f0f0;
}

.pedido-item .info {
  display: flex;
  flex-direction: column;
}

.pedido-item .info strong {
  color: var(--text);
  font-size: 0.95rem;
}

.pedido-item .info span {
  color: var(--acc);
  font-weight: 700;
  font-size: 0.9rem;
}

.btn-remove {
  background: #ffeded;
  color: #e74c3c;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: 0.2s;
}

.btn-remove:hover {
  background: #e74c3c;
  color: white;
}

.pedido-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 25px;
  padding: 10px;
  background: #fdfbf4;
  border-radius: 8px;
}

/* Formulário no Modal */
.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 12px;
  border: 1.5px solid #e0e4d9;
  border-radius: 10px;
  outline: none;
  font-family: inherit;
  font-size: 1rem;
  transition: 0.3s;
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px rgba(63, 107, 58, 0.1);
}

.btn-enviar-pedido {
  width: 100%;
  background: var(--whatsapp);
  color: white;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: 0.3s;
  margin-top: 10px;
}

.btn-enviar-pedido:hover {
  background: #1eb954;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

/* ============================================================
   LIGHTBOX (AMPLIAR IMAGEM)
   ============================================================ */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85%;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.close-lightbox {
  position: absolute;
  top: 30px;
  right: 30px;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  transition: 0.3s;
}

.close-lightbox:hover {
  color: var(--line);
}

/* ============================================================
   RODAPÉ
   ============================================================ */
footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid rgba(201, 164, 65, 0.15);
  background: var(--white);
}

footer small {
  color: var(--muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--acc);
  text-decoration: none;
  font-weight: 700;
}

/* ============================================================
   RESPONSIVIDADE (MOBILE)
   ============================================================ */
@media (max-width: 768px) {
  .topbar.glass {
    padding: 0 15px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .container {
    margin-top: 90px;
  }

  .section-title {
    font-size: 1.6rem;
    flex-wrap: wrap;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .modal-box {
    max-height: 95vh;
    border-radius: 15px;
  }

  .modal-header {
    padding: 15px;
  }

  .modal-body {
    padding: 15px;
  }
}