/* =========================================================
   tema-v2.css — TÜM PUBLIC EKRANLARDA ORTAK İYİLEŞTİRME KATMANI
   Vitrin, menü ve ürün detay sayfalarının paylaştığı kararlar.
   Kural: HTML'e DOKUNULMAZ. Font tanımlanmaz (tenant ayarından gelir).
   Sayfaya özel katmanlardan (vitrin-v2.css, menu-v2.css) ÖNCE yüklenir.
   ========================================================= */

html:root {
  /* Gölgeler %2-4 opaklıktaydı, yani pratikte yoktu.
     İki isimlendirme de kullanılıyor: vitrin.css -s/-m/-l, menu.css -sm/-md/-lg */
  --shadow-s:  0 1px 2px rgba(28, 18, 12, .06), 0 2px 8px rgba(28, 18, 12, .05);
  --shadow-m:  0 2px 6px rgba(28, 18, 12, .06), 0 12px 28px rgba(28, 18, 12, .09);
  --shadow-l:  0 8px 20px rgba(28, 18, 12, .10), 0 32px 64px rgba(28, 18, 12, .16);
  --shadow-sm: 0 1px 2px rgba(28, 18, 12, .06), 0 2px 8px rgba(28, 18, 12, .05);
  --shadow-md: 0 2px 6px rgba(28, 18, 12, .06), 0 12px 28px rgba(28, 18, 12, .09);
  --shadow-lg: 0 8px 20px rgba(28, 18, 12, .10), 0 32px 64px rgba(28, 18, 12, .16);
}

/* Klavye ile gezinenler için görünür odak — hiçbir ekranda yoktu */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* iOS'ta 16px altındaki input'a dokununca sayfa kendiliğinden yakınlaşır.
   Arama kutusu 12px'ti; her aramada ekran zıplıyordu. */
@media (max-width: 899px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* =========================================================
   MOBİL BAŞLIK ŞERİDİ — vitrin, menü ve ürün detayda ORTAK
   Sorun: işletme adı iki-üç satıra kırılıyor, dil seçimi kalın
   çerçeveli kocaman bir kutu olarak yerin yarısını yiyordu
   ("NL-BE" ayrıca kendi içinde satır kırıyordu).
   ========================================================= */
@media (max-width: 899px) {

  .public-header {
    min-height: 60px;
    gap: 10px;
    padding: 10px 14px;
  }

  .brand {
    min-width: 0;
    gap: 9px;
    font-size: 15px;
  }

  /* İşletme adı tek satır, sığmazsa üç nokta */
  .brand > .brand-copy,
  .brand > span:not([aria-hidden]) {
    min-width: 0;
  }

  .brand-copy strong,
  .brand > span:not([aria-hidden]) {
    display: block;
    min-width: 0;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* İkinci satır (konum) başlıkta gereksiz: hero'da ve footer'da zaten var */
  .brand-copy small {
    display: none;
  }

  /* Dil seçimi: çerçeve/kutu gürültüsü kalktı, düz metin oldu */
  .language-switch,
  .public-web-language {
    padding: 0;
    gap: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .language-switch a,
  .public-web-language a {
    min-width: 0;
    padding: 4px 5px;
    font-size: 10.5px;
    white-space: nowrap;      /* "NL-BE" satır kırıyordu */
  }

  .language-switch a.active,
  .language-switch .active,
  .public-web-language a.active {
    background: transparent;
    box-shadow: none;
    transform: none;
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
  }

  /* Marka rozeti sarı (--accent) idi; marka rengiyle uyumsuzdu */
  .brand-mark {
    background: var(--brand);
    color: #fff;
  }
}

@media (max-width: 379px) {
  .brand-logo,
  .brand-mark {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
  }

  .brand-copy strong,
  .brand > span:not([aria-hidden]) {
    font-size: 14px;
  }

  .language-switch a,
  .public-web-language a {
    padding: 4px 4px;
    font-size: 10px;
  }
}

/* =========================================================
   ORTAK PUBLIC HEADER — vitrin, menü, detay, kombo ve sepet
   ========================================================= */
.public-page > .public-site-header {
  position: sticky;
  top: 12px;
  z-index: 1100;
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  gap: 18px;
  width: min(calc(100% - 32px), 1320px);
  min-height: 72px;
  margin: 16px auto 0;
  padding: 9px 14px 9px 18px;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow-m);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.public-site-header .public-web-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.public-site-header .public-web-brand img,
.public-site-header .public-web-brand > span[aria-hidden] {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 13px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  object-fit: cover;
  box-shadow: 0 5px 15px color-mix(in srgb, var(--brand) 26%, transparent);
}

.public-site-header .public-web-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.public-site-header .public-web-brand-copy strong,
.public-site-header .public-web-brand-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-site-header .public-web-brand-copy strong {
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.15;
}

.public-site-header .public-web-brand-copy small {
  color: var(--muted);
  font-size: 11px;
}

.public-site-header .public-web-nav,
.public-site-header .public-web-actions,
.public-site-header .public-web-language {
  display: flex;
  align-items: center;
}

.public-site-header .public-web-nav {
  justify-content: center;
  gap: 4px;
}

.public-site-header .public-web-nav a {
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.public-site-header .public-web-nav a:hover,
.public-site-header .public-web-nav a.active {
  background: var(--brand-soft);
  color: var(--brand);
}

.public-site-header .public-web-actions {
  justify-content: flex-end;
  gap: 10px;
}

.public-site-header .public-web-menu-cta,
.public-site-header .public-header-wifi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 18px;
  border: 0;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  font: 700 13px var(--font);
  text-decoration: none;
  cursor: pointer;
}

.public-site-header .public-header-wifi {
  background: var(--brand-soft);
  color: var(--brand);
}

.public-site-header .public-web-language {
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-2);
}

.public-site-header .public-web-language a {
  min-width: 32px;
  padding: 6px 7px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.public-site-header .public-web-language a.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow-s);
}

.public-header-toggle {
  display: none;
}

@media (max-width: 899px) {
  .public-page > .public-site-header {
    top: 0;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
    width: 100%;
    min-height: 62px;
    margin: 0;
    padding: 9px 12px 9px 14px;
    border-width: 0 0 1px;
    border-radius: 0;
  }

  .public-site-header .public-web-brand img,
  .public-site-header .public-web-brand > span[aria-hidden] {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 11px;
  }

  .public-site-header .public-web-brand-copy strong {
    font-size: 16px;
  }

  .public-site-header .public-web-brand-copy small,
  .public-site-header .public-web-nav {
    display: none;
  }

  .public-header-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
    border-radius: 13px;
    background: var(--brand-soft);
    color: var(--brand);
    cursor: pointer;
  }

  .public-header-toggle svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .public-site-header.menu-open .public-header-toggle {
    background: var(--brand);
    color: #fff;
  }

  .public-site-header .public-header-drawer {
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;
    display: none;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    width: min(310px, calc(100vw - 24px));
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow-l);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .public-site-header.menu-open .public-header-drawer {
    display: grid;
    gap: 12px;
  }

  .public-site-header .public-web-menu-cta,
  .public-site-header .public-header-wifi {
    width: 100%;
    min-height: 46px;
  }

  .public-site-header .public-web-language {
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 5px;
  }

  .public-site-header .public-web-language a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 9px;
    font-size: 11px;
  }
}

/* =========================================================
   VİTRİN → MENÜ GEÇİŞ EKRANI
   ========================================================= */
.menu-loading-overlay[hidden] {
  display: none;
}

.menu-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(255, 255, 255, .60);
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
}

.menu-loading-content {
  display: grid;
  justify-items: center;
  gap: 20px;
  color: var(--brand);
  text-align: center;
}

.menu-loading-content > strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 800;
  letter-spacing: -.02em;
  animation: menu-loading-text 1.4s ease-in-out infinite;
}

.menu-loading-cloche {
  position: relative;
  width: 104px;
  height: 82px;
  color: var(--brand);
  animation: menu-cloche-float 1.5s ease-in-out infinite;
}

.menu-loading-cloche > span {
  position: absolute;
  right: 13px;
  bottom: 13px;
  left: 13px;
  height: 39px;
  border: 5px solid currentColor;
  border-bottom: 0;
  border-radius: 52px 52px 0 0;
}

.menu-loading-cloche > span::before {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 18px;
  height: 10px;
  border: 4px solid currentColor;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  content: "";
  transform: translateX(-50%);
}

.menu-loading-cloche > span::after {
  position: absolute;
  right: -12px;
  bottom: -8px;
  left: -12px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.menu-loading-cloche > i {
  position: absolute;
  top: 0;
  width: 4px;
  height: 17px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
  animation: menu-steam 1.5s ease-in-out infinite;
}

.menu-loading-cloche > i:nth-child(1) { left: 34px; animation-delay: 0s; }
.menu-loading-cloche > i:nth-child(2) { left: 50px; animation-delay: .25s; }
.menu-loading-cloche > i:nth-child(3) { left: 66px; animation-delay: .5s; }

.menu-is-loading body {
  overflow: hidden;
}

@keyframes menu-steam {
  0% { opacity: 0; transform: translateY(8px) scaleY(.6); }
  45% { opacity: .85; }
  100% { opacity: 0; transform: translateY(-10px) scaleY(1.15); }
}

@keyframes menu-cloche-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes menu-loading-text {
  0%, 100% { opacity: .68; }
  50% { opacity: 1; }
}
