/* Menu + QR table experience */

.menu-page {
    --menu-ink: var(--brand-ink, #171627);
    --menu-yellow: var(--brand-yellow, #f5a800);
    --menu-red: var(--brand-red, #db0c1f);
    --menu-cream: #fff8e6;
    --menu-sticky-top: 0px;
}

.menu-page--web {
    --menu-sticky-top: 72px;
}

.menu-page--qr {
    --menu-sticky-top: 0px;
}

/* —— QR shell —— */
.menu-qr-body {
    padding-bottom: env(safe-area-inset-bottom);
}

.menu-qr-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 3.25rem;
    padding: 0.55rem 1rem;
    padding-top: calc(0.55rem + env(safe-area-inset-top));
    background: #fff;
    border-bottom: 1px solid rgba(23, 22, 39, 0.08);
}

.menu-qr-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: var(--menu-ink);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.menu-qr-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.4rem;
    background: var(--menu-yellow);
    color: var(--menu-ink);
    font-size: 0.75rem;
}

.menu-qr-langs {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.15rem;
    border-radius: 9999px;
    background: #f3f4f6;
}

.menu-qr-lang {
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.55rem;
    border-radius: 9999px;
    cursor: pointer;
    min-width: 2.4rem;
}

.menu-qr-lang.is-active {
    background: #fff;
    color: var(--menu-ink);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.menu-qr-main {
    min-height: calc(100vh - 3.5rem);
}

.menu-qr-context {
    padding: 0.85rem 1rem 0.35rem;
    background: var(--menu-cream);
    border-bottom: 1px solid rgba(23, 22, 39, 0.06);
}

.menu-qr-context__row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.85rem;
    margin-bottom: 0.5rem;
}

.menu-qr-context__branch {
    font-size: 1rem;
    color: var(--menu-ink);
}

.menu-qr-context__table {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #6b7280;
}

.menu-qr-context__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.menu-qr-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.7rem;
    border-radius: 9999px;
    background: #fff;
    color: var(--menu-ink);
    border: 1px solid rgba(23, 22, 39, 0.1);
    text-decoration: none;
}

.menu-qr-chip--action {
    background: var(--menu-ink);
    color: #fff;
    border-color: var(--menu-ink);
}

/* —— Menu Hero: wide Hot Taco banner —— */
.menu-hero {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    display: flex;
    align-items: flex-end;
}

.menu-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.menu-hero__overlay {
    position: absolute;
    inset: 0;
    /* Sol taraf metin okunabilirliği için koyu degrade, sağ taraf görseli açık bırakır */
    background: linear-gradient(
        to right,
        rgba(23, 22, 39, 0.88) 0%,
        rgba(23, 22, 39, 0.65) 35%,
        rgba(23, 22, 39, 0.15) 60%,
        rgba(23, 22, 39, 0.05) 100%
    );
}

.menu-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 80rem;
    margin-inline: auto;
    padding: 1.5rem 1rem 1.75rem;
}

@media (min-width: 640px) {
    .menu-hero__inner { padding: 2rem 1.5rem 2rem; }
}
@media (min-width: 1024px) {
    .menu-hero__inner { padding: 2.5rem 2rem 2.25rem; }
}

/* Breadcrumb */
.menu-hero__breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}
.menu-hero__breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}
.menu-hero__breadcrumb a:hover { color: var(--menu-yellow, #f5a800); }
.menu-hero__breadcrumb li[aria-current] {
    color: var(--menu-yellow, #f5a800);
    font-weight: 700;
}
.menu-hero__breadcrumb i.fa-chevron-right { font-size: 8px; }

/* Title */
.menu-hero__title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900;
    line-height: 1.1;
    color: #fff;
    letter-spacing: -0.02em;
}

/* Subtitle */
.menu-hero__subtitle {
    margin: 0 0 1rem;
    max-width: 32rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}

/* Hero search */
.menu-hero__search {
    position: relative;
    max-width: 420px;
}
.menu-hero__search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
    pointer-events: none;
}
.menu-hero__search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.4rem;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.menu-hero__search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}
.menu-hero__search-input:focus {
    border-color: var(--menu-yellow, #f5a800);
    background: rgba(255, 255, 255, 0.15);
}

/* Bottom fade into page */
.menu-hero__fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--menu-yellow, #f5a800) 0%, var(--menu-red, #db0c1f) 50%, var(--menu-yellow, #f5a800) 100%);
    z-index: 3;
}

/* —— Shared content rail (header / hero / ürün aynı sol-sağ hiza) —— */
.menu-container {
    width: 100%;
    max-width: 80rem; /* Tailwind max-w-7xl */
    margin-inline: auto;
    padding-inline: 1rem; /* px-4 */
}

@media (min-width: 640px) {
    .menu-container {
        padding-inline: 1.5rem; /* sm:px-6 */
    }
}

@media (min-width: 1024px) {
    .menu-container {
        padding-inline: 2rem; /* lg:px-8 */
    }
}

/* —— Shell —— */
.menu-shell {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1rem 1rem 3rem;
}

@media (min-width: 640px) {
    .menu-shell {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .menu-shell {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.menu-page--qr .menu-shell {
    padding-top: 0.75rem;
    padding-bottom: 4rem;
}

.menu-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: stretch;
    margin-bottom: 0.75rem;
}

.menu-search {
    position: relative;
    flex: 1 1 14rem;
}

.menu-search i {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.menu-search input {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 9999px;
    background: #fff;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    font-size: 0.9375rem;
    color: var(--menu-ink);
}

.menu-search input:focus {
    outline: none;
    border-color: var(--menu-yellow);
    box-shadow: 0 0 0 3px rgba(245, 168, 0, 0.2);
}

.menu-sort {
    flex: 0 0 auto;
}

.menu-sort summary {
    list-style: none;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.8rem 1rem;
    border-radius: 9999px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: var(--menu-ink);
}

.menu-sort summary::-webkit-details-marker {
    display: none;
}

.menu-sort[open] summary {
    border-color: var(--menu-yellow);
}

.menu-sort select {
    display: block;
    margin-top: 0.5rem;
    width: 100%;
    min-width: 11rem;
    border-radius: 0.75rem;
    border: 1.5px solid #e5e7eb;
    padding: 0.55rem 0.75rem;
    background: #fff;
    font-size: 0.875rem;
}

/* —— Sticky categories —— */
.menu-cats {
    position: sticky;
    top: var(--menu-sticky-top);
    z-index: 25;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0.65rem 0;
    margin: 0 -0.25rem 1rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    background: rgba(249, 250, 251, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(23, 22, 39, 0.06);
}

.menu-page--qr .menu-cats {
    top: 0;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    background: rgba(255, 255, 255, 0.94);
}

.menu-cats::-webkit-scrollbar {
    display: none;
}

.menu-cat {
    flex: 0 0 auto;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.55rem 0.95rem;
    border-radius: 9999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.menu-cat.is-active {
    background: var(--menu-ink);
    border-color: var(--menu-ink);
    color: #fff;
}

.menu-cat:focus-visible {
    outline: 2px solid var(--menu-yellow);
    outline-offset: 2px;
}

/* —— Featured —— */
.menu-featured {
    margin-bottom: 1.5rem;
}

.menu-featured__title {
    margin: 0 0 0.65rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

.menu-featured__track {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
}

.menu-featured__track::-webkit-scrollbar {
    display: none;
}

.menu-featured__card {
    flex: 0 0 7.5rem;
    border: none;
    background: transparent;
    padding: 0;
    text-align: left;
    cursor: pointer;
}

.menu-featured__card img {
    width: 7.5rem;
    height: 7.5rem;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.65rem;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    padding: 4px;
    display: block;
}

.menu-featured__name {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--menu-ink);
    line-height: 1.25;
}

.menu-featured__price {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--menu-red);
}

/* —— Product list —— */
.menu-section {
    margin-bottom: 1rem;
    scroll-margin-top: calc(var(--menu-sticky-top) + 3.5rem);
    background: #fff;
    border-radius: 1rem;
    border: 1px solid rgba(23, 22, 39, 0.06);
    box-shadow: 0 1px 3px rgba(23, 22, 39, 0.04);
    padding: 1rem;
}

.menu-section.is-hidden {
    display: none;
}

.menu-section__title {
    margin: 0 0 0.85rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--menu-ink);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.7rem;
    border-bottom: 2px solid var(--menu-yellow);
}

.menu-section__title i {
    color: var(--menu-yellow);
    font-size: 0.9rem;
}

.menu-section__count {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    white-space: nowrap;
}

.menu-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

@media (min-width: 768px) {
    .menu-page--web .menu-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.85rem;
    }
}

.menu-item {
    display: grid;
    grid-template-columns: 8rem 1fr auto;
    gap: 0.85rem;
    align-items: center;
    width: 100%;
    text-align: left;
    border: none;
    background: #fff;
    border-radius: 0.85rem;
    padding: 0.65rem;
    box-shadow: 0 1px 2px rgba(23, 22, 39, 0.04);
    border: 1px solid rgba(23, 22, 39, 0.06);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

@media (min-width: 480px) {
    .menu-item {
        grid-template-columns: 9.5rem 1fr auto;
    }
}

.menu-item:hover,
.menu-item:focus-visible {
    border-color: rgba(245, 168, 0, 0.65);
    box-shadow: 0 4px 12px rgba(23, 22, 39, 0.08);
    outline: none;
}

.menu-item__media {
    width: 8rem;
    height: 6rem;
    border-radius: 0.65rem;
    overflow: hidden;
    background: #ffffff !important;
    border: 1px solid #f1f5f9;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    padding: 2px;
}

@media (min-width: 480px) {
    .menu-item__media {
        width: 9.5rem;
        height: 7rem;
    }
}

.menu-item__media img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin: auto !important;
    transition: transform 0.3s ease;
}

.menu-item:hover .menu-item__media img {
    transform: scale(1.04);
}

.menu-item__name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--menu-ink);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-item__allergen {
    margin: 0.3rem 0 0;
    font-size: 0.7rem;
    font-weight: 600;
    color: #b45309;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-item__price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--menu-red);
    white-space: nowrap;
    align-self: start;
    padding-top: 0.15rem;
}

.menu-item__price span {
    font-size: 0.75rem;
    font-weight: 700;
}

.menu-empty {
    margin: 0;
    padding: 1.5rem;
    text-align: center;
    color: #6b7280;
    background: #fff;
    border-radius: 0.85rem;
    border: 1px dashed #d1d5db;
}

/* —— Sheet —— */
.menu-sheet[hidden] {
    display: none !important;
}

.menu-sheet {
    position: fixed;
    inset: 0;
    z-index: 60;
}

.menu-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(23, 22, 39, 0.45);
}

.menu-sheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(88vh, 640px);
    overflow: auto;
    background: #fff;
    border-radius: 1.15rem 1.15rem 0 0;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.28s ease;
}

.menu-sheet.is-open .menu-sheet__panel {
    transform: translateY(0);
}

.menu-sheet__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--menu-ink);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.menu-sheet__media {
    aspect-ratio: 16 / 10;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.menu-sheet__media img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
    margin: auto;
}

.menu-sheet__content {
    padding: 1rem 1.15rem 0.5rem;
}

.menu-sheet__title {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--menu-ink);
    letter-spacing: -0.02em;
}

.menu-sheet__price {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--menu-red);
}

.menu-sheet__desc {
    margin: 0 0 0.85rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #4b5563;
}

.menu-sheet__desc:empty,
.menu-sheet__meta:empty {
    display: none;
}

.menu-sheet__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.menu-sheet__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.65rem;
    border-radius: 9999px;
    background: #fff7ed;
    color: #9a3412;
}

.menu-sheet__chip--kcal {
    background: #eff6ff;
    color: #1d4ed8;
}

.menu-sheet__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

@media (min-width: 420px) {
    .menu-sheet__actions {
        flex-direction: row;
    }
}

.menu-sheet__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex: 1;
    min-height: 2.85rem;
    border-radius: var(--radius-sm, 0.375rem);
    background: var(--menu-yellow);
    color: var(--menu-ink);
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.9375rem;
    padding: 0.65rem 1rem;
}

.menu-sheet__cta--secondary {
    background: #fff;
    color: var(--menu-ink);
    border-color: #d1d5db;
}

.menu-sheet__cta--order {
    background: var(--brand-red, #db0c1f);
    color: #fff;
    border-color: var(--brand-red, #db0c1f);
}

.menu-sheet__cta--order:hover {
    background: var(--brand-red-dark, #b40a1a);
    color: #fff;
}

.menu-sheet__cta--ghost {
    background: #f3f4f6;
    color: var(--menu-ink);
}

body.menu-sheet-open {
    overflow: hidden;
}

@media (min-width: 768px) {
    .menu-item {
        grid-template-columns: 11rem 1fr auto;
        padding: 0.75rem;
    }

    .menu-item__media {
        width: 11rem;
        height: 8rem;
    }

    .menu-sheet__panel {
        left: 50%;
        right: auto;
        bottom: auto;
        top: 50%;
        width: min(28rem, calc(100vw - 2rem));
        max-height: min(85vh, 720px);
        border-radius: 1rem;
        transform: translate(-50%, -46%) scale(0.96);
        opacity: 0;
        transition: transform 0.22s ease, opacity 0.22s ease;
    }

    .menu-sheet.is-open .menu-sheet__panel {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .menu-sheet__panel,
    .menu-cat,
    .menu-item {
        transition: none;
    }
}
