/* ============================================================
   ESFIHARIA TRADICIONAL — STYLESHEET PRINCIPAL
   Identidade visual: vermelho escuro, dourado, verde
   ============================================================ */

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:        #8B1010;
  --red-dark:   #5c0a0a;
  --red-light:  #b01414;
  --gold:       #C9A227;
  --gold-light: #f0cb5a;
  --green:      #1B5E20;
  --cream:      #FFF8E1;
  --cream-dark: #f5e9c8;
  --white:      #ffffff;
  --gray-100:   #f9f9f9;
  --gray-200:   #ececec;
  --gray-400:   #aaa;
  --gray-600:   #666;
  --gray-800:   #333;
  --shadow-sm:  0 2px 8px rgba(0,0,0,.12);
  --shadow-md:  0 4px 20px rgba(0,0,0,.18);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.25);
  --radius:     12px;
  --radius-lg:  20px;
  --transition: .25s ease;
  --font:       'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--gray-800);
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-200); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* ── HEADER ──────────────────────────────────────────────── */
.header {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 60%, #a01515 100%);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-md);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.header-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
}

.header-logo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  font-weight: 900;
  color: var(--red-dark);
  border: 3px solid var(--gold-light);
}

.header-info { flex: 1; min-width: 0; }

.header-name {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 800;
  color: var(--cream);
  letter-spacing: .5px;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.header-slogan {
  font-size: .8rem;
  color: var(--gold-light);
  margin-top: 2px;
  letter-spacing: .3px;
}

.header-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.status-badge.aberto {
  background: rgba(76,175,80,.2);
  border: 1.5px solid #4CAF50;
  color: #81C784;
}

.status-badge.fechado {
  background: rgba(244,67,54,.2);
  border: 1.5px solid #f44336;
  color: #ef9a9a;
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.aberto .status-dot { background: #4CAF50; }
.fechado .status-dot { background: #f44336; animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.3); }
}

.header-hours {
  font-size: .73rem;
  color: var(--gold-light);
  text-align: right;
}

/* ── CATEGORIA NAV ──────────────────────────────────────── */
.cat-nav-wrap {
  background: var(--red-dark);
  border-top: 1px solid rgba(201,162,39,.3);
  position: sticky;
  top: 93px;
  z-index: 190;
  box-shadow: 0 3px 10px rgba(0,0,0,.2);
}

.cat-nav {
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }

.cat-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--cream);
  border: 1.5px solid transparent;
  transition: all var(--transition);
  flex-shrink: 0;
}

.cat-btn:hover {
  background: rgba(201,162,39,.15);
  border-color: var(--gold);
  color: var(--gold-light);
}

.cat-btn.active {
  background: var(--gold);
  color: var(--red-dark);
  border-color: var(--gold-light);
  font-weight: 700;
}

.cat-btn .cat-icon { font-size: 1rem; }

/* ── LOJA FECHADA BANNER ─────────────────────────────────── */
#banner-fechado {
  background: linear-gradient(135deg, #1a1a1a, #2d0a0a);
  border-bottom: 2px solid var(--red);
  color: var(--cream);
  text-align: center;
  padding: 12px 20px;
  display: none;
}

#banner-fechado.visivel { display: block; }

.banner-fechado-texto {
  font-size: .9rem;
  font-weight: 600;
}

/* ── MAIN LAYOUT ────────────────────────────────────────── */
.main-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 120px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 900px) {
  .main-wrap { grid-template-columns: 1fr 360px; padding-bottom: 40px; }
}

/* ── SECAO DE CATEGORIA ─────────────────────────────────── */
.categoria-secao {
  scroll-margin-top: 160px;
}

.categoria-titulo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--red-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2.5px solid var(--gold);
}

.categoria-titulo .cat-icon-big { font-size: 1.5rem; }

/* ── GRID DE PRODUTOS ───────────────────────────────────── */
.produtos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ── CARD DE PRODUTO ────────────────────────────────────── */
.produto-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1.5px solid transparent;
}

.produto-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.produto-card.esgotado { opacity: .6; cursor: not-allowed; }
.produto-card.esgotado:hover { transform: none; box-shadow: var(--shadow-sm); border-color: transparent; }

.produto-img-wrap {
  position: relative;
  height: 170px;
  background: var(--cream-dark);
  overflow: hidden;
}

.produto-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.produto-card:hover .produto-img { transform: scale(1.05); }

.produto-img-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--cream-dark), var(--cream));
}

/* Ícones FA em placeholders de produto */
.produto-img-placeholder i,
.modal-img-placeholder i,
.cj-img-placeholder i,
.carrinho-item-img-placeholder i,
.carrinho-vazio-icon i {
  color: var(--gold);
  opacity: .85;
}

.carrinho-vazio-icon i { font-size: 3.5rem; }
.cj-img-placeholder i { font-size: 2rem; }

.badge-destaque {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--gold);
  color: var(--red-dark);
  font-size: .68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

.badge-esgotado {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1px;
}

.produto-info {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.produto-nome {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.3;
  margin-bottom: 6px;
}

.produto-desc-short {
  font-size: .8rem;
  color: var(--gray-600);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.produto-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.produto-preco {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--red);
}

.produto-preco small { font-size: .7rem; font-weight: 600; color: var(--gray-600); }

.btn-adicionar {
  background: var(--red);
  color: var(--white);
  border-radius: 25px;
  padding: 7px 18px;
  font-size: .82rem;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-adicionar:hover { background: var(--red-light); transform: scale(1.05); }

/* ── MODAL DE PRODUTO ───────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  /* visibility hidden garante que o conteúdo fique invisível de verdade */
  visibility: hidden;
  opacity: 0;
  transition: opacity .28s ease, visibility 0s linear .28s;
}

.modal-overlay.aberto {
  visibility: visible;
  opacity: 1;
  pointer-events: all;
  transition: opacity .28s ease, visibility 0s linear 0s;
}

.modal {
  background: var(--white);
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* slide-up mobile: começa abaixo do viewport */
  transform: translateY(105%);
  transition: transform .38s ease-out;
  will-change: transform;
  position: relative;
}

@media (min-width: 600px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
  .modal {
    border-radius: var(--radius-lg);
    max-height: 85vh;
    /* desktop: pequeno deslocamento vertical */
    transform: translateY(24px);
  }
}

.modal-overlay.aberto .modal {
  transform: translateY(0);
}

.modal-img-wrap {
  position: relative;
  height: 220px;
  background: var(--cream-dark);
  overflow: hidden;
}

.modal-img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.modal-img-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  background: linear-gradient(135deg, var(--cream-dark), var(--cream));
}

.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  color: white;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 2;
}

.modal-close:hover { background: rgba(0,0,0,.8); }

.modal-body { padding: 20px; }

.modal-nome {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--red-dark);
  margin-bottom: 8px;
}

.modal-desc {
  font-size: .9rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* Opções */
.opcao-grupo {
  margin-bottom: 16px;
}

.opcao-label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.opcao-obrigatorio {
  font-size: .7rem;
  color: var(--red);
  font-weight: 600;
  background: #fce4e4;
  padding: 2px 7px;
  border-radius: 10px;
}

.opcao-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.opcao-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.opcao-item:hover { border-color: var(--gold); background: var(--cream); }
.opcao-item.selecionado { border-color: var(--red); background: #fdf0f0; }

.opcao-radio {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.opcao-item.selecionado .opcao-radio {
  border-color: var(--red);
  background: var(--red);
}

.opcao-item.selecionado .opcao-radio::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: white;
}

.opcao-texto { font-size: .88rem; flex: 1; }
.opcao-preco-add { font-size: .82rem; color: var(--green); font-weight: 600; }

/* Qty e carrinho no modal */
.modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-100);
  position: sticky;
  bottom: 0;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 25px;
  padding: 4px 8px;
}

.qty-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}

.qty-btn:hover { background: var(--red-light); transform: scale(1.1); }
.qty-btn:disabled { background: var(--gray-200); color: var(--gray-400); transform: none; cursor: not-allowed; }

.qty-num {
  font-size: 1.1rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

.btn-add-carrinho {
  flex: 1;
  background: var(--red);
  color: white;
  padding: 13px;
  border-radius: 25px;
  font-size: .95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--transition);
}

.btn-add-carrinho:hover { background: var(--red-light); }

.modal-preco-total {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--red-dark);
  white-space: nowrap;
}

/* ── COMPRE JUNTO ───────────────────────────────────────── */
.compre-junto-wrap {
  padding: 0 20px 20px;
}

.compre-junto-titulo {
  font-size: .85rem;
  font-weight: 800;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.compre-junto-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.compre-junto-grid::-webkit-scrollbar { display: none; }

.cj-card {
  flex-shrink: 0;
  width: 130px;
  background: var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--gray-200);
  cursor: pointer;
  transition: all var(--transition);
}

.cj-card:hover { border-color: var(--gold); transform: translateY(-2px); }

.cj-img {
  height: 80px;
  object-fit: cover;
  width: 100%;
}

.cj-img-placeholder {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--cream);
}

.cj-info { padding: 8px 10px; }

.cj-nome {
  font-size: .75rem;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cj-preco {
  font-size: .78rem;
  font-weight: 800;
  color: var(--red);
}

.cj-btn-add {
  display: block;
  width: 100%;
  background: var(--green);
  color: white;
  font-size: .72rem;
  font-weight: 700;
  padding: 5px 0;
  text-align: center;
}

/* ── TOAST COMPRE JUNTO ─────────────────────────────────── */
.toast-cj {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 16px 20px;
  width: min(480px, calc(100vw - 32px));
  z-index: 600;
  transition: transform .4s cubic-bezier(.34,1.2,.64,1);
  border-top: 4px solid var(--gold);
}

.toast-cj.visivel { transform: translateX(-50%) translateY(0); }

.toast-cj-titulo {
  font-size: .88rem;
  font-weight: 800;
  color: var(--red-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toast-cj-fechar {
  position: absolute;
  top: 12px; right: 14px;
  font-size: 1.2rem;
  color: var(--gray-400);
}

.toast-cj-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.toast-cj-grid::-webkit-scrollbar { display: none; }

/* ── CARRINHO SIDEBAR ───────────────────────────────────── */
.carrinho-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 400;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease, visibility 0s linear .25s;
}

.carrinho-overlay.aberto {
  visibility: visible;
  opacity: 1;
  pointer-events: all;
  transition: opacity .25s ease, visibility 0s linear 0s;
}

.carrinho-drawer {
  position: fixed;
  right: 0; top: 0; bottom: 0;
  width: min(400px, 100vw);
  background: var(--white);
  z-index: 410;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s ease-out;
  box-shadow: var(--shadow-lg);
}

.carrinho-overlay.aberto .carrinho-drawer {
  transform: translateX(0);
}

.carrinho-header {
  background: var(--red-dark);
  color: var(--cream);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.carrinho-titulo {
  font-size: 1.1rem;
  font-weight: 800;
  flex: 1;
}

.carrinho-close {
  color: var(--cream);
  font-size: 1.4rem;
  padding: 4px;
}

.carrinho-itens {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.carrinho-vazio {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}

.carrinho-vazio-icon { font-size: 4rem; margin-bottom: 12px; }
.carrinho-vazio p { font-size: .9rem; }

.carrinho-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-200);
  align-items: flex-start;
}

.carrinho-item-img {
  width: 56px; height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.carrinho-item-img-placeholder {
  width: 56px; height: 56px;
  border-radius: 8px;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.carrinho-item-info { flex: 1; min-width: 0; }

.carrinho-item-nome {
  font-size: .88rem;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.3;
  margin-bottom: 3px;
}

.carrinho-item-opcoes {
  font-size: .75rem;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.carrinho-item-controles {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ci-qty-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-800);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.ci-qty-btn:hover { background: var(--red); color: white; }
.ci-qty-num { font-size: .9rem; font-weight: 700; min-width: 20px; text-align: center; }

.carrinho-item-preco {
  font-size: .95rem;
  font-weight: 800;
  color: var(--red);
  align-self: center;
  white-space: nowrap;
}

/* Carrinho Footer */
.carrinho-footer {
  border-top: 1px solid var(--gray-200);
  padding: 16px;
  background: var(--gray-100);
}

.carrinho-resumo { margin-bottom: 14px; }

.carrinho-linha {
  display: flex;
  justify-content: space-between;
  font-size: .88rem;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.carrinho-total-linha {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--red-dark);
  padding-top: 10px;
  border-top: 2px solid var(--gold);
  margin-top: 8px;
}

.carrinho-aviso-minimo {
  background: #fff3cd;
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: .78rem;
  color: #856404;
  margin-bottom: 12px;
  display: none;
}

.carrinho-aviso-minimo.visivel { display: block; }

.btn-entrega-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-tipo {
  flex: 1;
  padding: 9px;
  border-radius: 10px;
  font-size: .8rem;
  font-weight: 700;
  border: 2px solid var(--gray-200);
  color: var(--gray-600);
  transition: all var(--transition);
  text-align: center;
}

.btn-tipo.ativo {
  border-color: var(--red);
  background: #fdf0f0;
  color: var(--red);
}

.btn-finalizar {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--green), #2e7d32);
  color: white;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(27,94,32,.3);
  letter-spacing: .3px;
}

.btn-finalizar:hover { background: linear-gradient(135deg, #1b7a1f, #1B5E20); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(27,94,32,.4); }
.btn-finalizar:disabled { background: var(--gray-200); color: var(--gray-400); transform: none; box-shadow: none; cursor: not-allowed; }

/* ── CARRINHO FAB (mobile) ─────────────────────────────── */
.carrinho-fab {
  position: fixed;
  bottom: 24px; right: 20px;
  background: var(--red);
  color: white;
  border-radius: 30px;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(139,16,16,.4);
  z-index: 300;
  transition: transform var(--transition), opacity var(--transition);
  cursor: pointer;
  border: none;
}

.carrinho-fab.oculto { transform: translateY(100px); opacity: 0; pointer-events: none; }
.carrinho-fab:hover { transform: translateY(-2px); }

.carrinho-fab-count {
  background: var(--gold);
  color: var(--red-dark);
  border-radius: 50%;
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 800;
}

/* ── CARRINHO SIDEBAR DESKTOP ─────────────────────────── */
@media (min-width: 900px) {
  .carrinho-fab { display: none; }
  .carrinho-overlay { display: none; }
  .carrinho-drawer {
    position: sticky;
    top: 160px;
    transform: none !important;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius);
    height: calc(100vh - 180px);
    max-height: 800px;
    border: 1.5px solid var(--gray-200);
  }
  .main-wrap {
    align-items: start;
  }
}

/* ── MODAL NOME CLIENTE ─────────────────────────────────── */
.modal-nome-wrap {
  padding: 0 20px 8px;
}

.modal-nome-label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
  display: block;
}

.modal-nome-input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .9rem;
  transition: border-color var(--transition);
  outline: none;
}

.modal-nome-input:focus { border-color: var(--red); }

/* ── HORÁRIOS MODAL ─────────────────────────────────────── */
.horarios-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease, visibility 0s linear .25s;
}

.horarios-modal-overlay.aberto {
  visibility: visible;
  opacity: 1;
  pointer-events: all;
  transition: opacity .25s ease, visibility 0s linear 0s;
}

.horarios-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px);
  transition: transform .3s ease-out;
}

.horarios-modal-overlay.aberto .horarios-modal { transform: translateY(0); }

.horarios-titulo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--red-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.horarios-lista { list-style: none; }

.horarios-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: .88rem;
}

.horarios-item:last-child { border-bottom: none; }
.horarios-item.hoje { font-weight: 700; color: var(--red-dark); }

.horarios-dia { color: var(--gray-800); }
.horarios-time { color: var(--gray-600); }
.horarios-fechado { color: var(--gray-400); font-style: italic; }

.btn-fechar-horarios {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  background: var(--red);
  color: white;
  border-radius: 25px;
  font-weight: 700;
  font-size: .9rem;
}

/* ── SPINNER ────────────────────────────────────────────── */
.spinner {
  width: 40px; height: 40px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 40px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── UTILITÁRIOS ────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ── ANIMAÇÕES ENTRADA ─────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.produto-card { animation: fadeInUp .3s ease both; }

/* ── FOOTER ─────────────────────────────────────────────── */
.footer {
  background: var(--red-dark);
  color: var(--cream);
  text-align: center;
  padding: 20px;
  font-size: .8rem;
  margin-top: 40px;
}

.footer-name { font-weight: 700; font-size: 1rem; color: var(--gold-light); margin-bottom: 4px; }
.footer-addr { color: rgba(255,255,255,.6); }

/* ── RESPONSIVE FINE-TUNING ─────────────────────────────── */
@media (max-width: 360px) {
  .header-name { font-size: 1rem; }
  .header-logo, .header-logo-placeholder { width: 48px; height: 48px; }
  .produtos-grid { grid-template-columns: 1fr; }
}

@media (min-width: 600px) {
  .produtos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .produtos-grid { grid-template-columns: repeat(3, 1fr); }
}
