/* QRMenu — müşteri menüsü (bağımsız, mobil öncelikli) */
:root {
	--bg: #f6f3ee;
	--card: #ffffff;
	--text: #1e1c19;
	--muted: #6f6a62;
	--accent: #c8102e;
	--accent-dark: #a30c25;
	--soft: #fbe9ec;
	--border: #e8e2d9;
	--radius: 16px;
	--font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--display: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }

/* ---------- Kapak ---------- */
.cover { position: relative; min-height: 230px; background: #2a2622 url('../img/demo-foto.jpg') center / cover no-repeat; color: #fff; display: flex; align-items: flex-end; }
.cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.74) 100%); }
.cover .inner { position: relative; width: 100%; max-width: 1100px; margin: 0 auto; padding: 60px 20px 22px; display: flex; align-items: flex-end; gap: 16px; }
.cover .logo { width: 76px; height: 76px; border-radius: 18px; background: #fff; padding: 6px; object-fit: contain; box-shadow: 0 8px 24px rgba(0,0,0,.35); flex: 0 0 auto; }
.cover .avatar { width: 76px; height: 76px; border-radius: 18px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 36px; font-weight: 700; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.35); flex: 0 0 auto; }
.cover h1 { font-family: var(--display); font-size: clamp(26px, 6.2vw, 42px); line-height: 1.08; margin: 0 0 8px; font-weight: 700; text-shadow: 0 2px 14px rgba(0,0,0,.45); overflow-wrap: anywhere; }
.cover .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; letter-spacing: .3px; color: rgba(255,255,255,.85); }
.cover .meta span::before { content: "•"; margin-right: 8px; opacity: .6; }
.cover .meta span:first-child::before { content: none; }
.admin-link { position: absolute; top: 14px; right: 14px; z-index: 2; font-size: 12px; font-weight: 500; color: rgba(255,255,255,.85); background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 6px 12px; backdrop-filter: blur(6px); }
.admin-link:hover { background: rgba(0,0,0,.55); color: #fff; }

/* ---------- Yapışkan kategori çubuğu ---------- */
.catbar { position: sticky; top: 0; z-index: 50; background: rgba(246,243,238,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.catbar .inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.pills { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; flex: 1 1 auto; padding: 2px; scroll-snap-type: x proximity; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: 0 0 auto; scroll-snap-align: start; border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s, opacity .2s; }
.pill:hover { border-color: #cfc7bb; }
.pill.active { background: var(--text); color: #fff; border-color: var(--text); }
.pill.dim { opacity: .35; }
.icon-btn { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s; }
.icon-btn:hover, .icon-btn.on { background: var(--text); color: #fff; border-color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.searchbox { max-width: 1100px; margin: 0 auto; padding: 0 12px 10px; display: none; }
.catbar.searching .searchbox { display: block; }
.searchbox input { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; font-size: 16px; background: #fff; color: var(--text); outline: none; }
.searchbox input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--soft); }

@media (min-width: 768px) {
	.pills { flex-wrap: wrap; justify-content: center; overflow: visible; }
}

/* ---------- Bölümler ve ürünler ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 6px 12px 70px; }
.cat { scroll-margin-top: 74px; padding-top: 18px; }
.cat h2 { font-family: var(--display); font-size: 25px; font-weight: 700; margin: 10px 4px 12px; display: flex; align-items: baseline; gap: 10px; }
.cat h2 small { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 500; }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.item { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; cursor: pointer; transition: transform .15s, box-shadow .15s; align-items: stretch; outline: none; }
.item:hover, .item:focus-visible { box-shadow: 0 10px 26px rgba(30,28,25,.08); transform: translateY(-1px); border-color: #ddd5c9; }
.item .body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.item p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .price { margin-top: auto; padding-top: 6px; font-weight: 700; color: var(--accent); font-size: 15px; }
.item .thumb { flex: 0 0 96px; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: #f0ebe3; }
.item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.item .thumb.empty { display: flex; align-items: center; justify-content: center; color: #cfc6b8; }
.item .thumb.empty svg { width: 30px; height: 30px; }
.item.hidden, .cat.hidden { display: none; }
.empty { text-align: center; color: var(--muted); padding: 36px 12px; font-size: 15px; }
.cat .empty { padding: 14px 4px; text-align: left; font-size: 14px; }

/* ---------- Ürün detay penceresi ---------- */
dialog.detail { border: 0; border-radius: 22px; padding: 0; max-width: 520px; width: calc(100% - 24px); box-shadow: 0 24px 70px rgba(0,0,0,.35); overflow: hidden; background: #fff; color: var(--text); }
dialog.detail::backdrop { background: rgba(20,16,12,.55); backdrop-filter: blur(3px); }
.detail img { width: 100%; max-height: 340px; object-fit: cover; }
.detail .content { padding: 18px 20px 24px; }
.detail h3 { font-family: var(--display); font-size: 25px; margin: 0 0 8px; }
.detail p { color: var(--muted); line-height: 1.6; margin: 0 0 14px; white-space: pre-line; }
.detail .price { font-size: 22px; font-weight: 700; color: var(--accent); }
.detail .close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--text); cursor: pointer; font-size: 22px; line-height: 1; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
@media (max-width: 600px) {
	dialog.detail { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 22px 22px 0 0; max-height: 90vh; }
}

/* ---------- Yukarı çık ---------- */
.totop { position: fixed; right: 16px; bottom: 18px; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; border: 0; box-shadow: 0 10px 24px rgba(200,16,46,.35); display: none; align-items: center; justify-content: center; cursor: pointer; z-index: 40; }
.totop.show { display: flex; }
.totop svg { width: 20px; height: 20px; }

/* ---------- Alt bilgi ---------- */
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 22px 12px 30px; border-top: 1px solid var(--border); }
footer a { color: var(--accent); font-weight: 600; }

/* ---------- Hata sayfası ---------- */
.errorpage { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.errorpage .code { font-family: var(--display); font-size: 96px; font-weight: 700; color: var(--accent); line-height: 1; }
.errorpage h1 { font-size: 22px; margin: 10px 0 6px; }
.errorpage p { color: var(--muted); margin: 0; }
