::-webkit-scrollbar {
    width: 3px;
}

::-webkit-scrollbar-track {
    box-shadow: inset 0 0 1px grey;
}

::-webkit-scrollbar-thumb {
    background: #e62222;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e62222;
}

@font-face {
    font-family: Vazir;
    src: url('../vendor/fonts/vazir/Vazir-Regular.eot');
    src: url('../vendor/fonts/vazir/Vazir-Regular.eot?#iefix') format('embedded-opentype'),
        url('../vendor/fonts/vazir/Vazir-Regular.woff2') format('woff2'),
        url('../vendor/fonts/vazir/Vazir-Regular.woff') format('woff'),
        url('../vendor/fonts/vazir/Vazir-Regular.ttf') format('truetype');
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: Vazir;
    src: url('../vendor/fonts/vazir/Vazir-Bold.eot');
    src: url('../vendor/fonts/vazir/Vazir-Bold.eot?#iefix') format('embedded-opentype'),
        url('../vendor/fonts/vazir/Vazir-Bold.woff2') format('woff2'),
        url('../vendor/fonts/vazir/Vazir-Bold.woff') format('woff'),
        url('../vendor/fonts/vazir/Vazir-Bold.ttf') format('truetype');
    font-weight: bold;
    font-display: swap;
}

@font-face {
    font-family: Vazir;
    src: url('../vendor/fonts/vazir/Vazir-Thin.eot');
    src: url('../vendor/fonts/vazir/Vazir-Thin.eot?#iefix') format('embedded-opentype'),
        url('../vendor/fonts/vazir/Vazir-Thin.woff2') format('woff2'),
        url('../vendor/fonts/vazir/Vazir-Thin.woff') format('woff'),
        url('../vendor/fonts/vazir/Vazir-Thin.ttf') format('truetype');
    font-weight: 100;
    font-display: swap;
}

@font-face {
    font-family: Vazir;
    src: url('../vendor/fonts/vazir/Vazir-Light.eot');
    src: url('../vendor/fonts/vazir/Vazir-Light.eot?#iefix') format('embedded-opentype'),
        url('../vendor/fonts/vazir/Vazir-Light.woff2') format('woff2'),
        url('../vendor/fonts/vazir/Vazir-Light.woff') format('woff'),
        url('../vendor/fonts/vazir/Vazir-Light.ttf') format('truetype');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: Vazir;
    src: url('../vendor/fonts/vazir/Vazir-Medium.eot');
    src: url('../vendor/fonts/vazir/Vazir-Medium.eot?#iefix') format('embedded-opentype'),
        url('../vendor/fonts/vazir/Vazir-Medium.woff2') format('woff2'),
        url('../vendor/fonts/vazir/Vazir-Medium.woff') format('woff'),
        url('../vendor/fonts/vazir/Vazir-Medium.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: Vazir;
    src: url('../vendor/fonts/vazir/Vazir-Black.eot');
    src: url('../vendor/fonts/vazir/Vazir-Black.eot?#iefix') format('embedded-opentype'),
        url('../vendor/fonts/vazir/Vazir-Black.woff2') format('woff2'),
        url('../vendor/fonts/vazir/Vazir-Black.woff') format('woff'),
        url('../vendor/fonts/vazir/Vazir-Black.ttf') format('truetype');
    font-weight: 900;
    font-display: swap;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

body {
    background-color: #ffffff;
    color: #1a1a2e;
}

body.dark {
    background-color: #0a0c10;
    color: #f8f9fc;
}


body.dark .top-header {
    display: block;
}

body.dark .nav-link {
    width: 40px;
    height: 40px;
    background: #e32424;
    display: inline-block;
    text-align: center;
    line-height: 35px;
    background: #960713;
    background: radial-gradient(circle, #960713 0%, #4b0707 125%);
}

body.dark {
    background: #AC0916;
    background: radial-gradient(circle,rgba(172, 9, 22, 1) 0%, rgba(106, 9, 17, 1) 100%);
    background: #960713;
    background: radial-gradient(circle, #000 0%, #6d181f 125%);
}


.food-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.18);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

body.dark .food-card {
    background: #710000;
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.category-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.18);
    color: #1a1a2e;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

body.dark .category-btn {
    background: #710000;
    border-color: rgba(255, 255, 255, 0.18);
    color: #f8f9fc;
}

.subcategory-tab {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.18);
    color: #1a1a2e;
}

body.dark .subcategory-tab {
    background: #1e1e1e;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f8f9fc;
}

.search-input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
    width: 100%;
    font-weight: bold;
}

body.dark .search-input {
    background: #710000;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f8f9fc;
}

.btn-add {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
}

body.dark .btn-add {
    background: rgb(255 0 0);
    border-color: rgba(255, 255, 255, 0.15);
    color: #f8f9fc;
    margin: 0 auto 0 0;
    text-align: center !important;
}

.quantity-control {
    background: rgba(0, 0, 0, 0.05);
}

body.dark .quantity-control {
    background: rgba(255, 255, 255, 0.12);
}

.quantity-control span {
    color: #1a1a2e;
}

body.dark .quantity-control span {
    color: #f8f9fc;
}

.food-title strong {
    color: #1a1a2e;
}

body.dark .food-title strong {
    color: #f8f9fc;
}

.desc {
    color: #555;
}

body.dark .desc {
    color: #aaa;
}

.old-price {
    color: #888;
}

body.dark .old-price {
    color: #aaa;
}

.subitem-row {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.05);
}

body.dark .subitem-row {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.06);
}

.subitem-name {
    color: #333;
}

body.dark .subitem-name {
    color: #ddd;
}

.categories-sidebar::-webkit-scrollbar,
.subcategories-wrapper::-webkit-scrollbar {
    display: none;
}

.categories-sidebar,
.subcategories-wrapper {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.top-header {
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    transition: all 0.3s;
}

body.dark .top-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    background: #960713;
    background: linear-gradient(350deg,rgba(150, 7, 19, 1) 0%, rgba(99, 6, 13, 1) 35%, rgba(208, 159, 88, 1) 100%);
    background: #960713;
    background: linear-gradient(160deg,rgba(150, 7, 19, 1) 0%, rgba(99, 6, 13, 1) 35%, rgba(208, 159, 88, 1) 100%);
    background: #960713;
    background: radial-gradient(circle, #000 0%, #960713 125%);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    display: block;
    text-align: center;
}

.logo-area img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 10px;
}

.logo-area h2 {
    font-size: 1.2rem;
    font-weight: bold;
}

.nav-buttons {
    display: block;
    gap: 2px;
    align-items: center;
    text-align: center;
}

.nav-link {
    background: transparent;
    border: none;
    padding: 6px 8px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Vazir';
    font-size: 1.1rem;
    transition: all 0.2s;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-decoration: none;
}

body.dark .nav-link {
    color: #ccc;
}

.nav-link i {
    font-size: 1.2rem;
}

.nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -5px;
    background: #e12121;
    color: white;
    border-radius: 30px;
    padding: 2px 6px;
    font-size: 0.6rem;
    min-width: 18px;
    text-align: center;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 15px;
    text-align: center;
}

.search-container {
    padding: 12px 20px;
    background: transparent;
}

.search-input {
    max-width: 100%;
    margin: 0 auto;
    display: block;
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    font-family: 'Vazir';
    font-size: 0.9rem;
    text-align: right;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 123, 44, 0.2);
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px;
}

.menu-layout {
    display: flex;
    gap: 5px;
}

.menu-layout.categories-right {
    flex-direction: row;
}

.menu-layout.categories-left {
    flex-direction: row-reverse;
}

.categories-sidebar {
    width: 95px;
    flex-shrink: 0;
    height: fit-content;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    position: sticky;
    top: 65px;
    transition: all 0.3s ease;
}

.menu-layout.horizontal {
    flex-direction: column;
}

.menu-layout.horizontal.categories-right,
.menu-layout.horizontal.categories-left {
    flex-direction: column;
}

.menu-layout.horizontal .categories-sidebar {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    position: static;
    margin-bottom: 15px;
    white-space: nowrap;
}

.menu-layout.horizontal .categories-list {
    display: inline-flex;
    flex-direction: row;
    gap: 8px;
    padding: 5px 0px 5px 0px;
}

.menu-layout.horizontal .category-btn {
    display: inline-flex;
    min-width: 70px;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.category-btn {
    backdrop-filter: blur(20px);
    padding: 5px 2px;
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-weight: 600;
    font-size: 0.75rem;
    font-family: 'Vazir';
    transition: all 0.2s;
}

.category-btn img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.category-btn.active {
    background: var(--primary-color);
    color: white !important;
    border-color: transparent;
}

.items-wrapper {
    flex: 1;
    min-width: 0;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

body[dir="ltr"] .category-header {
    padding-left: 5px;
    padding-right: 0;
}

body[dir="rtl"] .category-header {
    padding-right: 5px;
    padding-left: 0;
}

.category-title {
    font-size: 1.3rem;
    font-weight: bold;
}

.category-bar {
    width: 4px;
    height: 28px;
    background-color: var(--primary-color);
    border-radius: 4px;
}

.subcategories-wrapper {
    margin-bottom: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    display: none;
}

.subcategories-wrapper[data-category] {
    display: none;
}

.subcategories-bar {
    display: inline-flex;
    gap: 6px;
    padding: 4px 0;
}

.subcategory-tab {
    padding: 6px 16px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: 'Vazir';
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.subcategory-tab.active {
    background: var(--primary-color);
    color: white !important;
    border-color: transparent;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.food-card {
    border-radius: 18px;
    overflow: hidden;
    transition: none;
    display: flex;
    flex-direction: column;
}

.card-img {
    display: none;
}

.food-card.has-image .card-img {
    display: block;
    height: 140px;
    position: relative;
    overflow: hidden;
}

body.dark .food-card.has-image .card-img {
    background: #0d0f14;
}

.food-card.has-image .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
}

.card-content {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.food-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 6px;
    gap: 5px;
    text-align: center;
    display: block;
}

.food-title strong {
    font-size: 1.0rem;
    font-weight: bold;
    font-family: 'Vazir';
}

.price-section {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin: 3px 0;
}

.current-price {
    font-weight: bold;
    font-size: 0.95rem;
    font-family: 'Vazir';
    color: #e67e22;
}

body.dark .current-price {
    color: #e67e22;
}

.old-price {
    text-decoration: line-through;
    font-size: 0.6rem;
    opacity: 0.6;
    font-family: 'Vazir';
}

.discount-percent {
    background: rgba(230, 57, 70, 0.85);
    padding: 2px 6px;
    border-radius: 30px;
    font-size: 0.55rem;
    font-weight: bold;
    font-family: 'Vazir';
    color: white;
}

.desc {
    font-size: 0.65rem;
    opacity: 0.7;
    margin: 3px 0;
    line-height: 1.4;
    font-family: 'Vazir';
}

.subitems-list {
    margin: 6px 0;
}

.subitem-row {
    border-radius: 12px;
    padding: 6px 8px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid;
}

.subitem-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.subitem-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.subitem-details {
    display: flex;
    flex-direction: column;
}

.subitem-name {
    font-weight: 600;
    font-size: 0.75rem;
    font-family: 'Vazir';
}

.subitem-price {
    font-size: 0.65rem;
    font-weight: 500;
    font-family: 'Vazir';
    color: #e67e22;
}

body.dark .subitem-price {
    color: #e67e22;
}

.card-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    align-items: center;
}

.btn-add {
    padding: 6px 14px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.7rem;
    cursor: pointer;
    font-family: 'Vazir';
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-add:hover {
    background: var(--primary-color);
    color: white !important;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 3px;
    border-radius: 50px;
}

.quantity-control button {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: var(--primary-color);
    color: white;
    font-family: 'Vazir';
}

.quantity-control span {
    font-weight: 600;
    min-width: 22px;
    text-align: center;
    font-size: 0.75rem;
    font-family: 'Vazir';
}

.hidden {
    display: none;
}

.search-no-result {
    text-align: center;
    padding: 40px;
    font-size: 1rem;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .categories-sidebar {
        width: 85px;
    }

    .category-btn img {
        width: 35px;
        height: 35px;
    }

    .category-btn {
        font-size: 0.65rem;
        padding: 8px 3px;
    }

    .items-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .top-header {
        padding: 8px 15px;
    }

    .logo-area img {
        width: 40px;
        height: 135px;
        /* box-shadow: 0px 0px 20px #d3a45e; */
        padding: 0 15px;
    }

    .logo-area h2 {
        font-size: 2rem;
    }

    .category-title {
        font-size: 1rem;
    }

    .subitem-img {
        width: 28px;
        height: 28px;
    }
}