/* ─── RESET & TOKENS ───────────────────────────────────────────────────*/
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}

:root{
  --p500:#2980b9;   /* azul principal */
  --p400:#3498db;   /* azul hover */
  --accent:#e67e22; /* laranja sub‑menus*/
  --g50:#fafafa; --g100:#fff;
  --r-s:6px; --r-m:8px;
  --sh-s:0 1px 3px rgb(0 0 0 /.08);
  --sh-m:0 4px 12px rgb(0 0 0 /.12);
  --tr:.35s ease;
  --glass-bg-opac:0.30;
}

body{
  font-family:"Segoe UI", Tahoma, sans-serif;
  background:#ecf0f1;
  min-height:100vh;
  position:relative;
  z-index:0;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  background:url("fundo.jpg") center/cover no-repeat;
  z-index:-1;
  transform:translateZ(0);
}

/* ─── HEADER ────────────────────────────────────────────────────*/
header{
  position:relative;
  color:#fff;
  text-align:center;
  padding:3.6rem 1rem 4.6rem;
  border-radius:0 0 var(--r-m) var(--r-m);
  background:transparent;         
}

header h1{font-size:2.3rem;font-weight:600;letter-spacing:.5px;margin-bottom:.25rem}
header p{opacity:.9}

.lang-switch{position:absolute;top:1rem;right:1rem;display:flex;gap:.5rem}
.lang-switch button{
  border:none;border-radius:var(--r-s);padding:.5rem .9rem;font-weight:600;
  cursor:pointer;background:#fff;color:var(--p500);box-shadow:var(--sh-s);
  transition:var(--tr)
}
.lang-switch button:hover{background:var(--accent);color:#fff}

/* ─── WRAPPER PRINCIPAL ────────────────────────────────────────*/
main.wrapper{
  position:relative;
  max-width:900px;
  margin:2rem auto 4rem;
  padding:2rem 1rem 1.5rem;
  border-radius:8px;
  box-shadow:0 4px 12px rgb(0 0 0 /.12);
}

main.wrapper::before{
  content:"";
  position:absolute; inset:0;
  background:#fff;
  opacity:var(--glass-bg-opac);
  border-radius:inherit;
  backdrop-filter:blur(2px);
  pointer-events:none;
  z-index:-1;
}

/* ─── ACCORDION ────────────────────────────────────────────────*/
.section{border-radius:var(--r-m);overflow:hidden;box-shadow:var(--sh-s);margin-bottom:1.5rem}
.s-header{
  display:flex;align-items:center;justify-content:space-between;
  background:var(--p500);color:#fff;padding:1rem 1.25rem;
  font-size:1.25rem;font-weight:500;cursor:pointer;transition:background .25s
}
.s-header:hover{background:var(--p400)}
.s-header .chevron{transition:transform var(--tr)}
.s-header.active .chevron{transform:rotate(180deg)}
.s-body{max-height:0;overflow:hidden;background:var(--g50);transition:max-height var(--tr)}

/* ─── SUBACCORDION ─────────────────────────────────────────────*/
.sub{border-bottom:1px solid #ddd}
.sub-h{
  display:flex;align-items:center;justify-content:space-between;
  background:var(--accent);color:#fff;padding:.85rem 1rem;
  font-size:1.05rem;font-weight:500;cursor:pointer;transition:filter .25s
}
.sub-h:hover{filter:brightness(1.1)}
.sub-h .chevron{transition:transform var(--tr)}
.sub-h.active .chevron{transform:rotate(180deg)}
.sub-b{max-height:0;overflow:hidden;background:var(--g100);transition:max-height var(--tr)}

/* ─── ITENS DE MENU ────────────────────────────────────────────*/
.item{padding:1rem .35rem;border-bottom:1px dashed #d7d7d7}
.item:last-child{border-bottom:none}

.item h3{
  display:flex; flex-wrap:wrap; align-items:center;
  gap:.45rem; font-size:.95rem;
}
.item h3 .price{
  margin-left:auto; white-space:normal; text-align:right;
  font-weight:600; color:var(--p500);
}
.item p{font-size:.88rem;color:#555;margin-top:.2rem}

/* ─── UTILITÁRIOS ──────────────────────────────────────────────*/
.s-header span, .sub-h span{
  white-space:normal; text-overflow:clip; line-height:1.25;
}
.wrapper{overflow-x:hidden}

@supports (-webkit-touch-callout:none){
  body{ background:none !important; }
}

@media(max-width:580px){
  header h1{font-size:1.8rem}
  .s-header{font-size:1.1rem}
}
@media print{
  .lang-switch{display:none}
  .s-body,.sub-b{max-height:none!important}
}

/* ─── BARRA DE PESQUISA ────────────────────────────────────────*/
.search-box {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-box input {
  width: 100%;
  padding: 12px 15px 12px 45px; /* Espaço à esquerda para o ícone */
  border: 1px solid #ddd;
  border-radius: 50px; /* Redondinho estilo app */
  font-size: 16px; /* Importante para mobile não fazer zoom */
  background: #fff;
  box-shadow: var(--sh-s);
  outline: none;
  transition: box-shadow 0.3s ease;
}

.search-box input:focus {
  box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.2); /* Brilho azul ao tocar */
  border-color: var(--p500);
}

.search-box i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 1.1rem;
  pointer-events: none;
}

/* Ajuste para garantir que o scroll scrolla para o sitio certo */
.section, .sub-h {
  scroll-margin-top: 20px;
}

/* ─── CARRINHO DE COMPRAS (MOBILE APP STYLE) ─── */

/* Botão Flutuante (FAB) */
#cart-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--p500);
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.2s, background 0.2s;
  /* Escondido inicialmente até adicionar algo */
  transform: translateY(150%); 
}
#cart-fab.visible { transform: translateY(0); }
#cart-fab:active { transform: scale(0.95); }

.cart-icon { position: relative; font-size: 1.2rem; }
#cart-count {
  position: absolute; top: -8px; right: -10px;
  background: var(--accent); color: white;
  font-size: 0.75rem; font-weight: bold;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.cart-price { font-weight: 600; font-size: 1rem; border-left: 1px solid rgba(255,255,255,0.3); padding-left: 12px; }

/* Botão de Adicionar (+) na lista */
.add-btn {
  background: var(--g50);
  color: var(--p500);
  border: 1px solid var(--p500);
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 1.2rem; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-left: 10px;
  transition: 0.2s;
}
.add-btn:active { background: var(--p500); color: white; }

/* Modal (Janela) */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  z-index: 2000;
  display: none;
  justify-content: center; align-items: center;
  padding: 20px;
  opacity: 0; transition: opacity 0.3s;
}
.modal-overlay.open { display: flex; opacity: 1; }

.modal-content {
  background: white;
  width: 100%; max-width: 500px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  overflow: hidden;
  max-height: 80vh;
  display: flex; flex-direction: column;
}

.modal-header {
  background: var(--p500); color: white;
  padding: 15px;
  display: flex; justify-content: space-between; align-items: center;
}
.modal-header h2 { font-size: 1.2rem; margin: 0; }
.close-btn { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

.modal-body { padding: 15px; overflow-y: auto; flex-grow: 1; }
.cart-item-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid #eee;
}
.cart-item-info { flex-grow: 1; padding-right: 10px; }
.cart-item-title { font-weight: 600; display: block; }
.cart-item-price { font-size: 0.9rem; color: #777; }
.remove-btn { color: #e74c3c; background: none; border: none; font-size: 1rem; padding: 5px; }

.modal-footer { padding: 15px; background: #f9f9f9; border-top: 1px solid #ddd; }
.final-total { display: flex; justify-content: space-between; font-size: 1.3rem; font-weight: bold; color: var(--p500); margin-bottom: 5px; }
.modal-note { font-size: 0.85rem; color: #666; text-align: center; margin-bottom: 15px; }
.clear-btn {
  width: 100%; padding: 10px; border: 1px solid #ddd; background: white;
  color: #666; border-radius: 8px; font-weight: 600; cursor: pointer;
}

/* Toast Notification */
#toast {
  visibility: hidden; min-width: 100px;
  background-color: #333; color: #fff; text-align: center;
  border-radius: 50px; padding: 10px 20px;
  position: fixed; z-index: 3000;
  left: 50%; bottom: 80px; transform: translateX(-50%);
  font-size: 0.9rem; opacity: 0; transition: opacity 0.3s;
}
#toast.show { visibility: visible; opacity: 1; }

/* ─── NOVO: BOTÕES DE VARIANTES (MULTI-PREÇO) ─── */
.variant-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}

.variant-btn {
  background: white;
  border: 1px solid var(--p500);
  color: var(--p500);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.variant-btn:active, .variant-btn:hover {
  background: var(--p500);
  color: white;
}

.variant-btn i { font-size: 0.7rem; }

/* Ajuste no Header do Carrinho */
.cart-lang { display: flex; gap: 5px; margin-right: 15px; }
.cart-lang button {
  border: 1px solid rgba(255,255,255,0.5);
  background: transparent;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}
.cart-lang button:hover { background: rgba(255,255,255,0.2); }