﻿@import url('font/font.css');





/* =========================================
   1. دکمه تماس ثابت صفحه 
   ========================================= */
/* تعریف کلاس‌های اصلی FAB */
.ion-fab {
    position: fixed;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 20px;
    transition: transform 0.1s ease;
    /* شبیه کلاس hydrated */
}

/* موقعیت‌های مختلف */
.fab-vertical-bottom {
    bottom: 0;
}

.fab-horizontal-end {
    left: 0;
}

.fab-vertical-top {
    top: 0;
}

.fab-horizontal-start {
    left: 0;
}

/* دکمه FAB اصلی */
.ion-fab-button {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #37250e; /* رنگ آبی Ionic پیش‌فرض */
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0px 35px 10px rgb(255 255 255 / 80%); /* سایه Ionic */
    transition: all 0.2s ease;
    font-size: 24px;
    outline: none;
    /* شبیه کلاس hydrated و ion-focusable */
}

/* آیکون داخل دکمه */
.icon-call {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .icon-call i {
        font-size: 24px;
    }

/* افکت هاور و فعال (شبیه ion-activatable) */
.ion-fab-button:hover {
    color: lemonchiffon;
    box-shadow: 0 6px 16px 0 rgba(56, 128, 255, 0.5);
    transform: scale(1.1);
}

.ion-fab-button:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px 0 rgba(56, 128, 255, 0.3);
}

/* شبیه کلاس fab-btn */
.fab-btn {
    /* هیچ چیز خاصی اضافه نمی‌کنه، فقط برای تطابق */
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .ion-fab-button {
        width: 48px;
        height: 48px;
    }

    .icon-call,
    .icon-call i {
        width: 20px;
        height: 20px;
        font-size: 20px;
    }
}



/* =========================================
   1. تنظیمات عمومی و متغیرها
   ========================================= */
:root {
    --primary-color: #6F4E37; /* قهوه‌ای کافه */
    --secondary-color: #2C2C2C; /* تیره */
    --accent-color: #D4A373; /* طلایی/کرم */
    --bg-color: #F8F5F2;
    --card-bg: #FFFFFF;
    --text-color: #333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: 'OpenSans', OpenSans; /* اطمینان از نام دقیق فونت */
    background-color: #AB9682;
    color: var(--text-color);
    padding-bottom: 80px;
    /* جلوگیری از اسکرول افقی اضافه بخاطر ترفند 100vw */
    overflow-x: hidden;
}

headerImg {
    background-image: url('../../img/3.png');
}

/* =========================================
   2. هدر اصلی سایت (Hero Header)
   ========================================= */
header {
    /*    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1509042239860-f550ce710b93?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80');
*/ background-size: cover;
    background-position: center;
    /*height: 250px;*/
    display: flex;
    /*  align-items: center;*/
    justify-content: end;
    color: white;
    text-align: center;
    flex-direction: column;
}

    header h1 {
        font-size: 2.5rem;
        margin-bottom: 10px;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    }

/* =========================================
   3. نویگیشن چسبان (اصلاح شده کامل)
   ========================================= */
.sticky-nav {
    position: sticky; /* یا -webkit-sticky برای سافاری */
    top: 0;
    z-index: 2;
    transform: translateZ(0);
    background: #AB9682;
    /*  background: linear-gradient(135deg, #2c1810 0%, #3d2317 100%);*/
    /*    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);*/
    padding: 20px 0;
    /* ترفند برای تمام عرض شدن (Full Width Banner) */
    width: 100%;
    /*    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);*/
}

.nav-scroll-container {
    display: flex;
    align-items: center;
    scrollbar-width: thin;
    scrollbar-color: #8b6f47 #2c1810;
}

/* استایل دکمه‌های نویگیشن */
.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(55 37 14);
    color: rgb(255, 250, 240);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    cursor: pointer;
    flex-direction: column;
    gap: 8px;
    padding: 10px 15px;
    min-width: auto;
}

    .nav-btn:hover {
        background: rgba(139, 111, 71, 0.3);
        transform: translateY(-3px);
        border-color: #8b6f47;
        box-shadow: 0 5px 15px rgba(139, 111, 71, 0.4);
    }

    .nav-btn.active {
        background: #8b6f47;
        border-color: #f5e6d3;
        box-shadow: 0 0 10px rgba(255,255,255,0.2);
    }

.nav-icon {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #8b6f47;
    transition: all 0.3s ease;
}

.nav-btn:hover .nav-icon {
    transform: scale(1.1);
    border-color: #f5e6d3;
}

/* =========================================
   4. بدنه منو و کارت‌ها
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative; /* برای اینکه z-index کار کند */
    z-index: 1; /* عدد کمتر از نویگیشن (که 9999 بود) */
}

.section-title {
    /* تنظیمات قبلی شما */
    margin: 40px 0 20px;
    font-size: 2rem;
    color: rgb(55 37 14);
    position: relative;
    scroll-margin-top: 140px;
    /* تنظیمات جدید برای خطوط */
    display: flex; /* فعال کردن فلکس */
    align-items: center; /* تراز عمودی خط و متن */
    justify-content: center; /* تراز افقی */
    width: 100%; /* عرض کامل */
    white-space: nowrap; /* جلوگیری از شکستن متن در دو خط */
}

    .section-title::before,
    .section-title::after {
        content: ""; /* محتوای خالی برای ایجاد المنت */
        height: 8px; /* ضخامت خط */
        background-color: rgb(55 37 14); /* رنگ خط */
        flex: 1; /* خط را می‌کشد تا فضا پر شود و بیرون بزنه */
        /* برای بیرون زدن از لبه‌ها */
        margin: 0 -50vw; /* بیرون زدن از سمت چپ و راست به اندازه ۵۰% عرض ویوپورت */
    }

    /* فاصله خط راست از متن */
    .section-title::before {
        margin-left: 20px;
    }

    /* فاصله خط چپ از متن */
    .section-title::after {
        margin-right: 20px;
    }

/*.section-title {
    text-align: center;
    margin: 40px 0 20px;
    font-size: 2rem;
    color: rgb(55 37 14);
    position: relative;*/
/* تنظیم اسکرول مارجین برای اینکه هدر روی تیتر نیافتد */
/*scroll-margin-top: 140px;
}*/
.section-title-category {
    font-family: tajrid;
    text-align: center;
    margin: 40px 0 20px;
    font-size: 1.5rem;
    color: rgb(255, 250, 240);
    position: relative;
    تنظیم اسکرول مارجین برای اینکه هدر روی تیتر نیافتد scroll-margin-top: 140px;
}




/*.section-title::after {
        content: '';
        display: block;
        width: 60px;
        height: 4px;
        background: var(--accent-color);
        margin: 10px auto;
        border-radius: 2px;
    }*/

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}



.menu-item {
    position: relative;
    background: rgb(255, 250, 240);
    border-radius: 15px;
    border: 3px solid #6B4423;
    box-shadow: 10px 5px 15px rgba(139, 111, 71, 1.01);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 15px 20px;
    margin: 10px 0;
    cursor: pointer;
}

    .menu-item::before {
        content: "";
        position: absolute;
        inset: 5px; /* فاصله خط دوم از بیرون */
        border: 2px solid #6B4423; /* خط داخلی */
        border-radius: 10px;
        pointer-events: none;
    }


    .menu-item:hover {
        background: #f8f9fa;
        border-color: #8D6E63; /* تغییر رنگ حاشیه هنگام hover */
        transform: translateX(-5px);
    }

    .menu-item.active {
        background: linear-gradient(135deg, #6B4423 0%, #8D6E63 100%);
        color: white;
        border-color: #4a2f1a; /* حاشیه تیره‌تر برای حالت فعال */
        box-shadow: 0 3px 10px rgba(107, 68, 35, 0.3);
    }

.navicon {
    width: 40px
}

.item-img {
    width: 100%;
    height: 200px; /* ارتفاع ثابت برای نظم */
    object-fit: cover;
}

.item-details {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.item-name-fa {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.item-name-en {
    display: block; /* برای قرار گرفتن در خط جدید زیر نام فارسی */
    font-size: 0.8rem; /* اندازه کوچک (80% اندازه عادی) */
    color: #777; /* رنگ کم‌رنگ برای تمایز */
    margin-top: 5px; /* فاصله کوچک از نام فارسی */
    font-weight: normal; /* اگر لازم است، وزن فونت را تنظیم کنید */
}

.item-price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
    white-space: nowrap;
}

/* کنترل‌های سفارش */
.order-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 10px;
    gap: 8px;
}

.qty-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-plus {
    background-color: var(--primary-color);
    color: white;
}

.btn-minus {
    background-color: #e0e0e0;
    color: #333;
}

.qty-display {
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

/* دکمه بازگشت به بالا */
#backToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 99;
    border: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: background-color 0.3s;
}

    #backToTop:hover {
        background-color: var(--secondary-color);
    }

/* =========================================
   5. مدیا کوئری دسکتاپ (کامپیوتر)
   ========================================= */
@media (min-width: 769px) {
    .nav-scroll-container {
        justify-content: center; /* وسط چین */
        max-width: 2000px;
        margin: 0 auto;
        gap: 20px;
        flex-wrap: wrap;
    }

    /*  .nav-btn {
        flex-direction: column;
        gap: 0px;
        padding: 10px 25px;
        min-width: auto;
    }*/

    .nav-icon {
        width: 32px;
        height: 32px;
    }

    .nav-btn span {
        font-size: 16px;
        font-weight: bold;
    }

    /* حذف اسکرول بار در کامپیوتر */
    .nav-scroll-container::-webkit-scrollbar {
        display: none;
    }
}

/* =========================================
   6. مدیا کوئری موبایل (تبلت و گوشی)ب
   ========================================= */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    /* تک ستونه کردن محصولات در موبایل */
    .menu-grid {
        grid-template-columns: 1fr;
    }

    .item-img {
        height: 180px;
    }

    /* نویگیشن اسکرولی برای موبایل */
    .nav-scroll-container {
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
        padding: 0 20px;
        gap: 15px;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

        .nav-scroll-container::-webkit-scrollbar {
            height: 4px; /* اسکرول بار ظریف */
        }

        .nav-scroll-container::-webkit-scrollbar-track {
            background: transparent;
        }

        .nav-scroll-container::-webkit-scrollbar-thumb {
            background: #8b6f47;
            border-radius: 10px;
        }

    /*.nav-btn {
        flex-direction: column;*/ /* متن زیر آیکون */
    /*gap: 8px;
        padding: 10px 15px;
        min-width: 85px;
        flex-shrink: 0;
    }*/

    .nav-icon {
        width: 35px;
        height: 35px;
    }

    .nav-btn span {
        font-size: 12px;
        white-space: normal;
        text-align: center;
    }






    .main-header {
        width: 100%;
        /* 70vh یعنی 70 درصد از ارتفاع صفحه نمایش جاری */
        /* height: 50vh;*/
        overflow: hidden;
        position: relative;
        /*   margin-top:10%*/
    }

    .header-img {
        width: 100%;
        height: 100%;
        /* خیلی مهم: */
        /* cover باعث می‌شود عکس دفرمه نشود، بلکه اضافات آن بریده شود تا کادر پر شود */
        object-fit: cover;
        /* عکس را وسط‌چین می‌کند تا مرکز عکس همیشه دیده شود */
        object-position: center;
    }
}
