:root {
  --bg: #f5f3ef;
  --ink: #1b1a18;
  --muted: #8b867e;
  --line: #dcd8d0;
  --tile: #e9e6e0;
  --wa: #25d366;
  --tg: #229ed9;
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --gutter: 16px;
  --gap: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.locked { overflow: hidden; }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

svg { display: block; }

/* Ust baslik */
.masthead {
  padding: 48px var(--gutter) 36px;
  text-align: center;
}

.title {
  margin: 0;
  line-height: 0;
}

.logo {
  display: inline-block;
  width: clamp(190px, 58vw, 320px);
  height: auto;
}

.subtitle {
  margin: 14px 0 0;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.subtitle:empty { display: none; }

/* Kategori satiri: telefonda yatay kayar */
.filters {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: -8px 0 28px;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filters::-webkit-scrollbar { display: none; }

.filters[hidden] { display: none; }

.filter {
  flex: none;
  padding: 10px 0;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}

.filter[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }

/* NEW: sade yazi, hafif kalin, etrafinda kucuk altin yaldizlar */
.filter-new {
  --spark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 0C5.4 3.6 6.4 4.6 10 5 6.4 5.4 5.4 6.4 5 10 4.6 6.4 3.6 5.4 0 5 3.6 4.6 4.6 3.6 5 0Z' fill='%23c9a227'/%3E%3C/svg%3E");
  position: relative;
  font-weight: 600;
  color: var(--ink);
  overflow: visible;
}

.filter-new::before,
.filter-new::after {
  content: "";
  position: absolute;
  background: var(--spark) center / contain no-repeat;
  pointer-events: none;
  animation: sparkle 2.2s ease-in-out infinite;
}

/* Uc kucuk yaldiz: sol ust, sag ust (::before) ve sag alt (::after, farkli zamanda parlar) */
.filter-new::before {
  inset: 2px -12px auto -12px;
  height: 10px;
  background-image: var(--spark), var(--spark);
  background-position: left top, right 2px top 0;
  background-size: 9px 9px, 6px 6px;
  background-repeat: no-repeat;
}

.filter-new::after {
  width: 6px;
  height: 6px;
  bottom: 6px;
  right: -8px;
  animation-delay: 1.1s;
}

@keyframes sparkle {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}

@media (prefers-reduced-motion: reduce) {
  .filter-new::before, .filter-new::after { animation: none; }
}

/* Sigmazsa sola yasla ki ilk sekme kesilmesin */
.filters.overflowing { justify-content: flex-start; }

/* Izgara */
main { padding: 0 var(--gutter); }

.grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1440px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px var(--gap);
}

.card { margin: 0; }

.card button {
  display: block;
  width: 100%;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--tile);
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity .6s var(--ease), transform 1.2s var(--ease);
}

.frame img.loaded { opacity: 1; }

@media (hover: hover) {
  .card button:hover .frame img { transform: scale(1.025); }
}

.card button:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

.card-name {
  margin: 10px 0 0;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
}

.hide-names .card-name { display: none; }

.empty {
  text-align: center;
  color: var(--muted);
  letter-spacing: .08em;
  padding: 80px 0;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; --gap: 20px; }
  .grid { grid-template-columns: repeat(3, 1fr); row-gap: 44px; }
  .masthead { padding-top: 80px; padding-bottom: 64px; }
}

@media (min-width: 1200px) {
  :root { --gutter: 56px; --gap: 28px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
}

/* Alt bilgi */
.footer {
  padding: 72px var(--gutter) calc(96px + env(safe-area-inset-bottom));
  text-align: center;
}

.footer-link {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
}

/* Izgaranin ustu: solda bayraklar, sagda WhatsApp + Telegram. Kaydirirken ustte kalir. */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  max-width: 1440px;
  margin: 0 auto 14px;
  padding: calc(8px + env(safe-area-inset-top)) 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg);
  direction: ltr;
}

.langs { display: flex; margin-left: -7px; }

.lang {
  width: 32px;
  height: 40px;
  display: grid;
  place-items: center;
  opacity: .4;
  transition: opacity .2s;
}

.lang .fi {
  width: 20px;
  height: 15px;
  background-size: cover;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .15);
}

.lang[aria-pressed="true"] { opacity: 1; }

@media (hover: hover) { .lang:hover { opacity: 1; } }

/* Bilgisayarda: izgaranin sag ustunde yazili butonlar */
.bar-contact { display: none; gap: 8px; }

.btn {
  height: 40px;
  padding: 0 16px 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 20px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform .2s var(--ease), filter .2s;
}

.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }

.btn-wa { background: var(--wa); }
.btn-tg { background: var(--tg); }

.btn:active { transform: scale(.96); }

@media (hover: hover) { .btn:hover { filter: brightness(1.06); } }

@media (min-width: 720px) {
  .bar-contact { display: flex; }
  body .contact-fabs { display: none; }
}

/* Telefonda: sag altta, basparmaga yakin. Telegram ustte, WhatsApp altta */
.contact-fabs {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  transition: transform .2s var(--ease);
}

.fab span { display: none; }

.fab svg { width: 28px; height: 28px; fill: currentColor; }

.fab-wa { background: var(--wa); }
.fab-tg { background: var(--tg); }

.fab:active { transform: scale(.94); }

body.locked .contact-fabs { display: none; }

/* Hakkimizda */
.about {
  max-width: 560px;
  margin: 96px auto 0;
  padding: 48px var(--gutter) 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.about-title {
  margin: 0 0 18px;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-text { margin: 0; font-size: 15px; line-height: 1.7; }

.about-since {
  margin: 22px 0 0;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.about-facts {
  margin: 24px 0 0;
  display: grid;
  gap: 4px;
  font-size: 14px;
}

.about-facts dt {
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-facts dt:empty { display: none; }

.about-facts dd { margin: 0; }

.about-facts a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }

.footer span {
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--muted);
}

/* Buyuk gorunum */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  opacity: 0;
  transition: opacity .25s var(--ease);
  touch-action: none;
}

.lightbox.open { opacity: 1; }

.lightbox[hidden] { display: none; }

.lb-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(8px + env(safe-area-inset-top)) 8px 0 var(--gutter);
  min-height: 52px;
}

.lb-count {
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.lb-close { width: 48px; height: 48px; display: grid; place-items: center; }

.lb-close svg, .lb-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}

.lb-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.lb-track {
  display: flex;
  height: 100%;
  will-change: transform;
}

.lb-track.animate { transition: transform .35s var(--ease); }

.lb-slide {
  flex: 0 0 100%;
  height: 100%;
  padding: 8px var(--gutter);
}

.lb-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  display: none;
  place-items: center;
}

.lb-prev { inset-inline-start: 8px; }
.lb-next { inset-inline-end: 8px; }

.lb-nav:disabled { opacity: .2; cursor: default; }

@media (hover: hover) and (min-width: 720px) {
  .lb-nav { display: grid; }
}

.lb-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 14px var(--gutter) calc(20px + env(safe-area-inset-bottom));
}

.lb-name {
  margin: 0;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-align: center;
  min-height: 1.5em;
}

.lb-info {
  list-style: none;
  margin: -6px 0 0;
  padding: 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.lb-info:empty { display: none; }

/* Iki esit buton: WhatsApp ve Telegram ile bilgi al */
.lb-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  max-width: 440px;
}

.lb-wa, .lb-tg {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 50px;
  padding: 0 8px;
  color: #fff;
  border-radius: 25px;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.lb-wa span, .lb-tg span { overflow: hidden; text-overflow: ellipsis; }

/* Dar telefonlarda (iPhone SE gibi) yazi kesilmesin, iki satira insin */
@media (max-width: 359px) {
  .lb-wa, .lb-tg { white-space: normal; line-height: 1.2; font-size: 12px; text-align: center; }
  .lb-wa span, .lb-tg span { overflow: visible; }
}

.lb-wa { background: var(--wa); }
.lb-tg { background: var(--tg); }

.lb-wa svg, .lb-tg svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Arapca: harfler birlesik yazildigi icin harf araligi ve buyuk harf kullanilmaz */
html[lang="ar"] .subtitle, html[lang="ar"] .filter, html[lang="ar"] .card-name, html[lang="ar"] .lb-name,
html[lang="ar"] .about-title, html[lang="ar"] .about-since, html[lang="ar"] .about-facts dt {
  letter-spacing: 0;
  text-transform: none;
  font-size: 13px;
}

html[lang="ar"] .lb-prev svg, html[lang="ar"] .lb-next svg { transform: scaleX(-1); }

/* Yakinken: bilgisayarda el imleci, oklar gizli */
.lightbox.zoomed .lb-stage { cursor: grab; }
.lightbox.zoomed .lb-nav { visibility: hidden; }
