/* ── VİTRİN ŞABLONU (views/menu/gallery.ejs) ──
   Ortak bileşenler ve renk değişkenleri public/menu.css'te; burada sadece bu şablonun düzeni var. */
:root {
  --font-display: 'DM Serif Display', serif;
  --font-body: 'DM Sans', sans-serif;
}

/* ── KAPAK ── */
.gl-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: min(52vh, 420px);
  padding: 1rem 16px 1.75rem;
  background: linear-gradient(135deg, var(--banner-from), var(--banner-to));
  background-size: cover;
  background-position: center;
  color: var(--dark);
}

/* Kapak fotoğrafı yoksa boş bir alan bırakmasın */
.gl-hero:not(.has-photo) {
  min-height: 0;
  gap: 2.5rem;
}

/* Fotoğraf varsa yazı okunabilsin diye alttan koyulaşan katman */
.gl-hero.has-photo {
  color: #fff;
}

.gl-hero.has-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0.25) 100%);
}

.gl-hero-top,
.gl-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.gl-hero-top {
  display: flex;
  justify-content: flex-end;
}

.gl-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.3rem, 8vw, 3.8rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.gl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.85;
}

.gl-meta a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── KATEGORİ ÇİPLERİ ── */
.gl-chips {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.75rem max(16px, calc((100% - 1100px) / 2));
  background: rgba(var(--bg-rgb), 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.gl-chips::-webkit-scrollbar {
  display: none;
}

.gl-chip {
  flex-shrink: 0;
  padding: 0.5rem 1.05rem;
  border-radius: 99px;
  background: var(--surface2);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.gl-chip.active {
  background: var(--dark);
  color: var(--bg);
}

/* ── GÖVDE ── */
.gl-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 4rem;
}

body:has(.call-bar) .gl-body {
  padding-bottom: 8rem;
}

.gl-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
}

.gl-empty-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.gl-section {
  padding-top: 2rem;
  scroll-margin-top: 60px;
}

.gl-section-title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.75rem;
  color: var(--dark);
  margin-bottom: 1rem;
}

.gl-section-count {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted2);
}

/* ── IZGARA ── */
.gl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem 1rem;
}

.gl-card {
  min-width: 0;
  cursor: pointer;
}

.gl-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gl-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.gl-card:hover .gl-photo img {
  transform: scale(1.05);
}

.gl-photo-empty {
  font-size: 2.8rem;
  color: var(--muted2);
  opacity: 0.7;
}

.gl-price {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 0.3rem 0.7rem;
  border-radius: 99px;
  background: var(--card);
  color: var(--dark);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.gl-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.gl-card-body {
  padding: 0.6rem 0.15rem 0;
}

.gl-card-name {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
}

.gl-card-desc {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gl-card-body .tag {
  display: inline-block;
  margin-top: 0.4rem;
}

/* Tükenen ürün */
.gl-card.sold-out .gl-photo img {
  filter: grayscale(1);
  opacity: 0.6;
}

.gl-card.sold-out .gl-card-name,
.gl-card.sold-out .gl-card-desc {
  opacity: 0.55;
}

.gl-card.sold-out .gl-price {
  text-decoration: line-through;
  color: var(--muted2);
}

.lightbox-name,
.fb-title {
  font-weight: 400;
}

/* Telefonda iki sütun */
@media (max-width: 520px) {
  .gl-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem 0.75rem;
  }

  .gl-photo {
    border-radius: 14px;
  }

  .gl-price {
    left: 8px;
    bottom: 8px;
    font-size: 0.8rem;
  }

  .gl-card-name {
    font-size: 0.9rem;
  }
}
