/* sıcacıkk QR Menü — Sista tarzı layout, marka renkleri */

:root {
    --yellow: #ffc000;
    --yellow-bright: #ffd54a;
    --wheat: #c9952a;
    --ink: #f5f0e6;
    --muted: #a89f8c;
    --line: rgba(255, 192, 0, 0.16);
    --glass: rgba(255, 255, 255, 0.06);
    --glass-strong: rgba(255, 255, 255, 0.1);
    --radius: 18px;
    --radius-sm: 14px;
    --pill: 999px;
    --display: "Fredoka", "Nunito", system-ui, sans-serif;
    --sans: "Nunito", "Segoe UI", sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --safe-b: env(safe-area-inset-bottom, 0px);
}

body.theme-gece {
    --bg: #050505;
    --bg-2: #0d0d0d;
    --card: rgba(255, 255, 255, 0.06);
    --card-solid: #141414;
    --accent: #ffc000;
    --accent-ink: #0a0a0a;
    --chip: rgba(255, 255, 255, 0.08);
    --chip-active: #ffc000;
    --glow: rgba(255, 192, 0, 0.18);
}

body.theme-firin {
    --bg: #140c06;
    --bg-2: #1c1108;
    --card: rgba(255, 236, 210, 0.07);
    --card-solid: #24160c;
    --accent: #f0a01a;
    --accent-ink: #1a0e04;
    --yellow: #f0a01a;
    --ink: #fff4e4;
    --muted: #c4a882;
    --line: rgba(240, 160, 26, 0.2);
    --chip: rgba(255, 220, 170, 0.08);
    --chip-active: #f0a01a;
    --glow: rgba(240, 160, 26, 0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background 0.4s var(--ease), color 0.3s ease;
}

a { color: inherit; text-decoration: none; }

.site-header,
.site-main,
.site-footer,
.theme-switcher { position: relative; z-index: 1; }

/* Tema seçici — köşede küçük */
.theme-switcher {
    position: fixed;
    bottom: calc(14px + var(--safe-b));
    right: 14px;
    z-index: 40;
    display: flex;
    gap: 3px;
    padding: 3px;
    border-radius: var(--pill);
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.theme-btn {
    border: none;
    cursor: pointer;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 7px 10px;
    border-radius: var(--pill);
    background: transparent;
    color: var(--muted);
}

.theme-btn.is-active {
    background: var(--accent);
    color: var(--accent-ink);
}

/* —— Header (Sista tarzı) —— */
.site-header {
    padding: 18px 16px 8px;
}

.site-header-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.header-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}

.header-title {
    font-family: var(--display);
    font-size: clamp(1.55rem, 6vw, 1.9rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1.15;
}

.home-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: var(--pill);
    background: var(--glass-strong);
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    backdrop-filter: blur(8px);
}

.home-pill--logo {
    padding: 4px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
}

.header-logo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-hero {
    max-width: 720px;
    margin: 14px auto 4px;
    text-align: center;
    animation: fadeUp 0.6s var(--ease) both;
}

.brand-logo {
    max-height: 88px;
    width: auto;
    max-width: min(78vw, 280px);
    display: inline-block;
    filter: drop-shadow(0 0 24px var(--glow));
}

.site-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 16px 96px;
}

/* —— Arama + chip’ler —— */
.menu-toolbar { margin-bottom: 22px; }

.search-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    height: 48px;
    border-radius: var(--pill);
    background: var(--glass);
    border: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.search-icon { color: var(--muted); flex-shrink: 0; }

.search-field input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 600;
}

.search-field input::placeholder { color: var(--muted); font-weight: 500; }

.cat-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 2px 4px;
    margin: 0 -4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.cat-chips::-webkit-scrollbar { display: none; }

.cat-chip {
    flex-shrink: 0;
    border: 1px solid var(--line);
    background: var(--chip);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: var(--pill);
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s var(--ease);
}

.cat-chip.is-active {
    background: var(--chip-active);
    color: var(--accent-ink);
    border-color: var(--chip-active);
}

.cat-chip:hover:not(.is-active) {
    background: var(--glass-strong);
}

/* —— Bölüm başlıkları —— */
.section-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.category-heading {
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 560;
    color: var(--ink);
    margin: 22px 0 12px;
}

.category-block:first-of-type .category-heading { margin-top: 8px; }

.category-block.is-hidden,
.product-card.is-hidden,
.popular-section.is-hidden { display: none !important; }

/* —— Popüler yatay scroll —— */
.popular-section { margin-bottom: 28px; }

.popular-scroller {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 2px 2px 10px;
    margin: 0 -4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.popular-scroller::-webkit-scrollbar { display: none; }

.product-card--compact {
    flex: 0 0 148px;
    width: 148px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px;
}

.product-card--compact .product-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    flex: none;
    border-radius: 16px;
}

.product-card--compact .product-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-card--compact .product-name {
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card--compact .product-price {
    align-self: flex-start;
    font-size: 12px;
    padding: 3px 10px;
}

/* —— Ürün listesi (geniş kart) —— */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--line);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: transform 0.25s var(--ease), border-color 0.2s, background 0.2s;
}

.product-card:hover,
.product-card:focus-visible {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: var(--glass-strong);
    outline: none;
}

.product-thumb {
    flex: 0 0 92px;
    width: 92px;
    height: 92px;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
    background-color: var(--card-solid);
    border: 1px solid var(--line);
}

.product-info { flex: 1; min-width: 0; }

.product-name {
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 560;
    color: var(--ink);
    line-height: 1.25;
}

.product-cat {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.02em;
}

.product-desc {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 800;
    color: var(--accent-ink);
    background: var(--accent);
    padding: 4px 12px;
    border-radius: var(--pill);
}

/* —— Modal —— */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.modal.open { display: flex; }

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    animation: fade 0.25s ease;
}

.modal-dialog {
    position: relative;
    background: var(--card-solid);
    border-radius: 24px 24px 0 0;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-bottom: none;
    animation: slideUp 0.35s var(--ease);
}

@media (min-width: 520px) {
    .modal {
        align-items: center;
        padding: 20px;
    }
    .modal-dialog {
        border-radius: 22px;
        border-bottom: 1px solid var(--line);
        animation: pop 0.3s var(--ease);
    }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 2;
}

.modal-close:hover {
    background: var(--accent);
    color: var(--accent-ink);
}

.modal-image {
    background: #000;
    line-height: 0;
    overflow: hidden;
    border-radius: 22px 22px 0 0;
}

.modal-image img {
    display: block;
    width: 100%;
    max-height: 48vh;
    object-fit: contain;
}

.modal-body {
    padding: 20px 22px calc(28px + var(--safe-b));
    text-align: left;
}

.modal-name {
    font-family: var(--display);
    font-size: 1.5rem;
    font-weight: 560;
}

.modal-cat {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
}

.modal-desc {
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.modal-price {
    display: inline-block;
    margin-top: 18px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent-ink);
    background: var(--accent);
    padding: 8px 18px;
    border-radius: var(--pill);
}

/* —— Footer —— */
.site-footer {
    text-align: center;
    padding: 28px 20px calc(72px + var(--safe-b));
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.footer-brand {
    font-family: var(--display);
    font-size: 1.2rem;
    font-weight: 560;
    color: var(--accent);
    margin-bottom: 4px;
}

.footer-credit { margin-top: 12px; font-size: 12px; }
.footer-credit a { color: var(--accent); font-weight: 700; }

.empty-public {
    text-align: center;
    color: var(--muted);
    padding: 40px 16px;
    font-size: 15px;
}

/* —— Popup —— */
body.menu-popup-open,
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.menu-popup {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    flex-direction: column;
}

.menu-popup.open { display: flex; }

.menu-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.menu-popup-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.menu-popup-image-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.menu-popup-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.menu-popup-actions {
    display: flex;
    gap: 12px;
    padding: 16px 20px calc(16px + var(--safe-b));
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 70%, transparent);
}

.menu-popup-btn {
    flex: 1;
    padding: 14px;
    border-radius: var(--pill);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: #fff;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.menu-popup-btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: none; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(36px); }
    to { opacity: 1; transform: none; }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
    .menu-popup-actions { flex-direction: column; }
}

@media (min-width: 680px) {
    .product-thumb { flex-basis: 108px; width: 108px; height: 108px; }
    .product-card--compact { flex-basis: 168px; width: 168px; }
    .brand-logo { max-height: 104px; }
}
