/* ==========================================================================
   Doğal Izgara - Luxury Black & Blood Burgundy Theme (Menu CSS)
   ========================================================================== */

:root {
    --navy: #330005;          /* تغییر یافته به زرشکی بسیار تیره */
    --navy-deep: #000000;     /* تغییر یافته به مشکی مطلق */
    --navy-card: #0c0002;     /* تغییر یافته به مشکی-زرشکی کارت‌ها */
    --navy-soft: #5c000a;     /* تغییر یافته به زرشکی خونین */
    --zereshki: #8c0010;      /* قرمز زرشکی باوقار برای حاشیه‌ها */
    --gold: #d4af37;          /* طلایی لوکس کلاسیک */
    --gold-light: #f5d37a;    /* طلایی روشن و درخشان */
    --cream: #fff8e9;         /* کرم برای عناوین */
    --text: #fcedea;          /* کرم-سفید برای خوانایی عالی متن‌ها */
    --muted: rgba(255, 250, 240, 0.65);
    --line: rgba(140, 0, 16, 0.45); /* خطوط جداکننده با هاله زرشکی */
    --sans: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --serif: Georgia, "Times New Roman", serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* پس‌زمینه کل صفحه: گرادیان محو زرشکی از بالا به مشکی مطلق در پایین (جهت درخشش آتش) */
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--sans);
    background-color: #000000;
    background: radial-gradient(circle at 50% -10%, rgba(92, 0, 16, 0.45), transparent 40%),
                linear-gradient(180deg, #0c0002 0%, #050001 45%, #000000 100%);
}

body:before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.04;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 42px 42px;
}

.menu-page {
    position: relative;
    width: min(1440px, calc(100% - 40px));
    margin: auto;
    padding: 10px 0 72px;
}

/* --- هدر و لوگو --- */
.brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 280px;
    padding: 28px 18px 18px;
}

.brand-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.brand-trigger img {
    display: block;
    width: min(620px, 76vw);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(140, 0, 16, 0.4));
}

.brand-header p {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--cream);
}

.brand-header p:after {
    content: "";
    display: block;
    width: 80px;
    height: 1px;
    margin: 12px auto 0;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* --- نوار تب‌های چسبنده (Sticky Navigation) --- */
.sticky {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 6px 0 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.95), rgba(12, 0, 2, 0.88) 75%, transparent);
    backdrop-filter: blur(14px);
}

.tabs {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(8, 0, 1, 0.85);
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    flex: 1 0 auto;
    min-width: 118px;
    padding: 12px 17px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    color: rgba(255, 248, 233, 0.88);
    background: rgba(30, 0, 5, 0.85);
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 750;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.tab:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    background: rgba(50, 0, 8, 0.9);
}

/* تب فعال: پس‌زمینه زرشکی-خونین با حاشیه طلایی و نور درخشان */
.tab.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--zereshki), var(--navy));
    border: 1px solid var(--gold);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.tab-chef {
    min-width: 145px;
}

/* --- بخش دسته‌بندی‌ها و کارت‌های غذا --- */
.content {
    display: grid;
    gap: 44px;
}

.category {
    scroll-margin-top: 110px;
}

.category-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 0 4px 18px;
}

.category-title h2 {
    margin: 0;
    color: var(--cream);
    font-family: var(--serif);
    font-size: clamp(30px, 3vw, 44px);
    line-height: 1;
    letter-spacing: -0.035em;
}

.category-title .eyebrow {
    display: none;
}

.category-title i {
    display: block;
    width: 130px;
    height: 1px;
    margin-top: 13px;
    background: linear-gradient(90deg, var(--gold), transparent);
}

.category-title i:after {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    margin-left: 48px;
    border-radius: 50%;
    background: var(--gold-light);
    transform: translateY(-2px);
}

.category-title > span {
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    background: rgba(20, 0, 3, 0.6);
}

.items {
    display: grid;
    gap: 12px;
}

.chef-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

/* کارت غذا: پس‌زمینه مشکی/زرشکی فوق‌العاده تیره با حاشیه باوقار */
.item-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 128px;
    gap: 22px;
    align-items: center;
    min-height: 118px;
    padding: 10px 18px 10px 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(100deg, rgba(20, 0, 3, 0.92), rgba(8, 0, 1, 0.96));
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    transition: all 0.25s ease;
}

.item-card:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
    box-shadow: 0 16px 35px rgba(140, 0, 16, 0.4), 0 0 15px rgba(212, 175, 55, 0.15);
}

.item-image {
    position: relative;
    width: 190px;
    height: 100px;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(145deg, #3b000a, #140003); /* حاشیه تصویر زرشکی تیره */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.item-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.9) contrast(1.08) brightness(0.95);
    transition: transform 0.4s ease;
}

.item-card:hover .item-image img {
    transform: scale(1.05);
}

.image-fallback {
    display: none;
    position: absolute;
    inset: 0;
    place-items: center;
    color: var(--gold-light);
    font-size: 21px;
    font-weight: 900;
}

.empty-image .image-fallback {
    display: grid;
}

.item-info {
    min-width: 0;
}

.item-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.item-info h3 {
    margin: 0;
    color: var(--cream);
    font-family: var(--serif);
    font-size: clamp(20px, 1.55vw, 26px);
    font-weight: 650;
    line-height: 1.1;
    letter-spacing: -0.018em;
}

.item-info em {
    padding: 3px 8px;
    border: 1px solid var(--gold);
    background: rgba(212, 175, 55, 0.1);
    border-radius: 999px;
    color: var(--gold-light);
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
}

.item-ingredients {
    margin: 8px 0 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.5;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}

.item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 248, 233, 0.9);
    font-size: 12.5px;
    font-weight: 700;
}

.item-meta span + span {
    padding-left: 14px;
    border-left: 1px solid rgba(214, 161, 59, 0.34);
}

.item-meta svg {
    width: 15px;
    height: 15px;
    fill: var(--gold-light);
}

.item-price {
    text-align: right;
}

.item-price strong {
    color: var(--gold-light);
    font-family: var(--serif);
    font-size: clamp(28px, 2.5vw, 39px);
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.item-price .ask {
    font-size: 17px;
    color: var(--muted);
}

.item-card--chef {
    grid-template-columns: 145px minmax(0, 1fr) 105px;
    min-height: 105px;
}

.item-card--chef .item-image {
    width: 145px;
    height: 88px;
}

.item-card--chef .item-info h3 {
    font-size: 24px;
}

.item-card--chef .item-price strong {
    font-size: 31px;
}

.empty {
    padding: 24px;
    border: 1px dashed var(--line);
    border-radius: 16px;
    color: var(--muted);
    text-align: center;
    background: rgba(12, 0, 2, 0.5);
}

/* --- انیمیشن‌های ورود اسکرول (Scroll Reveal) --- */
[data-menu-item] {
    opacity: 1;
    transform: none;
}

html.menu-motion-ready [data-menu-item] {
    opacity: 0;
    transform: perspective(1100px) translate3d(64px, 14px, 0) rotateY(-5deg) scale(0.985);
    transform-origin: right center;
    transition: opacity 0.52s ease, transform 0.72s cubic-bezier(0.2, 0.78, 0.18, 1), box-shadow 0.28s ease, border-color 0.28s ease;
    will-change: opacity, transform;
}

html.menu-motion-ready [data-menu-item].is-visible {
    opacity: 1;
    transform: perspective(1100px) translate3d(0, 0, 0) rotateY(0) scale(1);
}

@media (hover: hover) {
    html.menu-motion-ready [data-menu-item].is-visible:hover {
        transform: perspective(1100px) translate3d(0, -3px, 0) rotateX(0.7deg) scale(1.004);
    }
}

@media (prefers-reduced-motion: reduce) {
    html.menu-motion-ready [data-menu-item], [data-menu-item] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* --- فوتر بهینه‌سازی شده (یکپارچه با تم زرشکی-طلایی) --- */
.menu-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 60px;
    padding: 30px 12px 20px;
    border-top: 1px solid rgba(140, 0, 16, 0.4);
    text-align: center;
}

.menu-notes {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 850px;
    margin: 0 auto;
}

.kdv-note {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    margin: 0 0 14px 0;
    padding: 12px 24px 12px 30px;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(40, 0, 5, 0.95), rgba(12, 0, 2, 0.95));
    color: var(--gold-light);
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.kdv-note::before {
    content: "";
    position: absolute;
    left: 14px;
    width: 5px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    box-shadow: 0 0 12px rgba(244, 198, 93, 0.5);
}

.calorie-note {
    margin: 0;
    max-width: 760px;
    color: rgba(255, 248, 233, 0.55);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.site-credit {
    width: 100%;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    line-height: 1.7;
}

.site-credit a {
    color: var(--gold);
    font-weight: 750;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-credit a:hover {
    color: var(--gold-light);
    text-decoration: underline;
}

/* ==========================================================================
   مدیا کوئری‌ها (ریسپانسیو برای موبایل و تبلت)
   ========================================================================== */

@media (min-width: 1200px) {
    .menu-page {
        width: min(1540px, calc(100% - 56px));
    }
    .brand-header {
        min-height: 310px;
        padding-top: 34px;
    }
    .brand-trigger img {
        width: min(700px, 62vw);
    }
}

@media (max-width: 1050px) {
    .menu-page {
        width: min(100% - 24px, 900px);
    }
    .item-card, .item-card--chef {
        grid-template-columns: 155px minmax(0, 1fr) 110px;
    }
    .item-image, .item-card--chef .item-image {
        width: 155px;
        height: 94px;
    }
    .chef-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    body {
        background-attachment: scroll;
    }
    .menu-page {
        width: 100%;
        padding: 6px 10px 50px;
        overflow-x: hidden;
    }
    .brand-header {
        min-height: 190px;
        padding: 16px 8px 10px;
        gap: 10px;
    }
    .brand-trigger img {
        width: min(380px, 88vw);
        max-height: 130px;
    }
    .brand-header p {
        font-size: 12px;
        letter-spacing: 0.22em;
    }
    .sticky {
        padding: 6px 0 13px;
    }
    .tabs {
        border-radius: 17px;
        padding: 6px;
    }
    .tab {
        flex: 0 0 auto;
        min-width: 132px;
        padding: 11px 15px;
        border-radius: 12px;
        font-size: 14px;
    }
    .content {
        gap: 34px;
    }
    .category {
        scroll-margin-top: 100px;
    }
    .category-title {
        align-items: center;
        margin-bottom: 14px;
    }
    .category-title h2 {
        font-size: 30px;
    }
    .category-title > span {
        display: none;
    }
    .category-title i {
        width: 110px;
    }
    .items, .chef-grid {
        gap: 12px;
    }
    
    /* چینش کارت‌ها در موبایل */
    .item-card, .item-card--chef {
        position: relative;
        grid-template-columns: 100px minmax(0, 1fr);
        grid-template-areas: "image info" "image meta";
        gap: 6px 14px;
        min-height: 125px;
        padding: 12px 78px 12px 12px;
        border-radius: 17px;
    }
    .item-image, .item-card--chef .item-image {
        grid-area: image;
        width: 100px;
        height: 100px;
        border-radius: 13px;
        align-self: center;
    }
    .item-info {
        grid-area: info;
        align-self: center;
    }
    .item-info h3, .item-card--chef .item-info h3 {
        font-size: 19.5px;
        line-height: 1.1;
    }
    .item-ingredients {
        display: block;
        overflow: visible;
        margin-top: 6px;
        font-size: 13.5px;
        line-height: 1.4;
        -webkit-line-clamp: unset;
    }
    .item-meta {
        gap: 10px;
        margin-top: 8px;
        flex-wrap: wrap;
    }
    .item-meta span {
        font-size: 11.5px;
    }
    .item-price {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
    }
    .item-price strong, .item-card--chef .item-price strong {
        font-size: 23px;
    }
    
    html.menu-motion-ready [data-menu-item] {
        transform: perspective(760px) translate3d(28px, 8px, 0) rotateY(-2deg);
    }
    
    .menu-footer {
        margin-top: 40px;
        padding-top: 24px;
    }
    .kdv-note {
        min-height: 44px;
        padding: 10px 18px 10px 24px;
        border-radius: 14px;
        font-size: 12px;
    }
    .kdv-note::before {
        left: 12px;
        height: 20px;
        width: 4px;
    }
}

@media (max-width: 430px) {
    .brand-header {
        min-height: 170px;
    }
    .brand-trigger img {
        width: min(330px, 92vw);
        max-height: 115px;
    }
    .category-title h2 {
        font-size: 27px;
    }
    .item-card, .item-card--chef {
        grid-template-columns: 88px minmax(0, 1fr);
        padding: 10px 68px 10px 10px;
        min-height: 118px;
    }
    .item-image, .item-card--chef .item-image {
        width: 88px;
        height: 88px;
    }
    .item-info h3, .item-card--chef .item-info h3 {
        font-size: 18px;
    }
    .item-ingredients {
        font-size: 12.8px;
    }
    .item-price strong, .item-card--chef .item-price strong {
        font-size: 21px;
    }
}