/* *** КОРЕКЦИЯ: Импортиране на шрифтове от Google (с кирилица) *** */
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap&subset=cyrillic,cyrillic-ext');

/* *** ЦВЕТОВА СХЕМА *** */
:root {
  --button-outline: rgba(0,0,0, .10);
  --badge-outline: rgba(0,0,0, .05);
  --opaque-button-border-intensity: -8;
  --elevate-1: rgba(0,0,0, .03);
  --elevate-2: rgba(0,0,0, .08);

  --background: 35 30% 95%; 
  --foreground: 20 30% 15%; 
  --border: 30 20% 80%;     
  --card: 0 0% 100%;       
  --card-foreground: 20 30% 15%;
  --card-border: 30 20% 85%;
  
  --primary: 0 50% 45%;     
  --primary-foreground: 35 30% 95%;
  --secondary: 30 20% 78%;
  --secondary-foreground: 18 30% 15%;
  --muted: 32 22% 80%;
  --muted-foreground: 20 20% 45%;
  --accent: 35 65% 55%;    
  --accent-foreground: 20 20% 10%;
  
  --destructive: 0 65% 48%;
  --destructive-foreground: 0 5% 98%;
  --input: 25 12% 65%;
  --ring: 0 50% 50%;

  --popover: 35 30% 98%;
  --popover-foreground: 20 30% 15%;
  --popover-border: 30 20% 80%;
  --sidebar: 30 20% 90%;
  --sidebar-foreground: 18 30% 12%;
  --sidebar-border: 25 15% 75%;
  --sidebar-primary: 0 50% 45%;
  --sidebar-primary-foreground: 35 30% 95%;
  --sidebar-accent: 25 30% 78%;
  --sidebar-accent-foreground: 18 35% 15%;
  --sidebar-ring: 0 50% 50%;
  --chart-1: 0 68% 45%;
  --chart-2: 20 75% 50%;
  --chart-3: 35 70% 55%;
  --chart-4: 32 82% 60%;
  --chart-5: 45 85% 60%;

  /* *** КОРЕКЦИЯ: Правилните шрифтове от твоя файл *** */
  --font-sans: 'Lato', 'Source Sans Pro', sans-serif;
  --font-serif: 'Playfair Display', 'Cormorant Garamond', 'Georgia', 'serif';
  --font-mono: Menlo, monospace;
  --radius: .5rem; 
}

/*
  ОСНОВНИ СТИЛОВЕ
*/
body {
  font-family: var(--font-sans);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  border-color: hsl(var(--border));
}

/*
  ПОМОЩНИ СТИЛОВЕ
*/

#back-to-top,
#fb-sticker {
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#back-to-top.show,
#fb-sticker.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.nav-link.active {
  color: hsl(var(--primary));
  font-weight: 700;
}

#lightbox {
  display: none; 
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#lightbox.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

#lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
  border-radius: 8px;
}

.lang-switcher button {
  opacity: 0.6;
  transition: opacity 0.2s ease;
  background-color: hsl(var(--background) / 0.7);
  border-radius: 9999px;
}
.lang-switcher button:hover {
  opacity: 1;
  background-color: hsl(var(--background) / 1.0);
}
.lang-switcher button.active {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 0 10px hsl(var(--primary) / 0.5);
  background-color: hsl(var(--background) / 1.0);
}

/* --- КОРЕКЦИЯ 1: СТИЛОВЕ ЗА "ЗА НАС" --- */
/* (Това е за отстъпа от 2 пръста) */
#about-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem; 
}
#about-content-wrapper blockquote {
  border-left: 4px solid hsl(var(--border));
  padding-left: 1rem;
  margin-left: 0.5rem;
  font-style: italic;
  color: hsl(var(--muted-foreground));
}
#about-content-wrapper p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

#about-content-wrapper p.font-serif {
  text-indent: 0;
}
/* --- КРАЙ НА КОРЕКЦИЯ 1 --- */


/* * -------------------------------------------
 * *** НОВИ СТИЛОВЕ ЗА МЕНЮ (100% ПРЕНАПИСАНИ) ***
 * -------------------------------------------
*/

/* 1. Контейнерът за страниците */
#menu-content-display {
  position: relative;
  max-width: 36rem; /* 576px */
  margin-left: auto;
  margin-right: auto;
  
  transition: height 0.4s ease-in-out; 
  
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1), 0 0 0 1px hsl(var(--border));
  background-color: transparent;
  overflow: hidden; 
}

/* 2. Всяка "страница" */
.menu-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto; 
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  
  background-color: hsl(var(--card)); 
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  padding: 2.5rem; /* 40px padding */
  box-sizing: border-box; /* Важно! */
}

/* Класове за видимост (от script.js) */
.menu-page-visible {
  display: block;
}
.menu-page-visible.menu-page-flex {
  display: flex;
}
.menu-page-visible-opacity {
  opacity: 1;
}

/* 3. "Шевица" (декоративна рамка) - СКРИТА ПО ПОДРАЗБИРАНЕ */
.menu-page::before {
  display: none; 
}

/* 4. Специфично: Предна Корица */
.menu-page[data-index="-1"] {
  background: hsl(var(--background)); 
  color: hsl(var(--foreground));
  text-align: center;
  padding: 2rem;
  display: flex; 
  align-items: center;
  justify-content: center;
  height: 100%; /* Само предната корица е 100% от 500px */
}
/* *** ПОКАЗВАМЕ РАМКАТА САМО ЗА КОРИЦАТА *** */
.menu-page[data-index="-1"]::before {
  display: block; /* Показваме рамката */
  content: '';
  position: absolute;
  top: 0.75rem; 
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  border: 1px solid hsl(var(--foreground) / 0.15);
  box-shadow: 0 0 0 2px hsl(var(--foreground) / 0.08);
  border-radius: 3px;
  pointer-events: none;
  z-index: 1;
}

.cover-content {
  position: relative;
  z-index: 2;
}
.cover-content img {
  height: 10rem;
  width: auto;
  margin: 0 auto 1.5rem auto;
}
.cover-content h3 {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

/* 5. Групиране на Категории (когато има >1 на страница) */
.menu-category-group {
  margin-bottom: 2.5rem; /* Разстояние между групите */
}
.menu-category-group:last-child {
  margin-bottom: 0;
}

/* 6. Заглавие на Категория (пр. "Наливно вино") */
.menu-category-title { 
  font-family: var(--font-serif);
  font-size: 1.75rem; /* 28px */
  line-height: 2rem;
  margin-bottom: 1.5rem;
  color: hsl(var(--primary)); /* Червен цвят */
  text-align: center;
}

/* 7. Един артикул от менюто */
.menu-item {
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid hsl(var(--border));
}
.menu-item:last-of-type {
  border-bottom: none;
}
.menu-items-list {
  /* Този клас вече не е нужен, но го оставяме,
     тъй като script.js го генерира */
}

.menu-item-grid {
  display: grid;
  grid-template-columns: 1fr auto; 
  gap: 1rem; 
  align-items: start;
}
.menu-item-right {
  text-align: right; 
}

/* 8. Текстове в артикула (С правилните шрифтове и цветове) */
.menu-item-name {
  font-family: var(--font-sans); 
  font-size: 1.1rem; 
  line-height: 1.4rem;
  font-weight: 700; 
  color: hsl(var(--foreground)); 
}
.menu-item-desc {
  font-family: var(--font-sans); 
  font-size: 0.9rem; 
  line-height: 1.25rem;
  font-weight: 400; 
  color: hsl(var(--muted-foreground)); 
  margin-top: 0.1rem;
}
.menu-item-price-bgn {
  font-family: var(--font-sans); 
  font-size: 1.1rem; 
  line-height: 1.4rem;
  font-weight: 700;
  color: hsl(var(--accent)); 
}
.menu-item-price-eur {
  font-family: var(--font-sans); 
  font-size: 0.9rem; 
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground)); 
  margin-top: 0;
}
.menu-item-size {
  display: block; 
  font-family: var(--font-sans); 
  font-size: 0.9rem; 
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground)); 
  margin-top: 0.1rem;
}


/* 9. Страница "Алергени" */
.allergen-content-wrapper {
  columns: 2;
  gap: 1.5rem;
}
.allergen-item {
  padding: 0.3rem 0;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
  break-inside: avoid-column; 
}
.allergen-item:last-of-type,
.allergen-item:nth-last-of-type(7) { 
  border-bottom: none; 
}
.allergen-item h4 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.3rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

/* --- КОРЕКЦИЯ 2: ЗАДНА КОРИЦА (Финална) --- */
.back-cover-page {
  background: linear-gradient(135deg, hsl(25, 30%, 22%), hsl(25, 30%, 18%));
  color: hsl(var(--primary-foreground));
  
  /* Има същия padding като другите страници */
  padding: 2.5rem; /* 40px */
  box-sizing: border-box; 
  align-items: flex-start;
  
  /* JS ще оразмери височината, ние просто скриваме overflow */
  overflow: hidden; 
}
.back-cover-page::before {
  display: none;
}

.back-cover-content-wrapper {
  /* НЯМА Скрол, НЯМА макс. височина */
  overflow-y: visible;
  height: auto;
  max-height: none;
  
  /* Махаме вътрешния padding, защото .back-cover-page вече го има */
  padding: 0;
  
  box-sizing: border-box; 
  position: relative;
  z-index: 2;
}

/* Махаме всички правила за скролбара */
.back-cover-content-wrapper::-webkit-scrollbar {
  display: none;
}
.back-cover-content-wrapper {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.back-cover-content {
  text-align: center;
  font-size: 0.8rem; 
  line-height: 1.5;
  color: hsl(var(--background) / 0.8);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem; 
}
.back-cover-content img {
  width: 100px; 
  margin: 0 auto 1rem;
  filter: brightness(0) invert(0.9);
}
.back-cover-content p {
  margin-bottom: 0.75rem; 
}
.back-cover-content h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem; 
  margin-top: 1rem;
  color: hsl(var(--background));
}
/* --- КРАЙ НА КОРЕКЦИЯ 2 --- */


/* 8. СЛАЙДЕР ЗА ГАЛЕРИЯ (Без промяна) */
.gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: pointer;
}
.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.gallery-dot.active {
  background-color: hsl(var(--primary));
  border-color: hsl(var(--primary));
}

/* * -------------------------------------------
 * *** СТИЛОВЕ: Нови бутони за меню (Над) ***
 * -------------------------------------------
*/
.menu-top-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem; /* 8px */
  padding: 0.5rem 1rem; /* 8px 16px */
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  font-size: 0.875rem; /* 14px */
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  
  opacity: 1;
  pointer-events: auto;
  z-index: 10; /* Слагаме го над съдържанието */
}

.menu-top-nav-btn:hover {
  background-color: hsl(var(--background));
  border-color: hsl(var(--muted));
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.menu-top-nav-btn:active {
  transform: translateY(1px);
}

/* Стил за деактивираните бутони */
.menu-top-nav-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

/* Връщаме оригиналния стил на брояча */
#menu-page-counter {
  display: block;
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  margin-top: 1rem;
  position: relative; /* Добавяме, за да е над шевиците */
  z-index: 10;
}


/* * -------------------------------------------
 * *** СТИЛОВЕ ЗА ШЕВИЦИ (АКО СЪЩЕСТВУВАТ) ***
 * -------------------------------------------
*/
.menu-shevitsa {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  background-repeat: repeat-y;
  background-position: center top;
  background-size: 100% auto;
  opacity: 0.5;
  z-index: 0;
}
.menu-shevitsa.left-shevitsa {
  left: 0;
}
.menu-shevitsa.right-shevitsa {
  right: 0;
}

@media (min-width: 1280px) {
  .menu-shevitsa {
    display: block;
  }
}