﻿@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: #1a1a1a;
    color: #e8e8e8;
    min-height: 100vh;
    padding: 0;
    direction: rtl;
}

/* ===== هدر ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 14px 20px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.btn-back {
    background: rgba(212, 175, 55, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 8px;
    padding: 10px 20px;
    color: #d4af37;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

    .btn-back:hover {
        background: rgba(212, 175, 55, 0.25);
        transform: scale(1.03);
        box-shadow: 0 4px 25px rgba(212, 175, 55, 0.15);
    }

    .btn-back svg {
        width: 22px;
        height: 22px;
        fill: currentColor;
    }

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-badge {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 8px;
    padding: 10px 20px;
    color: #d4af37;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    position: relative;
}

    .cart-badge:hover {
        background: rgba(212, 175, 55, 0.25);
        transform: scale(1.03);
        box-shadow: 0 4px 25px rgba(212, 175, 55, 0.15);
    }

.cart-count {
    background: #d4af37;
    color: #1a1a1a;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

/* ===== دسته‌بندی‌ها ===== */
.categories-nav {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 6px 0 8px 0;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

    .categories-nav::-webkit-scrollbar {
        display: none;
    }

.category-btn {
    flex: 0 0 auto;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(212, 175, 55, 0.15);
    border-radius: 10px;
    color: #c8c8c8;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
}

    .category-btn.active {
        background: #d4af37;
        border-color: #d4af37;
        color: #1a1a1a;
        box-shadow: 0 4px 30px rgba(212, 175, 55, 0.3);
    }

    .category-btn:hover {
        background: rgba(212, 175, 55, 0.15);
        transform: translateY(-2px);
        color: #d4af37;
    }

    .category-btn.active:hover {
        background: #c49a2e;
        color: #1a1a1a;
        transform: translateY(-2px);
    }

/* ===== محتوای اصلی ===== */
.container {
    max-width: 950px;
    margin: 0 auto;
    padding: 24px 20px 100px 20px;
}

.menu-container {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 8px 50px rgba(0, 0, 0, 0.4);
}

/* ===== گروه‌ها ===== */
.group-holder {
    margin-bottom: 70px;
    scroll-margin-top: 120px;
}

.group-anchor {
    scroll-margin-top: 130px;
    display: block;
    height: 0;
}

.category-section {
    margin-bottom: 0;
}

/* ===== عنوان دسته ===== */
.category-title {
    color: #f0e6d3;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 16px;
    margin-bottom: 32px;
    font-size: 1.8em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 14px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

    .category-title i {
        color: #d4af37;
        font-size: 1.3em;
    }

/* ===== آیتم‌ها ===== */
.menu-items {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.menu-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    height: 380px;
    width: 100%;
    background: #252525;
    border: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
}

    .menu-item:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 60px rgba(212, 175, 55, 0.15), 0 4px 30px rgba(0, 0, 0, 0.4);
        border-color: #d4af37;
    }

    .menu-item:not(:last-child) {
        margin-bottom: 0;
    }

.item-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    background-color: #2a2a2a;
}

    .item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        display: block;
        opacity: 0;
        animation: fadeInImage 0.6s ease forwards;
        filter: brightness(0.9) contrast(1.05);
    }

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(1.05);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.menu-item:hover .item-image img {
    transform: scale(1.08);
    filter: brightness(1) contrast(1.1);
}

/* اوورلی تیره‌تر */
.item-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* ===== اطلاعات روی تصویر ===== */
.item-content {
    position: absolute;
    bottom: 28px;
    left: 28px;
    right: 28px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: right;
}

.item-name {
    font-size: 1.8em;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.7);
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.item-description {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.05em;
    line-height: 1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 90%;
}

.item-recipe {
    font-size: 0.95em;
    color: #ffd700;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 16px;
    border-radius: 6px;
    border-right: 3px solid #d4af37;
    backdrop-filter: blur(8px);
    display: inline-block;
    margin-top: 2px;
}

.item-price {
    font-size: 1.6em;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 2px 25px rgba(0, 0, 0, 0.6);
    direction: ltr;
    margin-top: 2px;
}

/* ===== مودال ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 30px 20px;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

    .modal.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    width: 48px;
    height: 48px;
    color: #d4af37;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    z-index: 10;
}

    .modal-close:hover {
        background: rgba(212, 175, 55, 0.25);
        transform: rotate(90deg);
    }

.modal-image {
    width: 100%;
    max-width: 500px;
    max-height: 50vh;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 2px solid rgba(212, 175, 55, 0.15);
    background-color: #2a2a2a;
}

.modal-info {
    width: 100%;
    max-width: 500px;
    text-align: right;
    color: #e8e8e8;
}

    .modal-info .item-name {
        font-size: 1.8em;
        margin-bottom: 8px;
        color: #ffffff;
        text-shadow: none;
    }

    .modal-info .item-description {
        font-size: 1.05em;
        color: #cccccc;
        margin-bottom: 8px;
        text-shadow: none;
        -webkit-line-clamp: unset;
        max-width: 100%;
    }

    .modal-info .item-recipe {
        font-size: 0.95em;
        margin-bottom: 12px;
        color: #d4af37;
        background: none;
        border-right: none;
        backdrop-filter: none;
        padding: 0;
        text-shadow: none;
    }

    .modal-info .item-price {
        font-size: 1.8em;
        color: #ffd700;
        text-shadow: none;
    }

        .modal-info .item-price::after {
            color: #aaa;
        }

.modal-add-to-cart {
    margin-top: 20px;
    width: 100%;
    max-width: 500px;
    padding: 16px;
    background: #d4af37;
    border: none;
    border-radius: 10px;
    color: #1a1a1a;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

    .modal-add-to-cart:hover {
        background: #c49a2e;
        transform: scale(1.02);
        box-shadow: 0 4px 30px rgba(212, 175, 55, 0.4);
    }

/* ===== سبد خرید (پنل کناری) ===== */
.cart-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: #1e1e1e;
    backdrop-filter: blur(20px);
    z-index: 3000;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 24px;
    overflow-y: auto;
    border-left: 2px solid rgba(212, 175, 55, 0.15);
    box-shadow: -4px 0 50px rgba(0, 0, 0, 0.5);
}

    .cart-panel.open {
        right: 0;
    }

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2999;
    display: none;
}

    .cart-overlay.open {
        display: block;
    }

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.15);
    margin-bottom: 18px;
}

    .cart-header h2 {
        font-size: 1.5em;
        color: #d4af37;
    }

.cart-close {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 10px;
    width: 44px;
    height: 44px;
    color: #d4af37;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

    .cart-close:hover {
        background: rgba(212, 175, 55, 0.2);
        transform: rotate(90deg);
    }

.cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.06);
}

.cart-item-image {
    width: 65px;
    height: 65px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #2a2a2a;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 1em;
    font-weight: 600;
    color: #e8e8e8;
}

.cart-item-price {
    font-size: 0.9em;
    color: #d4af37;
}

.cart-item-remove {
    background: rgba(200, 50, 50, 0.1);
    border: 1px solid rgba(200, 50, 50, 0.15);
    border-radius: 8px;
    width: 34px;
    height: 34px;
    color: #ff6666;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    flex-shrink: 0;
}

    .cart-item-remove:hover {
        background: rgba(200, 50, 50, 0.2);
        transform: scale(1.1);
    }

.cart-empty {
    text-align: center;
    padding: 50px 0;
    color: #888;
    font-size: 1.2em;
}

.cart-total {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 2px solid rgba(212, 175, 55, 0.15);
    display: flex;
    justify-content: space-between;
    font-size: 1.3em;
    font-weight: 700;
    color: #d4af37;
}

.cart-checkout {
    width: 100%;
    padding: 16px;
    margin-top: 18px;
    background: #d4af37;
    border: none;
    border-radius: 10px;
    color: #1a1a1a;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

    .cart-checkout:hover {
        background: #c49a2e;
        transform: scale(1.02);
        box-shadow: 0 4px 30px rgba(212, 175, 55, 0.4);
    }

/* ===== دکمه فلش بالا ===== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    background: rgba(212, 175, 55, 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4af37;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    font-family: inherit;
}

    .scroll-top.visible {
        opacity: 1;
        transform: translateY(0);
        pointer-events: all;
    }

    .scroll-top:hover {
        background: rgba(212, 175, 55, 0.25);
        transform: scale(1.1);
        box-shadow: 0 4px 30px rgba(212, 175, 55, 0.15);
    }

/* ===== فوتر ===== */
.footer {
    text-align: center;
    padding: 25px;
    margin-top: 40px;
    border-top: 1px solid rgba(212, 175, 55, 0.08);
}

.footer-text {
    color: #666;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

    .footer-text a {
        color: #d4af37;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(212, 175, 55, 0.2);
        padding-bottom: 2px;
    }

        .footer-text a:hover {
            color: #ffd700;
            border-bottom-color: rgba(212, 175, 55, 0.4);
        }

/* ===== ریسپانسیو ===== */
@media (max-width: 768px) {
    .header {
        padding: 12px 16px;
    }

    .btn-back {
        font-size: 14px;
        padding: 8px 16px;
    }

    .cart-badge {
        font-size: 14px;
        padding: 8px 16px;
    }

    .category-btn {
        font-size: 14px;
        padding: 10px 20px;
    }

    .menu-container {
        padding: 18px;
    }

    .menu-item {
        height: 300px;
    }

    .menu-items {
        gap: 28px;
    }

    .item-content {
        bottom: 20px;
        left: 20px;
        right: 20px;
    }

    .item-name {
        font-size: 1.5em;
    }

    .item-description {
        font-size: 0.95em;
    }

    .item-recipe {
        font-size: 0.85em;
    }

    .item-price {
        font-size: 1.4em;
    }

    .category-title {
        font-size: 1.5em;
        padding-bottom: 14px;
        margin-bottom: 26px;
    }

    .container {
        padding: 16px 14px 80px 14px;
    }

    .group-holder {
        margin-bottom: 50px;
    }

    .modal-image {
        max-height: 40vh;
    }

    .modal-info .item-name {
        font-size: 1.5em;
    }

    .modal-info .item-price {
        font-size: 1.5em;
    }

    .scroll-top {
        width: 44px;
        height: 44px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }

    .cart-panel {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .menu-item {
        height: 260px;
    }

    .menu-items {
        gap: 22px;
    }

    .item-content {
        bottom: 16px;
        left: 16px;
        right: 16px;
    }

    .item-name {
        font-size: 1.3em;
    }

    .item-description {
        font-size: 0.85em;
        -webkit-line-clamp: 1;
    }

    .item-recipe {
        font-size: 0.8em;
        padding: 4px 12px;
    }

    .item-price {
        font-size: 1.2em;
    }

    .category-title {
        font-size: 1.3em;
        padding-bottom: 12px;
        margin-bottom: 22px;
    }

    .container {
        padding: 12px 10px 70px 10px;
    }

    .menu-container {
        padding: 14px;
    }

    .group-holder {
        margin-bottom: 40px;
    }

    .category-btn {
        font-size: 13px;
        padding: 8px 16px;
    }

    .btn-back {
        font-size: 13px;
        padding: 6px 14px;
    }

    .cart-badge {
        font-size: 13px;
        padding: 6px 14px;
    }
}

/* ===== استایل‌های قدیمی برای سازگاری ===== */
.goods-group-name {
    display: none;
}

.good-item {
    display: none;
}

.border-bottom {
    border-bottom: 1px solid #dee2e6;
}

.text-white {
    color: #fff;
}

.text-center {
    text-align: center;
}

.pb-2 {
    padding-bottom: 0.5rem;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
}

.position-relative {
    position: relative;
}

.text-start {
    text-align: left;
}

.small {
    font-size: 0.875em;
}

.ex-desc {
    color: #6c757d;
}

.good-price {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: #fff;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.rounded-circle {
    border-radius: 50%;
}

.border {
    border: 1px solid #dee2e6;
}

.w-100 {
    width: 100%;
}

.group-holder {
    display: block;
}
