:root {
  --primary: #b8742a;
  --surface: #fff;
  --shadow: 0 8px 20px rgba(0,0,0,.1);
}

/* reset básico */
* { box-sizing: border-box; }
body { margin: 0; font-family: sans-serif; background: #faf7ed; color: #333; }
.container { width: min(1300px,100%); margin: auto; }

/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0; right: 0;
  height: 70px;
  background: #ecc84f;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow);
  z-index: 1000; /* header sob o backdrop e sob o sidebar */
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(1100px, 100%);
  margin: auto;
  gap: 0.5rem;
}

/* logo e marca */
.logo { height: 50px; border-radius: 10px; flex: 0 0 auto; }
.brand {
  font-weight: bold;
  font-size: 1.2rem;
  text-decoration: none;
  color: rgb(48, 48, 48);
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 140px); /* deixa espaço para hamburger + logo */
}

/* Nav desktop */
.nav { display: flex; gap: 1rem; }
.nav-link { text-decoration: none; color: #333; font-weight: bold; }
.nav-link:hover { color: var(--primary); }

/* label hamburger visível só no mobile */
.menu-toggle { display: none; font-size: 1.8rem; cursor: pointer; padding: .25rem .5rem; }
@media (max-width: 768px) { .menu-toggle { display: block; } .nav { display: none; } }

/* esconder checkbox (a11y-friendly) */
.menu-toggle-checkbox { position: absolute; left: -9999px; }

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 86%;
  max-width: 300px;
  height: 100vh;                    
  background: rgba(248,246,242,0.98);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translateX(-110%);     /* escondido fora da tela */
  transition: transform 0.28s cubic-bezier(.2,.8,.2,1);
  z-index: 2000;                     /* acima do header e do backdrop */
  overflow-y: auto;
}

/* quando o checkbox estiver marcado */
.menu-toggle-checkbox:checked ~ .sidebar {
  transform: translateX(0);
}

/* backdrop: aparece quando menu aberto (entre header e conteúdo) */
.backdrop { display: none; }
.menu-toggle-checkbox:checked ~ .backdrop {
  display: block;
  position: fixed;
  inset: 0;                          /* top/right/bottom/left = 0 */
  background: rgba(0,0,0,0.22);
  z-index: 1500;                     /* abaixo do sidebar, acima do header */
}

/* close button (usando label) */
.close-btn {
  font-size: 1.6rem;
  cursor: pointer;
  align-self: flex-end;
  color: #333;
  background: none;
  border: none;
}
/* links do menu empilhados corretamente */
.sidebar-nav { display:flex; flex-direction:column; gap: .8rem; padding-top: .5rem; }
.sidebar-nav a { display:block; font-size:1.05rem; padding: .45rem 0; color:#333; text-decoration:none; border-radius:6px; }
.sidebar-nav a:hover { background: rgba(184,116,42,0.06); color:var(--primary); }

.sidebar-nav label {
  display: block;
  cursor: pointer;
}

.sidebar-nav label a {
  display: block;
  font-size: 1.05rem;
  padding: .45rem 0;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
}

.sidebar-nav label a:hover {
  background: rgba(184,116,42,0.06);
  color: var(--primary);
}

/* Hero (Grid) */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 6rem 2rem 2rem;
}
.hero-text h1 { font-size: 2rem; margin: 0; }
.hero-text p { margin: 1rem 0; }
.hero-img img { width: 100%; border-radius: 10px; }

/* Botões */
.btn {
  padding: 0.5rem .8rem;
  border-radius: 20px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
}
.btn.comprar { background: var(--primary); color: #fff; }
.btn.info { border: 1px solid var(--primary); color: var(--primary); }

.btn:hover{ 
  filter: brightness(1.03);
  transform: scale(0.9); /* efeito leve de zoom ao passar o mouse */ 
   }
.btn:active{ transform: translateY(1px); }
.btn.comprar:hover{ background: #c51313} /* acento quente */
.btn.info:hover{ background: #f89e17; color: black;}

/* Filtros */
.filters{position:sticky;top:60px;background:#faf7ed;padding:.5rem;display:flex;gap:.5rem;z-index:900}
.filters input{display:none}
.chip{padding:.4rem .8rem;border:1px solid #ccc;border-radius:999px;cursor:pointer}
.filters input:checked + .chip{background:#fde5a3;border-color:#d2a66f}

/* Produtos (Grid) */
.produtos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.produtos-header h2 {
  border-left: 4px solid var(--primary);
  padding-left: 0.5rem;
  color: #333;
  margin-bottom: 1rem;
  text-align: left;
}

.produtos-header p {
  padding-left: 0.5rem;
  margin-bottom: 1rem;
  text-align: left;
  font-size: 1rem;
}


.card {
  background: var(--surface);
  padding: 1rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease;
}
.card-img {
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
}
.card-img img { max-width: 100%; height: 120px; object-fit: contain; }
.badge {
  position: absolute;
  top: 8px; left: 8px;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  color: #fff;
}
.badge.green { background: #2ecc71; }
.badge.red { background: #e74c3c; }

/* Overlay dentro do card */
.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(160, 160, 160, 0.7);
  color: #ffffff;
  padding: 0.3rem;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Mostrar somente no hover */
.card-img:hover .card-overlay {
  opacity: 1;
}

.card:hover {
  transform: scale(1.02);
  background-color:#f0ed4d;
}

/* Estilo geral para botões pequenos */
.btn.small {
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
}


/* Agrupamento dos botões */
.card-buttons {
  display: flex;                    /* Usando Flexbox para alinhar os botões */
  justify-content: space-between;    /* Garante que os botões fiquem nas extremidades */
  gap: 1rem;                         /* Espaçamento entre os botões */
  margin-top: 1rem;
}

/* Tooltip com descrição ao passar o mouse */
.card[title] {
  position: relative;
  cursor: help;
}

.card[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 0.75rem;
  z-index: 10;
}

/* Filtros funcionais */
.card{display:none}
/* quando cada opção está marcada, mostra os cards correspondentes */
.filters:has(#tab-todos:checked) ~ .produtos .card { display: block; }
.filters:has(#tab-paes:checked) ~ .produtos .paes { display: block; }
.filters:has(#tab-doces:checked) ~ .produtos .doces { display: block; }
.filters:has(#tab-salgados:checked) ~ .produtos .salgados { display: block; }
.filters:has(#tab-bebidas:checked) ~ .produtos .bebidas { display: block; }

/* Modal */
.modal{position:fixed;inset:0;background:rgba(0,0,0,.5);display:none;align-items:center;justify-content:center;z-index:1300}
.modal:target{display:flex}
.modal-content{background:#fff;padding:1.5rem;border-radius:12px;position:relative;max-width:400px;width:90%}
.modal-close{position:absolute;top:.5rem;right:.5rem;font-size:1.5rem;text-decoration:none;color:#333}

/* Depoimentos (Flexbox) */
.depoimentos {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

.depoimentos-header h2 {
  border-left: 4px solid var(--primary);
  padding-left: 0.5rem;
  color: #333;
  margin-bottom: 1rem;
  text-align: left;
}


.depoimento {
  background: var(--surface);
  padding: 1rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-width: 300px;
  text-align: center;
  flex: 1 1 220px;
}

.depoimento img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.5rem; /* centraliza horizontalmente */
  display: block;        /* garante que o margin auto funcione */
}

#sobre h2 {
  border-left: 4px solid var(--primary);
  padding-left: 0.5rem;
  color: #333;
  margin-bottom: 1rem;
  text-align: left;

}

/* Video Padaria*/
.video {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  
}

/* Footer (Flexbox) */
.footer {
  background: #111;
  color: white;
  padding: 2rem 1rem;
  margin-top: 2rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1100px;
  margin: auto;
}
.footer p { margin: 0.5rem 0; text-align: center;}

.footer-list{list-style:none; margin:0; padding:0}
.footer-list li{margin:.3rem 0}
.footer a{color:#f4f4f4; text-decoration:underline}

.btn-fixed {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

/* Estilo base IGUAL para ambos */
.btn-floating {
  width: 100px;
  height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  border-radius: 50px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  color: white;
  padding: 0 1.2rem;
  border: none;
  cursor: pointer;
  line-height: 1;
  text-align: center;
}

/* WhatsApp (com cor verde) */
.btn-whatsapp {
  background-color: #25d366;
}

/* Voltar ao topo (com cor laranja) */
.back-to-top {
  background-color: #f88315;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

/* Quando aparece ao rolar */
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Ajustes responsivos */
@media (max-width: 768px) {
  .menu-toggle { display: block; position: absolute; left: 1rem;}   /* mostra o hamburger */
  .nav { display: none; }            /* esconde nav desktop */
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 88px; } /* espaço topo para header */
  .hero-img { order: -1; }
  .hero-img img { height: 200px; object-fit: cover; }
  .logo { height: 40px; margin: 0; }
  .brand { font-size: 1rem; max-width: 70%; text-align: center;}
  .header-inner {justify-content: center; /* centraliza todos os itens */ position: relative;
  }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.5rem; }
  .sidebar { width: 60%; max-width: 220px; }
  .brand { font-size: 0.95rem; text-align: center;}
}

/* Ajustes no footer para mobile */ 
@media (max-width: 600px) {
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
}

/* Botões touch-friendly */
button, .btn, .btn-floating { min-height: 44px; min-width: 44px; }

/* Tabelas responsivas */
table { width: 100%; border-collapse: collapse; }
@media (max-width: 600px) {
  table thead { display: none; }
  table, table tbody, table tr, table td { display: block; width: 100%; }
  table tr { margin-bottom: 1rem; }
  table td { text-align: right; padding-left: 50%; position: relative; }
  table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 50%;
    padding-left: 0.5rem;
    font-weight: bold;
    text-align: left;
  }
}

/* Breakpoints principais */
@media (max-width: 1200px) {
  .container { padding: 0 1rem; }
}
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-img { order: -1; }
}
@media (max-width: 768px) {
  .sidebar { width: 70%; max-width: 260px; }
  .footer-inner { flex-direction: column; align-items: center; }
}
@media (max-width: 480px) {
  .sidebar { width: 60%; max-width: 220px; }
  .brand { font-size: 0.95rem; text-align: center; }
  .hero-text h1 { font-size: 1.4rem; }
}
