/* ============================================================
   cardapio.css  —  Fundinho Bar & Gastronomia · Blueprint Style
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;700&family=Outfit:wght@300;400;600;800&family=Caveat:wght@400;700&display=swap');

:root {
  --blue-print: #2A5C9A;
  --blue-dark:  #1e4371;
  --white:      #ffffff;
  --white-soft: rgba(255, 255, 255, 0.8);
  --white-line: rgba(255, 255, 255, 0.15);
  --grid-size:  30px;
  --transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'JetBrains Mono', monospace;
  background-color: var(--blue-print);
  /* Estilo Papel Milimetrado (Blueprint Grid) */
  background-image: 
    linear-gradient(var(--white-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--white-line) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size), var(--grid-size) var(--grid-size), calc(var(--grid-size) / 5) calc(var(--grid-size) / 5), calc(var(--grid-size) / 5) calc(var(--grid-size) / 5);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Navbar ── */
.c-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(42, 92, 154, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--white-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 70px;
  transition: all var(--transition);
}
.c-nav.scrolled {
  background: rgba(30, 67, 113, 0.9);
  height: 60px;
}

.c-nav-back {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--white);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}
.c-nav-back svg { width: 18px; height: 18px; fill: currentColor; }

.c-nav-logo img { height: 35px; filter: brightness(10); }

/* ── Hero ── */
.c-hero {
  padding: 4rem 1.5rem 2rem;
  text-align: center;
  position: relative;
}
.c-hero h1 {
  font-family: 'Caveat', cursive;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
  transform: rotate(-2deg);
}
.c-hero-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.7;
}

/* ── Tabs ── */
.c-tabs {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  position: sticky;
  top: 70px;
  z-index: 90;
  padding: 1rem;
}
.c-tab {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.6rem 2.5rem;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  border-radius: 0; /* Retangular original */
}
.c-tab:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}
.c-tab.active {
  background: var(--white);
  color: var(--blue-print);
  font-weight: 800;
  border-color: var(--white);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ── Main Container ── */
.c-main {
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 6rem;
}

.c-panel { display: none; }
.c-panel.active { display: block; }

/* ── Category ── */
.c-cat {
  margin-bottom: 5rem;
  padding: 0 1.5rem;
}
.c-cat-title {
  display: inline-block;
  background: var(--white);
  color: var(--blue-print);
  padding: 0.4rem 1.5rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  border: 2px solid var(--white);
}

/* ── Grid de Categorias (Para Lado a Lado) ── */
.c-cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 0 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
}

/* ── Lista de Itens (Coluna Única por Categoria) ── */
.c-items {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
}
@media (max-width: 900px) {
  .c-cat-grid { grid-template-columns: 1fr; gap: 1rem; }
}

/* ── BLUEPRINT LIST ITEM ── */
.c-item {
  position: relative;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px dashed var(--white-line);
  padding: 0.8rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition);
  cursor: pointer;
}
.c-item:hover {
  background: rgba(255,255,255,0.05);
}
.c-item:hover {
  background: rgba(255,255,255,0.05);
  padding-left: 1.5rem;
}
.c-item:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--white);
  transform: translateY(-5px);
}

/* Featured Item (Centralizado em telas grandes) */
.c-item-featured-wrap {
  max-width: 585px;
  margin: 0 auto;
}

.c-item-featured {
  background: transparent;
  border: none;
}

@media (max-width: 900px) {
  .c-item-featured-wrap {
    max-width: 100%;
    margin: 0;
  }
}

/* Nome e Info (Orientado a Esquerda) */
.c-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex-grow: 1;
}

.c-item-name {
  font-family: 'Caveat', cursive;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.c-item-sub {
  font-size: 0.7rem;
  color: var(--white-soft);
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.2;
}

/* Central Image (Mini) */
.c-item-img-wrap {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}
.c-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid var(--white);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.c-item:hover .c-item-img { transform: scale(1.1) rotate(-3deg); }
.c-item:hover .c-item-img { transform: scale(1.05) rotate(2deg); }

/* Diagram Lines (Pseudo-elements) */
.c-item-img-wrap::before, .c-item-img-wrap::after {
  content: '';
  position: absolute;
  width: 40px; height: 1px;
  background: var(--white-line);
}
.c-item-img-wrap::before { top: 20%; left: 0; transform: rotate(-30deg); }
.c-item-img-wrap::after { bottom: 20%; right: 0; transform: rotate(30deg); }

/* Price Style (Risco Técnico) */
.c-item-price-seal {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.c-item-price-seal::before {
  content: '';
  width: 15px;
  height: 1px;
  background: var(--white-soft);
}
.c-item-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
}

@media (max-width: 900px) {
  .c-items { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* Annotations (Handwritten) */
.c-item-annotation {
  position: absolute;
  font-family: 'Caveat', cursive;
  font-size: 0.9rem;
  color: var(--white-soft);
  opacity: 0.6;
}
.c-item-annotation.a1 { top: 30%; left: 5%; }
.c-item-annotation.a2 { bottom: 25%; right: 5%; }

/* ── Galeria / Lightbox (Blueprint Specs) ── */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(42, 92, 154, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  padding: 2rem;
}
.lb-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.lb-container {
  width: min(90vw, 550px);
  aspect-ratio: 2/3;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  border: none;
  border-radius: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
  transform: scale(0.98);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.lb-overlay.open .lb-container {
  transform: scale(1);
}

.lb-visual {
  width: 100%;
  height: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

@media (max-width: 600px) {
  .lb-container { 
    width: 95vw;
    max-height: 85vh;
  }
}

@media (max-width: 800px) {
  .lb-container { 
    aspect-ratio: auto; 
    height: auto;
    min-height: 300px;
  }
  .lb-main-img {
    height: auto;
    max-height: 70vh;
  }
}

/* ── Galeria Moderna (Story Style Sequencial) ── */
.lb-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 1.5rem 1rem 3rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
  z-index: 110;
  pointer-events: none;
}
.lb-current-name {
  font-family: 'Caveat', cursive;
  font-size: 1.8rem;
  color: #fff;
  display: block;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.lb-progress-container {
  display: flex;
  gap: 4px;
}
.lb-progress-bar {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}
.lb-progress-fill {
  width: 0%;
  height: 100%;
  background: #fff;
}
.lb-progress-fill.active { width: 100%; }

.lb-nav-zones {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 100;
}
.lb-zone-prev, .lb-zone-next {
  flex: 1;
  cursor: pointer;
  background: rgba(255,255,255,0.001); /* Hacker para garantir clique em todos os browsers */
}

/* Removi estilos antigos do botão de fechar e setas */
.lb-close-btn, .lb-nav, .lb-nav-btn { display: none !important; }
