/* =========================================================
   Emex Otel Havuz — QR Menü
   Mobil öncelikli. Ana sayfa: kategori kartları.
   ========================================================= */

:root {
  /* Netro Spor marka renkleri (logo.pdf'den örneklendi) */
  --navy: #11173f;
  --navy-2: #1a2158;
  --navy-3: #232c6e;
  --brand-cyan: #00adef;
  --brand-yellow: #fff100;

  --deep: #0b102e;
  --ink: #171d45;
  --ink-2: #3a4272;
  --ink-soft: #767da6;
  --line: rgba(17, 23, 63, 0.1);

  --aqua-500: #00adef;
  --aqua-700: #0087c2;
  --aqua-900: #0a5d8f;
  --aqua-100: #e3f5fd;

  --paper: #ffffff;
  --bg: #f3f6fb;
  --coral: #ff7a59;
  --coral-soft: #fff1ec;
  --gold: #e8a838;

  --font-ui: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;

  --r-xl: 24px;
  --r-lg: 18px;
  --r-md: 13px;
  --r-sm: 9px;

  --gutter: 16px;
  --shadow-1: 0 1px 2px rgba(6, 48, 61, 0.05), 0 8px 20px -12px rgba(6, 48, 61, 0.3);
  --shadow-2: 0 2px 6px rgba(6, 48, 61, 0.07), 0 18px 34px -18px rgba(6, 48, 61, 0.45);
  --shadow-3: 0 -8px 40px -10px rgba(6, 48, 61, 0.35);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* kategori teması — JS tarafından ezilir */
  --theme: var(--aqua-700);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body.is-locked { overflow: hidden; }

img { max-width: 100%; display: block; }

button { font: inherit; color: inherit; }

.shell {
  width: 100%;
  max-width: 620px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =========================================================
   GÖRSEL + YEDEK (fotoğraf yoksa)
   ========================================================= */
.ph {
  display: block;
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, var(--theme), color-mix(in srgb, var(--theme) 55%, #0b102e));
  isolation: isolate;
}
/* dalga dokusu */
.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    radial-gradient(circle at 20% 18%, #fff 0 1.5px, transparent 2px),
    radial-gradient(circle at 68% 62%, #fff 0 1.5px, transparent 2px);
  background-size: 26px 26px, 34px 34px;
  pointer-events: none;
}
.ph img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.ph img.is-loaded { opacity: 1; }
.ph__icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  color: #fff;
  opacity: 0.5;
}
.ph__icon svg { width: 46%; max-width: 68px; height: auto; }

/* =========================================================
   ÜST BAŞLIK — ana sayfa (Netro Spor kimliği)
   ========================================================= */
.top {
  position: relative;
  padding: 34px 0 30px;
  color: #fff;
  background:
    radial-gradient(90% 120% at 50% -20%, var(--navy-3) 0%, rgba(35, 44, 110, 0) 60%),
    var(--navy);
}
.top__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.top__logo {
  width: min(200px, 52vw);
  height: auto;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.45));
}
.top__divider {
  width: 44px; height: 2px;
  margin: 20px 0 14px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-yellow));
}
.top__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  color: #eef1ff;
}
.top__sub {
  margin: 7px 0 0;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: rgba(238, 241, 255, 0.45);
}

/* marka şeridi: camgöbeği → sarı */
.brand-stripe {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-cyan) 0%, var(--brand-cyan) 46%, var(--brand-yellow) 54%, var(--brand-yellow) 100%);
}
.footer .brand-stripe { top: 0; bottom: auto; }

/* =========================================================
   ARAMA
   ========================================================= */
.search {
  position: relative;
  margin-top: -26px;
  z-index: 5;
}
.search input {
  width: 100%;
  padding: 15px 44px 15px 46px;
  font: inherit; font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(0,135,194,.18);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  outline: none;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.search input::placeholder { color: #a6adc9; }
.search input:focus {
  border-color: var(--aqua-500);
  box-shadow: 0 0 0 4px rgba(0,173,239,.15), var(--shadow-2);
}
.search__ico {
  position: absolute; left: 16px; top: 50%;
  transform: translateY(-50%);
  width: 19px; height: 19px; color: var(--aqua-700);
  pointer-events: none;
}
.search__x {
  position: absolute; right: 9px; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: none; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--aqua-100); color: var(--aqua-900);
  font-size: 17px; line-height: 1; cursor: pointer;
}
.search.has-value .search__x { display: grid; }

/* =========================================================
   BÖLÜM BAŞLIKLARI
   ========================================================= */
.head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin: 30px 0 13px;
}
.head h2 {
  margin: 0; font-size: 1.18rem; font-weight: 800;
  letter-spacing: -0.02em; color: var(--ink);
}
.head span {
  font-size: .74rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* =========================================================
   ÖNE ÇIKANLAR — yatay şerit
   ========================================================= */
.rail {
  display: flex; gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 2px var(--gutter) 6px;
  margin-inline: calc(var(--gutter) * -1);
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }

.feat {
  flex: 0 0 62%;
  max-width: 230px;
  scroll-snap-align: start;
  border: 0; padding: 0;
  text-align: left;
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.feat:active { transform: scale(.975); }
.feat .ph { aspect-ratio: 4 / 3; }
.feat__body { display: block; padding: 11px 13px 13px; }
.feat__name {
  font-weight: 700; font-size: .97rem; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.5em;
}
.feat__price {
  display: block;
  margin-top: 6px; font-weight: 800; color: var(--aqua-700);
  font-variant-numeric: tabular-nums;
}
.feat__price small { font-size: .68em; opacity: .7; margin-left: 2px; }

/* =========================================================
   KATEGORİ IZGARASI
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 520px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

.cat {
  position: relative;
  display: block;
  border: 0; padding: 0;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  text-align: left;
  background: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  animation: pop .45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.cat:active { transform: scale(.97); }
.cat .ph { position: absolute; inset: 0; }

.cat__scrim {
  position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(to top, rgba(4,32,42,.82) 0%, rgba(4,32,42,.28) 46%, rgba(4,32,42,.05) 100%);
}
.cat__body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 12px 12px 11px;
  color: #fff;
}
.cat__name {
  display: block;
  font-weight: 800; font-size: 1rem; line-height: 1.16;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.cat__count {
  margin-top: 4px;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .66rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.28);
}
.cat__group {
  position: absolute; top: 10px; left: 10px; z-index: 4;
  padding: 4px 9px; border-radius: 999px;
  font-size: .62rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: #fff;
  background: rgba(4,32,42,.42);
  border: 1px solid rgba(255,255,255,.24);
}

@keyframes pop {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* =========================================================
   KATEGORİ SAYFASI
   ========================================================= */
.appbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(242,248,250,.9);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
.appbar__row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0;
}
.back {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: transform .2s var(--ease);
}
.back:active { transform: scale(.93); }
.back svg { width: 19px; height: 19px; }

.appbar__ico {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(150deg, var(--theme), color-mix(in srgb, var(--theme) 55%, #0b102e));
}
.appbar__ico svg { width: 21px; height: 21px; }

.appbar__txt { min-width: 0; }
.appbar__title {
  margin: 0; font-size: 1.06rem; font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appbar__meta { font-size: .72rem; color: var(--ink-soft); font-weight: 600; }

/* ürün kartı */
.prods { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

.prod {
  display: flex; align-items: stretch; gap: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  padding: 0;
  animation: pop .4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 28ms);
  transition: transform .2s var(--ease), box-shadow .25s var(--ease);
}
.prod:active { transform: scale(.985); }
.prod[hidden] { display: none; }

.prod .ph {
  flex: 0 0 106px;
  width: 106px;
  align-self: stretch;
  min-height: 106px;
}
.prod__body {
  flex: 1 1 auto; min-width: 0;
  padding: 12px 13px;
  display: flex; flex-direction: column; justify-content: center;
  gap: 3px;
}
.prod__name {
  font-weight: 700; font-size: 1.02rem; line-height: 1.22;
  letter-spacing: -0.01em;
}
.prod__name mark {
  background: rgba(255,200,60,.45); color: inherit;
  border-radius: 3px; padding: 0 1px;
}
.prod__desc {
  font-size: .84rem; color: var(--ink-soft); line-height: 1.32;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.prod__foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px;
}
.prod__price {
  font-weight: 800; font-size: 1.05rem; color: var(--aqua-700);
  font-variant-numeric: tabular-nums;
}
.prod__price small { font-size: .66em; opacity: .7; margin-left: 2px; }
.prod__price.is-empty { color: var(--ink-soft); font-weight: 600; }

.tag {
  display: inline-block;
  padding: 2px 8px; border-radius: 999px;
  font-size: .63rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--coral); background: var(--coral-soft);
}
.prod__cat {
  font-size: .66rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 1px;
}

/* not kutusu */
.note {
  display: flex; gap: 9px;
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: var(--coral-soft);
  border: 1px solid rgba(255,122,89,.2);
  color: #a8412a;
  font-size: .85rem; line-height: 1.38;
}
.note svg { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 1px; }

/* =========================================================
   ÜRÜN DETAY — alttan açılan panel
   ========================================================= */
.sheet-bg {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(4, 32, 42, .55);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease);
}
.sheet-bg.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  max-width: 620px; margin-inline: auto;
  background: var(--paper);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-3);
  transform: translateY(102%);
  transition: transform .38s var(--ease);
  max-height: 92vh; overflow-y: auto;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
.sheet.is-open { transform: none; }

.sheet__grab {
  position: sticky; top: 0; z-index: 3;
  padding: 9px 0 5px;
  display: grid; place-items: center;
  background: linear-gradient(to bottom, rgba(255,255,255,.95), rgba(255,255,255,0));
}
.sheet__grab i {
  width: 38px; height: 4px; border-radius: 99px;
  background: rgba(12,53,66,.18);
}
.sheet .ph {
  aspect-ratio: 16 / 10;
  margin: 0 16px;
  border-radius: var(--r-lg);
}
.sheet__body { padding: 16px 18px 6px; }
.sheet__cat {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--theme);
}
.sheet__name {
  margin: 5px 0 0;
  font-size: 1.42rem; font-weight: 800; letter-spacing: -0.025em;
  line-height: 1.12;
}
.sheet__desc {
  margin: 9px 0 0; color: var(--ink-2);
  font-size: .95rem; line-height: 1.5;
}
.sheet__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 18px;
  padding-top: 15px; border-top: 1px solid var(--line);
}
.sheet__price {
  font-size: 1.7rem; font-weight: 800; color: var(--aqua-700);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.sheet__price small { font-size: .5em; opacity: .7; margin-left: 3px; }
.sheet__close {
  border: 0; border-radius: 13px;
  padding: 13px 22px;
  font-weight: 700; color: #fff;
  background: linear-gradient(150deg, var(--aqua-500), var(--aqua-900));
  box-shadow: 0 10px 20px -12px rgba(11,92,116,.95);
  cursor: pointer;
}
.sheet__close:active { transform: scale(.97); }

/* =========================================================
   BOŞ SONUÇ
   ========================================================= */
.empty {
  display: none; text-align: center;
  padding: 52px 20px; color: var(--ink-soft);
}
.empty.is-visible { display: block; }
.empty svg { width: 44px; height: 44px; opacity: .32; margin: 0 auto 10px; }
.empty strong { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: 3px; }

/* =========================================================
   GÖRÜNÜMLER
   ========================================================= */
.view { display: none; }
.view.is-active { display: block; }

main { padding-bottom: 34px; min-height: 60vh; }

/* =========================================================
   FOOTER (Netro Spor kimliği)
   ========================================================= */
.footer {
  position: relative;
  margin-top: 34px;
  padding: 34px 0 38px;
  color: #eef1ff;
  background:
    radial-gradient(90% 130% at 50% 130%, var(--navy-3) 0%, rgba(35, 44, 110, 0) 62%),
    var(--navy);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.footer__logo {
  width: 118px;
  height: auto;
  opacity: .96;
}
.footer__name {
  margin: 16px 0 0;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
  color: #eef1ff;
}
.footer__sign {
  margin: 8px 0 0;
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 500;
  color: var(--brand-yellow);
  opacity: .9;
}
.footer__rule {
  width: 44px; height: 2px;
  margin: 18px 0 14px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-yellow));
}
.footer__meta {
  margin: 0;
  font-size: .68rem;
  letter-spacing: .04em;
  color: rgba(238, 241, 255, 0.4);
}

/* =========================================================
   YUKARI ÇIK
   ========================================================= */
.to-top {
  position: fixed; right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  color: #fff;
  background: linear-gradient(150deg, var(--aqua-500), var(--aqua-900));
  box-shadow: 0 10px 26px -8px rgba(6,48,61,.55);
  cursor: pointer;
  opacity: 0; transform: translateY(14px) scale(.85);
  pointer-events: none;
  transition: all .3s var(--ease);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 20px; height: 20px; }

/* =========================================================
   ERİŞİLEBİLİRLİK / TERCİHLER
   ========================================================= */
:where(button, a, input):focus-visible {
  outline: 3px solid var(--aqua-500);
  outline-offset: 2px;
}

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

@media print {
  .search, .to-top, .appbar, .sheet, .sheet-bg { display: none !important; }
  body { background: #fff; }
  .prod, .cat { break-inside: avoid; box-shadow: none; }
  .view { display: block !important; }
}
