/**
 * ========================================================
 * ALDEIA PIZZARIA - SISTEMA MULTI-TEMAS PROFISSIONAL
 * Paletas exclusivas inspiradas em alta gastronomia de pizzarias.
 * Garantia total de contraste (WCAG AAA) e preservação estrutural.
 * ========================================================
 */

:root,
:root.theme-default,
body.theme-default {
  --theme-bg: #080808;
  --theme-card-bg: #121212;
  --theme-border: #262626;
  --theme-text-heading: #ffffff;
  --theme-text-body: #d1d5db;
  --theme-accent: #f59e0b;
  --theme-accent-hover: #ffffff;
  --theme-btn-bg: #f59e0b;
  --theme-btn-text: #000000;
  --theme-btn-hover-bg: #ffffff;
  --theme-btn-hover-text: #000000;
  --theme-input-bg: #141414;
  --theme-input-border: #333333;
  --theme-input-text: #ffffff;
  --theme-header-fixed: rgba(8, 8, 8, 0.96);
  --theme-nav-mobile: #121212;
  --theme-lgpd-bg: rgba(14, 14, 14, 0.95);
  --theme-lgpd-text: #ffffff;
  --theme-shadow: rgba(0, 0, 0, 0.7);
}

/* 2. Forno a Lenha & Terracota (Calor da Brasa Italiana) */
:root.theme-brasa,
body.theme-brasa {
  --theme-bg: #1c0d06;
  --theme-card-bg: #2e1408;
  --theme-border: #522510;
  --theme-text-heading: #fff7ed;
  --theme-text-body: #e2d1c3;
  --theme-accent: #ff6b00;
  --theme-accent-hover: #ffedd5;
  --theme-btn-bg: #ff6b00;
  --theme-btn-text: #ffffff;
  --theme-btn-hover-bg: #f97316;
  --theme-btn-hover-text: #ffffff;
  --theme-input-bg: #2e1408;
  --theme-input-border: #632d13;
  --theme-input-text: #fff7ed;
  --theme-header-fixed: rgba(28, 13, 6, 0.96);
  --theme-nav-mobile: #2e1408;
  --theme-lgpd-bg: rgba(36, 17, 8, 0.96);
  --theme-lgpd-text: #ffffff;
  --theme-shadow: rgba(28, 13, 6, 0.85);
}

/* 3. Bordeaux & Chianti (Vinho & Pomodoro Forneria) */
:root.theme-pomodoro,
body.theme-pomodoro {
  --theme-bg: #1c0309;
  --theme-card-bg: #2d0711;
  --theme-border: #571020;
  --theme-text-heading: #ffffff;
  --theme-text-body: #ead5d9;
  --theme-accent: #ef4444;
  --theme-accent-hover: #fbbf24;
  --theme-btn-bg: #ef4444;
  --theme-btn-text: #ffffff;
  --theme-btn-hover-bg: #fbbf24;
  --theme-btn-hover-text: #1c0309;
  --theme-input-bg: #2d0711;
  --theme-input-border: #6b1427;
  --theme-input-text: #ffffff;
  --theme-header-fixed: rgba(28, 3, 9, 0.96);
  --theme-nav-mobile: #2d0711;
  --theme-lgpd-bg: rgba(36, 4, 12, 0.96);
  --theme-lgpd-text: #ffffff;
  --theme-shadow: rgba(28, 3, 9, 0.85);
}

/* 4. Creme & Farinha Italiana (Claro 1 - Cantina Clássica) */
:root.theme-cantina-light,
body.theme-cantina-light {
  --theme-bg: #fbf8f2;
  --theme-card-bg: #f1eae0;
  --theme-border: #dcd0c0;
  --theme-text-heading: #1a1109;
  --theme-text-body: #3d2c1d;
  --theme-accent: #9a3412;
  --theme-accent-hover: #c2410c;
  --theme-btn-bg: #9a3412;
  --theme-btn-text: #ffffff;
  --theme-btn-hover-bg: #c2410c;
  --theme-btn-hover-text: #ffffff;
  --theme-input-bg: #ffffff;
  --theme-input-border: #cebeaa;
  --theme-input-text: #1a1109;
  --theme-header-fixed: rgba(251, 248, 242, 0.97);
  --theme-nav-mobile: #f1eae0;
  --theme-lgpd-bg: rgba(246, 240, 230, 0.98);
  --theme-lgpd-text: #1a1109;
  --theme-shadow: rgba(0, 0, 0, 0.12);
}

/* 5. Branco Neve & Manjericão (Claro 2 - Trattoria Fresca) */
:root.theme-manjericao-light,
body.theme-manjericao-light,
:root.theme-manjericao,
body.theme-manjericao {
  --theme-bg: #f5f9f6;
  --theme-card-bg: #eaf3ed;
  --theme-border: #c8ded1;
  --theme-text-heading: #081c10;
  --theme-text-body: #233b2c;
  --theme-accent: #059669;
  --theme-accent-hover: #047857;
  --theme-btn-bg: #059669;
  --theme-btn-text: #ffffff;
  --theme-btn-hover-bg: #047857;
  --theme-btn-hover-text: #ffffff;
  --theme-input-bg: #ffffff;
  --theme-input-border: #bcd5c6;
  --theme-input-text: #081c10;
  --theme-header-fixed: rgba(245, 249, 246, 0.97);
  --theme-nav-mobile: #eaf3ed;
  --theme-lgpd-bg: rgba(238, 245, 240, 0.98);
  --theme-lgpd-text: #081c10;
  --theme-shadow: rgba(0, 0, 0, 0.12);
}

/* 6. Areia Dourada & Nápoles (Claro 3 - Sol Mediterrâneo) */
:root.theme-napoles-light,
body.theme-napoles-light,
:root.theme-napoles,
body.theme-napoles {
  --theme-bg: #faf6ee;
  --theme-card-bg: #efe7d8;
  --theme-border: #dcd0bc;
  --theme-text-heading: #18140c;
  --theme-text-body: #3d3527;
  --theme-accent: #c25e00;
  --theme-accent-hover: #9a4a00;
  --theme-btn-bg: #c25e00;
  --theme-btn-text: #ffffff;
  --theme-btn-hover-bg: #9a4a00;
  --theme-btn-hover-text: #ffffff;
  --theme-input-bg: #ffffff;
  --theme-input-border: #d0c0a8;
  --theme-input-text: #18140c;
  --theme-header-fixed: rgba(250, 246, 238, 0.97);
  --theme-nav-mobile: #efe7d8;
  --theme-lgpd-bg: rgba(244, 238, 226, 0.98);
  --theme-lgpd-text: #18140c;
  --theme-shadow: rgba(0, 0, 0, 0.12);
}

/* ========================================================
   APLICAÇÃO DIRETA DAS VARIÁVEIS SOBRE OS COMPONENTES
   (Preservando 100% das margens, colunas e posições originais)
   ======================================================== */

body {
  background-color: var(--theme-bg) !important;
  color: var(--theme-text-body) !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#preload {
  background-color: var(--theme-bg) !important;
}

#header.bg-fixed-menu {
  background-color: var(--theme-header-fixed) !important;
  box-shadow: 0 4px 20px var(--theme-shadow);
}

#special-dishes,
#about-us,
#chefs,
#menu,
#gallery,
#booking-table,
#contacts,
.working-hours {
  background-color: var(--theme-bg) !important;
  transition: background-color 0.3s ease;
}

/* Títulos Globais e Seções */
h1, h2, h3, h4, h5, h6,
.wrapper.home-content h1,
.wrapper.home-content>div p,
.special-dishes-content h3,
#special-dishes .title-center h2,
.wrapper.flex-row .about-content h2,
#offer h2,
#chefs .title-center h2,
.wrapper.flex-row .chefs-item .about-chefs h3,
#menu .title-center h2,
.single-menu-item-content h3,
#gallery .title-center h2,
#booking-table .title-center h2,
.working-hours h3,
#contacts .title-center h2,
.flex-row.wrapp-contacts>div h3,
.flex-row.wrapp-contacts>div p,
#openmenu,
#closemenu,
.menu li a {
  color: var(--theme-text-heading) !important;
}

/* Textos Secundários, Subtítulos e Parágrafos */
.special-dishes-content p,
#chefs .title-center p,
.wrapper.flex-row .about-content p,
#special-dishes .title-center p,
.wrapper.flex-row .chefs-item .about-chefs p,
.single-menu-item-content p,
.working-hours p,
.copyright,
.copyright a {
  color: var(--theme-text-body) !important;
}

/* Destaques, Preços, Telefones e Ícones */
.special-dishes-content .price,
.single-menu-item-content .price,
.phone,
.flex-row.wrapp-contacts>div h3 i,
.footer-social li a,
.wrapp-input-group.flex-row>div label,
.menu li a:hover,
#openmenu:hover,
#closemenu:hover {
  color: var(--theme-accent) !important;
}

.footer-social li a:hover,
.phone:hover {
  color: var(--theme-accent-hover) !important;
}

/* Botões Principais */
.btn,
.wrapper.flex-row.wrapp-menu .list-menu li a,
.wrapper.flex-row .about-img>a {
  background-color: var(--theme-btn-bg) !important;
  color: var(--theme-btn-text) !important;
  font-weight: 700;
  border-radius: 4px;
  box-shadow: 0 4px 14px var(--theme-shadow);
  transition: all 0.3s ease;
}

.btn:hover,
.wrapper.flex-row.wrapp-menu .list-menu li a:hover,
.wrapper.flex-row.wrapp-menu .list-menu li a.active,
.wrapper.flex-row .about-img>a:hover {
  background-color: var(--theme-btn-hover-bg) !important;
  color: var(--theme-btn-hover-text) !important;
}

/* Formulário e Inputs */
.wrapp-input-group.flex-row>div input {
  background-color: var(--theme-input-bg) !important;
  color: var(--theme-input-text) !important;
  border: 1.5px solid var(--theme-input-border) !important;
}

.wrapp-input-group.flex-row>div input:focus {
  border-color: var(--theme-accent) !important;
  box-shadow: 0 0 10px var(--theme-accent);
}

.wrapp-input-group.flex-row>div input::placeholder {
  color: var(--theme-text-body) !important;
  opacity: 0.7;
}

/* Menu Mobile em Telas Menores */
@media all and (max-width: 992px) {
  #nav {
    background-color: var(--theme-nav-mobile) !important;
    border-right: 1px solid var(--theme-border);
  }
}

/* Banner de Aceite LGPD */
#lgpd-banner {
  background: var(--theme-lgpd-bg) !important;
  color: var(--theme-lgpd-text) !important;
  border-top: 1px solid var(--theme-border) !important;
}

#lgpd-accept {
  background-color: var(--theme-btn-bg) !important;
  color: var(--theme-btn-text) !important;
}

/* Scroll Top Button */
#scroll-top {
  background-color: var(--theme-btn-bg) !important;
  color: var(--theme-btn-text) !important;
  box-shadow: 0 4px 15px var(--theme-shadow);
  transition: all 0.3s ease;
}

#scroll-top:hover {
  background-color: var(--theme-btn-hover-bg) !important;
  color: var(--theme-btn-hover-text) !important;
}

/* Proteção de Alto Contraste em Seções com Imagens de Fundo */
#home,
#offer {
  position: relative;
}

body.theme-cantina-light #home::before,
body.theme-manjericao-light #home::before,
body.theme-manjericao #home::before,
body.theme-napoles-light #home::before,
body.theme-napoles #home::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(247, 244, 237, 0.90);
  pointer-events: none;
  z-index: 1;
}

body.theme-manjericao-light #home::before,
body.theme-manjericao #home::before {
  background: rgba(245, 249, 246, 0.90);
}

body.theme-napoles-light #home::before,
body.theme-napoles #home::before {
  background: rgba(250, 246, 238, 0.90);
}

body.theme-cantina-light #home .wrapper,
body.theme-manjericao-light #home .wrapper,
body.theme-manjericao #home .wrapper,
body.theme-napoles-light #home .wrapper,
body.theme-napoles #home .wrapper {
  position: relative;
  z-index: 2;
}

body.theme-cantina-light #offer::before,
body.theme-manjericao-light #offer::before,
body.theme-manjericao #offer::before,
body.theme-napoles-light #offer::before,
body.theme-napoles #offer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(247, 244, 237, 0.94);
  pointer-events: none;
  z-index: 1;
}

body.theme-manjericao-light #offer::before,
body.theme-manjericao #offer::before {
  background: rgba(245, 249, 246, 0.94);
}

body.theme-napoles-light #offer::before,
body.theme-napoles #offer::before {
  background: rgba(250, 246, 238, 0.94);
}

body.theme-cantina-light #offer .wrapper,
body.theme-manjericao-light #offer .wrapper,
body.theme-manjericao #offer .wrapper,
body.theme-napoles-light #offer .wrapper,
body.theme-napoles #offer .wrapper {
  position: relative;
  z-index: 2;
}

/* ========================================================
   POPUP PROMOCIONAL DINÂMICO DE LUXO (ALDEIA PIZZARIA)
   ======================================================== */
.aldeia-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.aldeia-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.aldeia-popup-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background-color: var(--theme-card-bg);
  border: 1.5px solid var(--theme-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: scale(0.9) translateY(24px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.aldeia-popup-overlay.active .aldeia-popup-card {
  transform: scale(1) translateY(0);
}

.aldeia-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s ease;
}

.aldeia-popup-close:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: rotate(90deg) scale(1.08);
}

.aldeia-popup-img-wrapper {
  width: 100%;
  max-height: 220px;
  overflow: hidden;
  background: #000000;
  position: relative;
}

.aldeia-popup-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.aldeia-popup-body {
  padding: 26px 24px 22px;
}

.aldeia-popup-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--theme-accent);
  background: rgba(245, 158, 11, 0.12);
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid var(--theme-border);
  margin-bottom: 12px;
}

.aldeia-popup-title {
  font-size: 23px;
  font-weight: 800;
  color: var(--theme-text-heading) !important;
  margin-bottom: 8px;
  line-height: 1.25;
}

.aldeia-popup-desc {
  font-size: 14px;
  color: var(--theme-text-body) !important;
  margin-bottom: 22px;
  line-height: 1.5;
}

.aldeia-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aldeia-popup-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  border-radius: 12px;
  background-color: var(--theme-btn-bg) !important;
  color: var(--theme-btn-text) !important;
  text-decoration: none;
  box-shadow: 0 4px 15px var(--theme-shadow);
  transition: all 0.25s ease;
}

.aldeia-popup-btn:hover {
  background-color: var(--theme-btn-hover-bg) !important;
  color: var(--theme-btn-hover-text) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--theme-shadow);
}

.aldeia-popup-dismiss-btn {
  background: transparent;
  border: none;
  color: var(--theme-text-body);
  font-size: 13px;
  cursor: pointer;
  padding: 6px;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.aldeia-popup-dismiss-btn:hover {
  opacity: 1;
  text-decoration: underline;
}


