﻿body {
    color: #eee;
    direction: rtl;
    font-family: IRANYekanWebRegular !important;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    background-color: #111;
    background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%), radial-gradient(circle at 80% 60%, rgba(255, 255, 255, 0.04) 0%, transparent 50%), linear-gradient(135deg, rgba(30, 30, 30, 1) 0%, rgba(20, 20, 20, 1) 100%);
    background-attachment: fixed;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}


@font-face {
    font-family: IRANYekanWebRegular;
    src: url("font/iranyekanwebregularfanum.woff") format("woff")
}

.container {
    width: 90%;
    margin: 30px auto;
}

.title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

/* ساختار گرید: فاصله و اندازه یکنواخت */
.category-grid, .menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px; /* فاصله بین کارت‌ها در هر دو جهت */
    align-items: stretch; /* ارتفاع یکسان برای همه کارت‌ها */
}

/* کارت‌ها */
.category-card, .menu-card {
    background: #1e1e1e;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column; /* محتوای عمودی */
    height: 100%; /* تمام ارتفاع ستون */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .category-card:hover, .menu-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(255,255,255,0.1);
    }

.category-img, .menu-img {
    width: 100%;
    height: 70%;
    object-fit: cover;
}

.category-info, .menu-info {
    flex-grow: 1; /* محتوای توضیحی فضا بگیرد */
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* عنوان، توضیح، قیمت منظم چیده شوند */
}

    .menu-info h2 {
        margin: 0 0 10px 0;
        font-size: 1.1rem;
    }

.menu-price {
    color: #ffb347;
    font-weight: bold;
    margin-top: 10px;
}

.menu-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #ccc;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* حداکثر ۴ خط توضیح */
    -webkit-box-orient: vertical;
}

/* دکمه بازگشت */
.back-btn {
    display: inline-block;
    color: #ffb347;
    margin-bottom: 20px;
    text-decoration: none;
    transition: color 0.3s;
    font-size:20px;
    font-weight:bolder;
}

    .back-btn:hover {
        color: #fff;
    }

/* بخش بالای هر دسته */
.category-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.category-banner {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
}

.category-text h1 {
    margin-bottom: 10px;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 600px) {
    .category-banner {
        width: 100%;
        height: 180px;
    }

    .category-grid, .menu-grid {
        grid-template-columns: 1fr;
    }
}
.divider {
    border: 1px solid #ff9f2a;
}
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: #1e1e1e;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    color: #fff;
    padding: 20px;
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
}

.modal h2 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.modal-price {
    color: #ffb347 !important;
    font-weight: bold;
    margin-bottom: 10px;
}

.modal p {
    color: #ddd;
    line-height: 1.8;
    text-align: justify;
    white-space: normal; 
    word-wrap: break-word; 
    overflow-wrap: break-word; 
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 5px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #ffb347;
    transition: color 0.3s;
}

    .close-btn:hover {
        color: #fff;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.card, .modal-content {
    background-color: rgba(25, 25, 25, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 16px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

    .card:hover {
        transform: translateY(-4px) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7) !important;
    }

.menu-header {
    text-align: center;
    padding: 20px 10px;
}

.logo-box {
    margin-bottom: 10px;
}

.menu-logo {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.shop-title {
    font-size: 24px;
    font-weight: bold;
    margin-top: 5px;
    color: #fff;
}

.contact-item {
    font-size: 17px;
    margin-top: 12px;
    text-decoration: none;
    color: #fff;
}

    .contact-item a {
        color: #f90d53;
        text-decoration: none;
    }


/* Mobile Optimization */
@media (max-width: 480px) {
    .menu-logo {
        width: 95px;
    }

    .shop-title {
        font-size: 20px;
    }
}