﻿@font-face {
    font-family: IRANSansfanum;
    font-style: normal;
    font-weight: 300;
    src: url('../fonts/IRANSansWeb_Light.eot');
    src: url('../fonts/IRANSansWeb_Light.eot?#iefix') format('embedded-opentype'), url('../fonts/IRANSansWeb_Light.woff2') format('woff2'), url('../fonts/IRANSansWeb_Light.woff') format('woff'), url('../fonts/IRANSansWeb_Light.ttf') format('truetype');
}
*, *::before, *::after {
    box-sizing: border-box;
}
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* کل صفحه بدون اسکرول */
    font-family: 'IRANSansfanum', sans-serif;
    background-image: url('../../img/menu/backgroundmenu.png') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* ---------------------- Layout ---------------------- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header,
.sam-header-menu,
.card-number,
.site-footer {
    flex: 0 0 auto; /* ثابت */
}
.site-header {
    width: 100%;
}


.category-all-container {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* وسط اسکرول نشه */
    background-color: rgba(255, 255, 255,0); /* سفید 70% شفاف */
    color: white;
}

    .category-all-container .main-container {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        width: 95%;
        margin: 10px auto;
        border: 2px solid rgba(255, 255, 255,0.0);
        border-radius: 10px;
        padding: 7px;
        background: rgba(255,255,255,0.0);
        box-shadow: 0px -2px 14px rgba(0, 0, 0, 0.7);
        color: white;
    }
/* ---------------------- Categories ---------------------- */
#categories-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto; /* فقط این اسکرول بخوره */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

    #categories-container::-webkit-scrollbar {
        width: 6px;
    }

    #categories-container::-webkit-scrollbar-thumb {
        background: white;
        border-radius: 4px;
    }

        #categories-container::-webkit-scrollbar-thumb:hover {
            background: white;
        }

/* ---------------------- Submenu ---------------------- */
.category-container .submenu {
    max-height: 40vh; /* نصف صفحه تقریبا */
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none; /* پیش‌فرض بسته */
    margin-top: 5px;
    padding: 5px;
    border-left: 2px solid rgba(255, 255, 255,0.0);
}

    .category-container .submenu::-webkit-scrollbar {
        width: 6px;
    }

    .category-container .submenu::-webkit-scrollbar-thumb {
        background: white;
        border-radius: 4px;
    }

        .category-container .submenu::-webkit-scrollbar-thumb:hover {
            background: white;
        }

/*شماره کارت*/
.card-number {
    background: rgba(255,255,255,0.0);
    color: white;
    font-family: 'IRANSansfanum', sans-serif;
    padding: 2px 20px 2px;
    width: 95%;
    /*max-width: 1200px;*/ /* حداکثر عرض */
    margin: 22px auto; /* وسط‌چین کردن افقی */
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255,0.0);
    margin-bottom: 20px;
    box-shadow: 0px 6px 10px rgba(0,0,0,0.7);
}

.card-number-container {
    /*display: flex;*/
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: auto;
    gap: 20px;
    text-align: center;
}

.card h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    margin-top:8px;
    font-weight: bold;
}

.card h3 {
    font-size: 0.95rem;
    line-height: 1.5;
}


.card {
/*    margin-bottom: 20px;*/
}
/*فوتر سایت*/
.site-footer {
    background-color: rgba(255, 255, 255, 0.0); /* سفید 70% شفاف */
    color: white;
    font-family: 'IRANSansfanum', sans-serif;
    padding: 10px 20px;
    width: 95%;
    /*max-width: 1200px;*/ /* حداکثر عرض */
    margin: 5px auto; /* وسط‌چین کردن افقی */
    border-radius: 10px;
    margin-top: 15px;
    border: 2px solid rgba(255, 255, 255,0.0);
    box-shadow: 0 4px 12px rgba(0,0,0,0.7);
}

.footer-container {
    /*display: flex;*/
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: auto;
    gap: 20px;
    text-align: center;
}

.footer-brand img {
    height: 50px;
    display: block;
    margin-bottom: 15px;
}

.footer-brand h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.footer-address h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: bold;
    margin-top:8px;
}

.footer-address p {
    font-size: 0.95rem;
    line-height: 1.5;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    font-size: 0.85rem;
    color: white;
    border-top: 1px solid rgba(255, 255, 255,0.0);
    padding-top: 10px;
}
/*منو بالا*/
.sam-header-menu {
    background-color: rgba(255, 255, 255, 0.0); /* سفید 70% شفاف */
    font-family: 'IRANSansfanum', sans-serif;
    padding: 10px 20px;
    box-shadow: 0 -1px 15px rgba(0,0,0,0.9);
    margin: 20px auto 20px; /* فاصله بالا و پایین + وسط‌چین */
    width: 95%;
    /*max-width: 1200px;*/
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255,0.0);
    color: white
}

    .sam-header-menu .root-menu {
        list-style: none;
        display: flex;
        justify-content: center;
        gap: 30px;
        margin: 0;
        padding: 0;
    }

    .sam-header-menu .menu-item {
        position: relative;
    }

        .sam-header-menu .menu-item > a {
            text-decoration: none;
            color: white;
            font-weight: 500;
            padding: 10px 15px;
            /*display: flex;*/
            align-items: center;
            transition: color 0.3s;
        }

            .sam-header-menu .menu-item > a:hover {
                color: #007bff;
            }

    .sam-header-menu .arrow {
        margin-right: 5px;
        font-size: 0.8rem;
    }

    .sam-header-menu .dropdown-menu {
        position: absolute;
        top: 100%;
        right: 0;
        background-color: rgba(255, 255, 255, 0.0); /* سفید 70% شفاف */
        border: 1px solid rgba(255, 255, 255,0.0);
        list-style: none;
        display: none;
        min-width: 200px;
        box-shadow: 0 -1px 15px rgba(0,0,0,0.9);
        z-index: 1000;
        color: white
    }

    .sam-header-menu .menu-item:hover > .dropdown-menu {
        display: block;
    }

    .sam-header-menu .dropdown-menu li a {
        display: block;
        padding: 10px 15px;
        color: white;
        text-decoration: none;
        transition: background 0.3s;
    }

        .sam-header-menu .dropdown-menu li a:hover {
            background: #007bff;
        }

.dropdown-menu.sub-menu {
    right: 100%;
    top: 0;
    display: none;
    position: absolute;
}

.dropdown-menu li:hover > .sub-menu {
    display: block;
}



/*navbar بالا برای برند*/
.navbar-top {
    display: flex; /* عناصر را افقی می‌کند */
    justify-content: space-between; /* فضای بین عناصر را تقسیم می‌کند (لوگو چپ، تلفن راست) */
    align-items: center; /* عناصر را در ارتفاع وسط می‌کند */
    padding: 10px 20px; /* فاصله داخلی اختیاری */
    background-color: rgba(255, 255, 255, 0.0); /* سفید 70% شفاف */
    direction: rtl; /* برای پشتیبانی از راست به چپ */
    border: 2px solid rgba(255, 255, 255,0.0);
    border-radius: 10px;
    width: 95%;
    margin: auto;
    box-shadow: 0 -1px 16px rgba(0,0,0,0.8);
    color: white
}

.brand {
    flex: 1; /* فضای بیشتری به برند بدهد */
    text-align: right; /* تراز راست برای rtl */
    margin-top:10px
}

.phone {
    flex: 1;
    text-align: left; /* تراز چپ برای rtl، تا تلفن سمت چپ برود */
}
/* Helpers to improve responsive sizing */
*, *::before, *::after {
    box-sizing: border-box;
}
/*بدنه اصلی*/
body {
    font-family: 'IRANSansfanum',sans-serif;
    margin: 0;
    padding: 10px;
    background-color: white;
    overflow-x: hidden; /* avoid accidental horizontal scroll on small screens */
    align-items: center;
}
/*محصولات منوی اصلی*/
h1 {
    text-align: center;
    margin-bottom: 15px;
        font-size: 1.5rem;
}

.category-item {
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.0); /* سفید 70% شفاف */
    box-shadow: 0 -1px 10px rgba(0,0,0,0.7);
    /*margin-bottom: 8px;*/
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    border: 1px solid rgba(255, 255, 255,0.1);
}

    .category-item:hover {
        background: #007bff;
    }

.category-arrow {
    font-size: 0.8rem;
    color: white;
}

.submenu {
    margin-right: 10px;
    display: none;
}

.product-list {
    list-style: none;
    padding: 0;
}

.product-item {
    cursor: pointer;
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255,0.4);
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px
}

    .product-item:hover {
        background: #007bff;
    }

.price {
    font-weight: bold;
    white-space: nowrap;
}

.back-button {
    color: #007bff;
    cursor: pointer;
    margin-bottom: 10px;
    display: inline-block;
}

/* مودال */
#productModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3); /* سفید 70% شفاف */
    z-index: 1000;
    overflow-y: auto;
    padding: 15px;
    box-sizing: border-box;
}

.modal-content {
    background-color: rgba(255, 255, 255, 1); /* سفید 70% شفاف */
    margin: auto;
    border-radius: 10px;
    max-width: 500px;
    padding: 15px;
    position: relative;
    opacity: 1
}

    .modal-content img {
        max-width: 100%;
        max-height: 350px; /* دسکتاپ */
        height: auto;
        object-fit: contain;
        border-radius: 10px;
        display: block;
        margin: 0 auto;
    }

.modal-close {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: red;
}

.product-description {
    font-size: 0.9em;
    color: black;
    margin-top: 4px;
}
h3 {
    font-weight: bold;
    margin:2px
}

.category-all-container {
    width: 100%;
    min-height: 20vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.main-container {
    width: 95%;
    margin: 5px auto;
    border: 1px solid black;
    border-radius: 10px;
    padding: 7px;
    box-shadow: 0 3px 5px rgba(0,0,0,0.5);
    margin-top: 10px;
    border: 2px solid rgba(255, 255, 255,0.5);
    background-color: rgba(255, 255, 255, 0.0); /* سفید 70% شفاف */
}

#categories-container {
    max-height: 400px; /* ارتفاع قابل تنظیم */
    overflow-y: auto;

/*    padding: 5px;*/
    scrollbar-width: thin; /* Firefox */
    
}

    /* استایل اسکرول برای مرورگرهای وب‌کیت */
    #categories-container::-webkit-scrollbar {
        width: 6px;
    }

    #categories-container::-webkit-scrollbar-thumb {
        background: white;
        border-radius: 4px;
    }

        #categories-container::-webkit-scrollbar-thumb:hover {
            background: #666;
        }


.category-container .submenu {
    max-height: 300px; /* ارتفاع قابل تنظیم برای زیرمنو */
    overflow-y: auto;
    display: none; /* چون با JS/Ajax باز میشه */
    margin-top: 5px;
    padding: 5px;
    border-left: 2px solid rgba(255, 255, 255,0.1);
}

    /* استایل اسکرول زیرمنو */
    .category-container .submenu::-webkit-scrollbar {
        width: 6px;
    }

    .category-container .submenu::-webkit-scrollbar-thumb {
        background: #999;
        border-radius: 4px;
    }

        .category-container .submenu::-webkit-scrollbar-thumb:hover {
            background: #666;
        }
.card h3 {
    font-family: 'IRANSansfanum', sans-serif;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.copy-btn {
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.3); /* سفید 70% شفاف */
    color: white;
    /*border:1px solid black;*/
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.9rem;
    transition: background 0.3s;
    border: none
}

    .copy-btn:hover {
        background: #0056b3;
    }

/*در حالت موبایل*/
@media (max-width: 768px) {


    .category-container .submenu {
        max-height: 250px; /* کمتر از دسکتاپ */
        overflow-y: auto;
        border-left: none; /* برای موبایل معمولاً خط کنار حذف میشه */
        margin: 5px 0;
        padding: 5px 10px;
    }
    #categories-container {
        max-height: 300px; /* کمتر از دسکتاپ */
        overflow-y: auto;
    }
    .card-number-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-brand, .footer-address {
        margin-bottom: 20px;
    }

    .sam-header-menu {
        padding: 10px;
        width: 95%;
        max-width: 100%;
        margin: 15px auto;
        border-radius: 10px;
    }

        /* ریشه منو به صورت عمودی */
        .sam-header-menu .root-menu {
            flex-direction: row;
            align-items: flex-start;
            gap: 0;
        }

        /* هر آیتم منو full width */
        .sam-header-menu .menu-item {
            /* width: 100%;*/
            margin: auto;
        }

            .sam-header-menu .menu-item > a {
                padding: 12px 8px;
                width: 100%;
                /* border-bottom:1px solid black;*/
            }

        /* زیرمنوها به صورت block و کامل زیر هر آیتم */
        .sam-header-menu .dropdown-menu {
            position: relative;
            top: 0;
            right: 0;
            box-shadow: none;
            border: none;
            min-width: 100%;
            display: none; /* اولیه مخفی */
        }

        .sam-header-menu .menu-item.active > .dropdown-menu {
            display: block; /* وقتی آیتم فعال شد نمایش داده شود */
        }

    /* زیرمنوهای تو در تو */
    .dropdown-menu.sub-menu {
        position: relative;
        right: 0;
        top: 0;
        box-shadow: none;
        border: none;
        display: none;
    }

    .dropdown-menu li:hover > .sub-menu {
        display: block;
        border-bottom: 1px solid blue
    }

    /* برای لمس موبایل، می‌توانیم با کلاس .active باز/بسته کنیم */
    .sam-header-menu .arrow {
        margin-right: 8px;
    }

    .category-item, .product-item {
        font-size: 1.2rem;
        padding: 8px;
        background-color: rgba(255, 255, 255, 0.0); /* سفید 70% شفاف */
    }

    .modal-content {
        width: 95%;
        padding: 12px;
    }

    #modalProductTitle {
        font-size: 1.1rem;
    }

    #modalProductDescription {
        font-size: 0.9rem;
    }

    .modal-content img {
        max-height: 200px; /* موبایل */
    }

    .main-container {
        width: 95%;
        margin: 5px auto;
        border: 2px solid rgba(255, 255, 255,0.5);
        border-radius: 10px;
        padding: 7px;
        box-shadow: 0 0 8px black;
        margin-top: 20px;
        background-color: rgba(255, 255, 255,0.5);
    }

    h1 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.2rem;
    }
}
/* ---------------------- Global Layout ---------------------- */
/*html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;*/ /* جلوگیری از اسکرول کل صفحه */
    /*font-family: sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}*/

/* ---------------------- ثابت‌ها (Header / Footer) ---------------------- */
/*.site-header,
.sam-header-menu,
.card-number,
.site-footer {
    flex: 0 0 auto;*/ /* ارتفاع ثابت */
/*}*/

/* ---------------------- بخش وسط (Container) ---------------------- */
/*.category-all-container {
    flex: 1 1 auto;*/ /* فضای وسط */
    /*display: flex;
    flex-direction: column;
    overflow: hidden;*/ /* جلوگیری از اسکرول کل وسط */
    /*padding: 0;
    margin: 0;
}*/

    /* ---------------------- جعبه اصلی ---------------------- */
    /*.category-all-container .main-container {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        margin: 5px auto;
        width: 95%;
        border: 1px solid #ccc;
        border-radius: 5px;
        padding: 7px;
        box-shadow: 0 3px 5px rgba(0,0,0,.05);
    }*/

/* ---------------------- لیست دسته‌ها ---------------------- */
/*#categories-container {
    flex: 1 1 auto;
    min-height: 0;*/ /* جلوگیری از بیرون‌زدگی */
    /*overflow-y: auto;*/ /* اسکرول فقط روی دسته‌ها */
    /*-webkit-overflow-scrolling: touch;
}*/

/* ---------------------- زیرمجموعه‌ها ---------------------- */
/*.category-container .submenu {
    max-height: 50vh;*/ /* حداکثر نصف ارتفاع صفحه */
    /*min-height: 0;
    overflow-y: auto;*/ /* اسکرول فقط روی زیرمجموعه */
    /*-webkit-overflow-scrolling: touch;
}*/
