/* Şablon galerisi: ana sayfa vitrini ve /galeri/ sayfasının ortak kart ve filtre stilleri */

/* Filtre şeridi: her ekranda tek satır, fareyle sürüklenir (sablon-galeri.js dragScroll) */
.tpl-chips {
  position: relative; display: flex; flex-wrap: nowrap; gap: 10px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  padding: 4px 8px 10px 2px; cursor: grab; user-select: none; -webkit-user-select: none;
}
.tpl-chips::-webkit-scrollbar { display: none; }
.tpl-chips.dragging { cursor: grabbing; }
.tpl-chips.dragging .tpl-chip { pointer-events: none; }
.tpl-chips.fade-end { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent); }
.tpl-chips.fade-start { -webkit-mask-image: linear-gradient(90deg, transparent, #000 64px); mask-image: linear-gradient(90deg, transparent, #000 64px); }
.tpl-chips.fade-start.fade-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 64px, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(90deg, transparent, #000 64px, #000 calc(100% - 64px), transparent); }
.tpl-chip {
  font-family: var(--font-body); font-weight: 700; font-size: 14.5px; line-height: 1;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 2px solid var(--ink);
  flex: none; white-space: nowrap;
  background: var(--white); color: var(--ink); cursor: pointer;
  transition: transform .2s var(--ease-pop), background .2s, box-shadow .2s;
}
.tpl-chip:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hard-sm); }
.tpl-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.tpl-chip b {
  font-size: 12px; font-weight: 700; min-width: 24px; padding: 3px 7px; border-radius: 999px;
  background: var(--lav); color: var(--ink); text-align: center;
}
.tpl-chip[aria-pressed="true"] b { background: var(--lime); }

.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }

.tpl-card { display: block; color: var(--ink); text-decoration: none; }
.tpl-card[hidden] { display: none; }
.tpl-frame {
  position: relative; border: 2px solid var(--ink); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--white);
  transition: transform .3s var(--ease-pop), box-shadow .3s var(--ease-pop);
}
.tpl-bar {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px;
  border-bottom: 2px solid var(--ink); background: var(--bg);
}
.tpl-bar i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); }
.tpl-bar i:nth-child(1) { background: var(--accent); }
.tpl-bar i:nth-child(2) { background: var(--lime); }
.tpl-shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--lav); }
.tpl-shot img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; color: transparent;
  transition: transform .6s var(--ease-pop);
}
.tpl-open {
  position: absolute; inset: auto 14px 14px auto;
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  padding: 10px 16px; border-radius: 12px; border: 2px solid var(--ink);
  background: var(--lime); color: var(--ink); box-shadow: var(--shadow-hard-sm);
  opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s var(--ease-pop);
}
.tpl-card:hover .tpl-frame,
.tpl-card:focus-visible .tpl-frame { transform: translate(-5px, -5px) rotate(-.4deg); box-shadow: 9px 9px 0 var(--ink); }
.tpl-card:hover .tpl-shot img { transform: scale(1.04); }
.tpl-card:hover .tpl-open,
.tpl-card:focus-visible .tpl-open { opacity: 1; transform: none; }
.tpl-card:focus-visible { outline: none; }

.tpl-meta { margin-top: 18px; }
.tpl-cat {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: var(--lime);
}
.tpl-meta h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.3; margin-top: 12px; }
.tpl-meta p {
  font-size: 15.5px; color: rgba(21, 25, 21, .68); margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Ana sayfa vitrini */
.showcase-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.showcase-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.showcase-stats .sticker:nth-child(1) { background: var(--lime); }
.showcase-stats .sticker:nth-child(2) { background: var(--lav); transform: rotate(2deg); }
.showcase-chips { margin: -24px 0 40px; }
.showcase-actions { display: flex; gap: 18px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 64px; }

@media (max-width: 1080px) {
  .tpl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .tpl-grid { grid-template-columns: 1fr; gap: 36px; }
  .tpl-open { opacity: 1; transform: none; }
  .showcase-chips { margin: -12px -22px 28px; padding-inline: 22px; scroll-padding-inline: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .tpl-frame, .tpl-shot img, .tpl-open, .tpl-chip { transition: none; }
}
