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

:root {
  /* Paleta inspirada na Zona Velha do Funchal — pedra, terracota, madeira, mar */
  --terra:       #b5451b;   /* Terracota — fachadas tradicionais */
  --terra-dark:  #7a2a0e;   /* Terracota escuro */
  --terra-light: #d4652e;   /* Terracota claro */
  --stone:       #3b2e25;   /* Pedra escura — paredes de basalto */
  --stone2:      #5c4033;   /* Pedra média */
  --cream:       #fdf5ec;   /* Creme quente */
  --cream2:      #f0e0ca;   /* Creme mais intenso */
  --green:       #2d6a35;   /* Verde ilha da Madeira */
  --green-light: #3d8a47;
  --text:        #2e1f14;
  --text-light:  #7a5c47;
  --white:       #ffffff;
  --shadow:      0 4px 24px rgba(0,0,0,0.13);
  --shadow-hover:0 8px 32px rgba(0,0,0,0.22);
  --radius:      14px;
  --transition:  0.3s ease;
}

body {
  font-family: 'Lato', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== SCREENS ===== */
.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; }

/* ===== LANGUAGE SCREEN ===== */
#lang-screen {
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1c0e07 0%, #3b1a0a 45%, #1c0e07 100%);
  overflow: hidden;
}

/* Padrão de azulejo subtil no fundo */
#lang-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(181,69,27,0.18) 0%, transparent 55%),
    radial-gradient(circle at 75% 75%, rgba(45,106,53,0.12) 0%, transparent 55%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(181,69,27,0.04) 40px,
      rgba(181,69,27,0.04) 41px
    );
  pointer-events: none;
}

/* Arcos decorativos — janelas típicas madeirenses */
#lang-screen::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  border: 1px solid rgba(181,69,27,0.25);
  top: -180px; right: -120px;
}

.lang-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lang-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 24px;
  max-width: 520px;
  width: 100%;
}

.restaurant-logo {
  margin-bottom: 36px;
}

.logo-img {
  display: block;
  width: 300px;
  max-width: 88%;
  margin: 0 auto 16px;
  border-radius: 8px;
  background: #fdf5ec;
  box-shadow: 0 4px 32px rgba(0,0,0,0.5);
  padding: 12px 20px;
}

.restaurant-logo h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  color: var(--terra-light);
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(181,69,27,0.5);
}

.tagline-lang {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 8px;
}

#lang-title {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 32px;
  letter-spacing: 1px;
  transition: opacity 0.3s ease;
}

.lang-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(181,69,27,0.35);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}

.lang-btn .fi {
  width: 56px;
  height: 42px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.lang-btn:hover {
  background: rgba(181,69,27,0.25);
  border-color: var(--terra-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(181,69,27,0.3);
}

.lang-btn:active { transform: translateY(-1px); }

/* ===== MENU SCREEN ===== */
#menu-screen {
  flex-direction: column;
  min-height: 100vh;
}

/* ===== HEADER ===== */
header {
  background: linear-gradient(135deg, var(--stone) 0%, var(--stone2) 100%);
  box-shadow: 0 2px 20px rgba(0,0,0,0.35);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

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

.logo-img-sm {
  height: 36px;
  width: auto;
  border-radius: 4px;
  flex-shrink: 0;
  background: #fdf5ec;
  padding: 4px 8px;
}

.restaurant-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--terra-light);
  letter-spacing: 2px;
}

.restaurant-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.change-lang-btn {
  background: rgba(181,69,27,0.18);
  border: 1px solid rgba(181,69,27,0.45);
  padding: 5px 10px;
  border-radius: 50px;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
}

.change-lang-btn .fi {
  width: 24px;
  height: 18px;
  border-radius: 3px;
}

.change-lang-btn:hover {
  background: var(--terra);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(181,69,27,0.4);
}

/* ===== CATEGORY NAV ===== */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  padding: 0 16px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: rgba(255,255,255,0.45);
  font-family: 'Lato', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-btn:hover {
  color: var(--terra-light);
  border-bottom-color: rgba(181,69,27,0.35);
}
.nav-btn.active {
  color: var(--terra-light);
  border-bottom-color: var(--terra-light);
}

.nav-dot {
  font-size: 1.3rem;
  line-height: 1;
  color: var(--terra);
  opacity: 0.6;
}

/* ===== MAIN CONTENT ===== */
main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 40px 24px;
}

.category-header {
  margin-bottom: 32px;
  text-align: center;
  position: relative;
  padding-bottom: 20px;
}

.category-header::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--terra);
  margin: 16px auto 0;
  border-radius: 2px;
}

.category-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--stone);
  margin-bottom: 8px;
}

.category-header p {
  color: var(--text-light);
  font-size: 0.97rem;
  letter-spacing: 0.5px;
}

/* ===== MENU LIST ===== */
.menu-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ===== MENU CARD (lista) ===== */
.menu-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--white);
  border-bottom: 1px solid var(--cream2);
  padding: 16px 20px;
  animation: fadeIn 0.3s ease forwards;
  opacity: 0;
  transition: background var(--transition);
}

.menu-card:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.menu-card:last-child  { border-radius: 0 0 var(--radius) var(--radius); border-bottom: none; }
.menu-card:only-child  { border-radius: var(--radius); border-bottom: none; }

.menu-card:hover { background: var(--cream); }

.card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.card-bullet {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  color: var(--terra);
  line-height: 1;
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--stone);
  margin-bottom: 3px;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--terra);
  font-family: 'Playfair Display', serif;
  white-space: nowrap;
}

.card-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 50px;
  background: var(--cream2);
  color: var(--text-light);
  white-space: nowrap;
}

.card-tag.popular     { background: #fde8d8; color: #8b3a0e; }
.card-tag.tipico      { background: #e8f5e9; color: #2d6a35; }
.card-tag.mar         { background: #e3f2fd; color: #1a5276; }
.card-tag.new         { background: #f3e5f5; color: #6a1b6a; }
.card-tag.regional    { background: #fff3e0; color: #7a4100; }
.card-tag.vegetariano { background: #d4edda; color: #1a5e2a; }
.card-tag.especial    { background: #fff8e1; color: #6d4c00; }

/* ===== MENU ESPECIAL CARD ===== */
.card-especial {
  display: block;
  padding: 28px 32px;
  text-align: center;
  background: linear-gradient(135deg, #fffdf7 0%, #fdf5ec 100%);
  border: 1px solid rgba(181,69,27,0.2);
  border-radius: var(--radius);
}

.especial-courses {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.especial-course {
  padding: 16px 0;
}

.especial-course-label {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 10px;
}

.especial-options {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.especial-options li {
  font-size: 0.95rem;
  color: var(--stone);
}

.especial-or {
  font-size: 0.72rem !important;
  color: var(--text-light) !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.especial-divider {
  color: var(--terra-light);
  font-size: 1rem;
  padding: 4px 0;
  opacity: 0.5;
}

.especial-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--cream2);
}

.card-especial .card-price {
  font-size: 1.6rem;
}

/* ===== FLOATING CALL BUTTON ===== */
.fab-call {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--terra-light);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), 0 0 0 3px rgba(255,255,255,0.2);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fab-call:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 32px rgba(0,0,0,0.6), 0 0 0 4px rgba(255,255,255,0.3);
}

/* ===== FOOTER ===== */
footer {
  background: var(--stone);
  color: rgba(255,255,255,0.35);
  text-align: center;
  padding: 22px 24px;
  font-size: 0.8rem;
  letter-spacing: 0.8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .restaurant-logo h1 { font-size: 2.2rem; }
  .lang-buttons { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .lang-btn { padding: 12px 8px; }
  .lang-btn .fi { width: 40px; height: 30px; }
  .card-desc { display: none; }
  .category-header h2 { font-size: 1.5rem; }
  .category-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .category-nav::-webkit-scrollbar { display: none; }
  .nav-btn { padding: 11px 12px; font-size: 0.78rem; }
}
