/* ============================================================
   Dreams Палачинки & Гофрети — Созопол
   Помощни стилове. Основната стилизация е през Tailwind (CDN).
   Тук са само нещата, които Tailwind не покрива удобно:
   scroll-reveal, lightbox, sticky chips, ценови ред, слотове.
   ============================================================ */

/* ---- Плавен скрол за котвените връзки в менюто ---- */
html { scroll-behavior: smooth; }

/* Резервирана височина на хедъра, за да няма CLS докато се инжектира */
#site-header { min-height: 64px; }

/* ============================================================
   Scroll-reveal (Intersection Observer добавя .is-visible)
   Дискретно. При prefers-reduced-motion се изключва.
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Слотове за снимки (докато получим реалните изображения)
   ============================================================ */
.img-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  color: #9a7b57;
  background:
    repeating-linear-gradient(45deg, #f3ead6 0 12px, #efe3c9 12px 24px);
  border: 2px dashed #c9ad82;
  border-radius: 1rem;
  font-size: .8rem;
  line-height: 1.4;
  letter-spacing: .02em;
}
.img-slot span { max-width: 22ch; }

/* ============================================================
   Ценови ред: евро водещо, лева до него по-дребно
   ============================================================ */
.price-eur {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price-bgn {
  font-size: .78em;
  opacity: .7;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price-pending {
  font-size: .72em;
  color: #b4863f;
  font-style: italic;
  white-space: nowrap;
}
.menu-dotline {
  flex: 1 1 auto;
  border-bottom: 1px dotted #d8c39c;
  margin: 0 .5rem .28em;
  min-width: 1.5rem;
}

/* ============================================================
   Sticky chip навигация в менюто (мобилно най-отгоре)
   ============================================================ */
.chip-nav {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chip-nav::-webkit-scrollbar { display: none; }

/* ------------------------------------------------------------
   Хедърът се скрива при скрол НАДОЛУ и се връща при скрол НАГОРЕ.
   Целта: закачената лента с чиповете да заема възможно най-малко
   от екрана, докато четеш менюто (127px → 63px).
   Лентата с чиповете скача на top:0, когато хедърът е скрит —
   иначе на негово място остава прозрачна празнина и артикулите
   се показват през нея.
   ------------------------------------------------------------ */
#site-header {
  transition: transform .25s ease;
  will-change: transform;
}
body.header-hidden #site-header {
  transform: translateY(-100%);
}
.chip-sticky {
  top: 4rem;                 /* точно под хедъра (64px) */
}
body.header-hidden .chip-sticky {
  top: 0;
}
@media (prefers-reduced-motion: reduce) {
  #site-header { transition: none; }
}

/* ============================================================
   Lightbox за галерията
   ============================================================ */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 42, 61, .92);
  cursor: zoom-out;
}
#lightbox.is-open { display: flex; }
#lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: .75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
#lightbox .lb-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}

/* Липсват ли снимки в галерията, слотовете пак изглеждат подредени */
.gallery-item { overflow: hidden; }
.gallery-item img { transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.05); }
