﻿/* تعریف متغیرهای رنگ */
:root {
    --orange-color: #ef6123;
    --orange-light: #f58a5c;
    --orange-dark: #d4531a;
    --white-color: #ffffff;
    --light-bg: #f9f9f9;
    --light-gray: #f0f0f0;
    --text-color: #333333;
    --text-light: #666666;
    --new-orange: #F15A29;
}

/* تعریف فونت */
@font-face {
    font-family: 'Ravi';
    src: url('../font/Ravi/Ravi FaNum/TTF/RaviFaNum-Regular.ttf') format('truetype'), url('../font/Ravi/Ravi Family/Webfonts/fonts/woff2/Ravi-Regular.woff2') format('woff2'), url('../font/Ravi/Ravi Family/Webfonts/fonts/woff/Ravi-SemiBold.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ریست استایل‌ها */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Ravi', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--white-color);
    color: var(--text-color);
    overflow-x: hidden;
    position: relative;
}

    /* جدول‌بندی پس‌زمینه */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: linear-gradient(var(--orange-color) 1px, transparent 1px), linear-gradient(90deg, var(--orange-color) 1px, transparent 1px);
        background-size: 40px 40px;
        background-position: center center;
        z-index: -1;
        pointer-events: none;
        opacity: 0.4;
    }

/* صفحه اصلی - لوگو و متن یک تکه */
.landing-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

    /* پس‌زمینه جدولی برای صفحه اصلی */
    .landing-page::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        /*background-image: linear-gradient(var(--orange-color) 1px, transparent 1px), linear-gradient(90deg, var(--orange-color) 1px, transparent 1px);*/
        background-size: 40px 40px;
        background-position: center center;
        z-index: 0;
        pointer-events: none;
        opacity: 0.15;
    }

/* کانتینر لوگو و متن یکپارچه */
.logo-container-unified {
    text-align: center;
    animation: fadeInUp 1.5s ease-out, float 6s ease-in-out infinite;
    z-index: 2;
    position: relative;
    background-color: var(--white-color);
    padding: 40px 30px;
    border-radius: 0px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    margin: 0 20px;
    border: 2px solid rgba(241, 90, 41, 0.3);
}

.logo-img-unified {
    width: 180px;
    height: 180px;
    margin: 0 auto 25px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 15px rgba(241, 90, 41, 0.4));
    animation: pulse 3s infinite alternate;
}

.title-unified {
    margin-bottom: 20px;
}

.restaurant-name {
    font-size: 2.8rem;
    color: var(--text-color);
    margin-bottom: 15px;
    font-weight:bold;
    font-style: normal;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.top-text {
    font-size: 1.5rem;
    color: #F15A29;
    font-weight: 600;
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    line-height: 1.6;
    margin: 0 auto;
    padding-top: 15px;
    border-top: 1px solid rgba(241, 90, 41, 0.2);
}

/* استایل‌های بخش منو */
.menu-container {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;    
    position: relative;
    z-index: 1;
    /*border-radius: 20px 20px 0 0;*/
    margin-top: -20px;
}

/* استایل جدید برای هدر منو با منوی همبرگری */
.menu-header {
    position: sticky;
    top: 0;
    background-color: var(--white-color);
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-radius: 0px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(241, 90, 41, 0.2);
    transition: all 0.3s ease;
}

/* وقتی سایدبار باز است، منوی هدر کمی تیره شود */
.sidebar-menu.active ~ .menu-container .menu-header {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 35px;
    height: 25px;
    cursor: pointer;
    margin-left: 20px;
    z-index: 1001;
    flex-shrink: 0;
}

.hamburger-line {
    width: 100%;
    height: 4px;
    background-color: var(--orange-color);
    border-radius: 0px;
    transition: all 0.3s ease;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.menu-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--orange-color);
    text-align: center;
    flex-grow: 1;
    margin: 0 15px;
}

.categories-scroll {
    display: flex;
    overflow-x: auto;
    padding: 10px 15px;
    scroll-behavior: smooth;
    gap: 15px;
    justify-content: flex-start;
    flex-grow: 1;
}

    .categories-scroll::-webkit-scrollbar {
        height: 6px;
    }

    .categories-scroll::-webkit-scrollbar-thumb {
        background-color: var(--orange-color);
        border-radius: 3px;
    }

.category-item {
    min-width: 180px;
    background-color: var(--light-bg);
    border: 1px solid var(--orange-color);
    border-radius: 0px;
    padding: 12px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

    .category-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(239, 97, 35, 0.2);
    }

    .category-item.active {
        background-color: var(--orange-color);
        color: var(--white-color);
    }

/* استایل برای منوی اسلایدی (سایدبار) */
.sidebar-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 320px;
    height: 100vh;
    background-color: var(--white-color);
    z-index: 2000;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    border-right: 3px solid var(--orange-color);
}

    .sidebar-menu.active {
        right: 0;
    }

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 20px;
    background-color: var(--orange-color);
    color: var(--white-color);
    border-bottom: 2px solid var(--orange-dark);
    position: sticky;
    top: 0;
    z-index: 2001;
}

    .sidebar-header h3 {
        font-size: 1.5rem;
        font-weight: 700;
        margin: 0;
    }

.close-sidebar {
    background: none;
    border: none;
    color: var(--white-color);
    font-size: 1.8rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

    .close-sidebar:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: rotate(90deg);
    }

.sidebar-categories {
    padding: 20px 15px;
}

.sidebar-category-item {
    padding: 16px 20px;
    margin-bottom: 10px;
    background-color: var(--light-bg);
    border: 1px solid var(--orange-light);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-align: right;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

    .sidebar-category-item:hover {
        background-color: var(--orange-color);
        color: var(--white-color);
        transform: translateX(-5px);
        box-shadow: 3px 3px 15px rgba(239, 97, 35, 0.3);
    }

    .sidebar-category-item.active {
        background-color: var(--orange-color);
        color: var(--white-color);
        border-color: var(--orange-color);
    }

    

    .sidebar-category-item:hover::after,
    .sidebar-category-item.active::after {
        background-color: var(--white-color);
        transform: translateY(-50%) scale(1.3);
    }

/* لایه محو برای پس‌زمینه وقتی سایدبار باز است */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* استایل جدید برای کارت محصولات با چیدمان درخواستی */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--white-color);
    border: 1px solid var(--orange-color);
    border-radius: 0px;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 220px;
    position: relative;
}

    .product-card.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .product-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(239, 97, 35, 0.15);
    }

.product-image {
    width: 160px;
    height: 189px;
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white-color) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    overflow: hidden;
    cursor: pointer;
    /*border: 2px solid var(--orange-light);*/
    border-radius: 0px;
    z-index: 2;
}

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .product-image:hover img {
        transform: scale(1.05);
    }

.product-details {
    padding: 20px;
    padding-right: 190px; /* فضا برای عکس */
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.product-name {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 800;
    line-height: 1.3;
}

.product-description {
    margin-bottom: 15px;
    line-height: 1.5;
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 500;
    flex-grow: 1;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px dashed rgba(241, 90, 41, 0.3);
}

.product-recipe {
    color: var(--text-light);
    font-size: 0.7rem;
    font-weight: 400;
    flex: 1;
    padding-left: 10px;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--orange-color);
    text-align: left;
    white-space: nowrap;
    padding: 10px 10px 10px 10px;
}

/* مدال برای نمایش تصویر بزرگ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    background-color: var(--white-color);
    border-radius: 0px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.modal-details {
    padding: 20px;
    text-align: right;
}

.modal-name {
    font-size: 1.8rem;
    color: var(--orange-color);
    margin-bottom: 15px;
    font-weight: 800;
}

.modal-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 15px;
}

.modal-recipe {
    font-size: 1rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 15px;
    padding-right: 15px;
    border-right: 3px solid var(--orange-light);
}

.modal-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--orange-color);
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--orange-color);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2001;
}

/* استایل‌های ریسپانسیو */
@media (max-width: 992px) {
    .product-card {
        min-height: 200px;
    }

    .product-image {
        width: 140px;
        height: 169px;
    }

    .product-details {
        padding-right: 180px;
    }
}

@media (max-width: 768px) {
    .logo-container-unified {
        padding: 25px 20px;
        margin: 0 15px;
    }

    .restaurant-name {
        font-size: 2.2rem;
    }

    .top-text {
        font-size: 1.3rem;
    }

    .logo-img-unified {
        width: 150px;
        height: 150px;
    }

    .tagline {
        font-size: 1rem;
    }

    .menu-header {
        padding: 12px 0;
    }

    .hamburger-menu {
        width: 30px;
        height: 22px;
        margin-left: 15px;
        margin-right: 10px;
    }

    .menu-title {
        font-size: 1.5rem;
        margin: 0 10px;
    }

    .categories-scroll {
        padding: 8px 10px;
        gap: 10px;
    }

    .category-item {
        min-width: 140px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        min-height: 180px;
    }

    .product-image {
        width: 140px;
        height: 169px;
        top: 15px;
        right: 15px;
    }

    .product-details {
        padding: 15px;
        padding-right: 165px;
        min-height: 160px;
    }

    .product-name {
        font-size: 1.1rem;
    }

    .product-description {
        font-size: 0.8rem;
    }

    .product-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .product-recipe {
        padding-left: 0;
        width: 100%;
    }

    .product-price {
        font-size: 1.1rem;
        text-align: left;
        width: 100%;
        padding: 10px 10px 10px 10px;
    }

    .modal-content {
        max-width: 95%;
    }

    .modal-name {
        font-size: 1.5rem;
    }

    /* استایل‌های ریسپانسیو برای سایدبار */
    .sidebar-menu {
        width: 300px;
        right: -300px;
    }
}

@media (max-width: 480px) {
    .logo-container-unified {
        padding: 20px 15px;
        margin: 0 10px;
    }

    .restaurant-name {
        font-size: 2.8rem;
    }

    .top-text {
        font-size: 1.1rem;
    }

    .logo-img-unified {
        width: 120px;
        height: 120px;
    }

    .category-title {
        font-size: 1.6rem;
    }

    .menu-title {
        font-size: 1.3rem;
        margin: 0 8px;
    }

    .category-item {
        min-width: 120px;
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .product-card {
        min-height: 170px;
    }

    .product-image {
        width: 140px;
        height: 169px;
        top: 12px;
        right: 12px;
    }

    .product-details {
        padding: 12px;
        padding-right: 160px;
        min-height: 150px;
    }

    .product-name {
        font-size: 1rem;
    }

    .product-price {
        font-size: 1rem;
        padding: 10px 10px 10px 10px;
    }

    .product-bottom {
        gap: 8px;
    }

    /* استایل‌های ریسپانسیو برای سایدبار */
    .sidebar-menu {
        width: 280px;
        right: -280px;
    }

    .sidebar-header {
        padding: 20px 15px;
    }

        .sidebar-header h3 {
            font-size: 1.3rem;
        }

    .sidebar-category-item {
        padding: 14px 18px;
        font-size: 1rem;
    }
}

/* دکمه اسکرول */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--orange-color);
    font-size: 2rem;
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.8);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* استایل برای دکمه برگشت به بالا */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #F15A29;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .scroll-to-top.visible {
        opacity: 1;
        visibility: visible;
    }

    .scroll-to-top:hover {
        background-color: #e14a1a;
        transform: translateY(-3px);
    }

    .scroll-to-top i {
        font-size: 24px;
    }

/* انیمیشن‌ها */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* برای جلوگیری از تغییر رنگ در حالت تاریک */
@media (prefers-color-scheme: dark) {
    .landing-page {
        background-color: var(--white-color) !important;
    }

    .logo-container-unified {
        background-color: var(--white-color) !important;
        color: var(--text-color) !important;
        border-color: rgba(241, 90, 41, 0.3) !important;
    }

    .restaurant-name {
        color: var(--text-color) !important;
    }

    .top-text {
        color: #F15A29 !important;
    }

    /* تضمین نمایش پس‌زمینه جدولی */
    body::before,
    .landing-page::before {
        opacity: 0.1 !important;
    }
}

/* تضمین نمایش همه بخش‌ها */
.category-section {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* استایل برای دسته‌بندی‌های فعال */
.category-item.active {
    background-color: #F15A29;
    color: white;
    transform: scale(1.05);
}

/* انیمیشن برای محصولات */
.product-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

    .product-card.visible {
        opacity: 1;
        transform: translateY(0);
    }
