* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    background-image: radial-gradient(
        ellipse at 50% 0%,
        var(--gold-glow) 0%,
        transparent 60%
    );
    background-attachment: fixed;
}

.nav-pill-custom img {
    width: 20px;
}

.brand-serif {
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 2px;
}

/* Header */
.top-bar {
    padding: 30px 15px 15px;
    text-align: center;
}

.brand-name {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.brand-tagline {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    opacity: 0.75;
}

/* Sticky Nav */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 999;
    background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 10px 0;
}

.nav-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-pill-custom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
    transition: all 0.25s ease;
    scroll-margin-inline: 16px;
}

.nav-pill-custom:hover,
.nav-pill-custom.active {
    color: var(--bg-primary);
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 12px var(--gold-glow);
}

/* Section Title */
.category-header {
    text-align: center;
    padding: 40px 0 20px;
    scroll-margin-top: 60px;
}

.category-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.category-header h2::before,
.category-header h2::after {
    content: "";
    width: 35px;
    height: 1px;
    background: var(--gold);
}

.category-header span {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--gold);
    text-transform: uppercase;
    font-family: 'Cormorant Garamond', serif;
}

/* Dish Card */
.dish-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
}

.dish-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.dish-thumb-box {
    width: 90px;
    height: 90px;
    min-width: 90px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    background: var(--bg-primary);
}

.dish-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dish-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dish-name-fa {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dish-name-en {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    line-height: 1.1;
}

.dish-desc-fa {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* Price column */
.dish-price-column {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    min-width: 78px;
    padding-inline-start: 6px;
    border-inline-start: 1px solid var(--border-subtle);
}

.dish-price-row {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}

.dish-price-label {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.dish-price-val {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--gold);
    white-space: nowrap;
}

/* Modal */
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    color: var(--text-main);
}

.modal-dish-img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
}

/* Modal price list */
.modal-price-list {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 10px 14px;
}

.modal-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.modal-price-item:not(:last-child) {
    border-bottom: 1px dashed var(--border-subtle);
}

/* Footer */
.site-footer {
    background: linear-gradient(
        180deg,
        transparent 0%,
        var(--bg-card) 40%,
        var(--bg-primary) 100%
    );
    border-top: 1px solid var(--border-subtle);
    margin-top: 60px;
    padding: 35px 0 20px;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-link:hover {
    color: var(--gold);
}

.extra-small {
    font-size: 0.75rem;
}

.ltr-text {
    direction: ltr;
    display: inline-block;
}

.footer-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease-in-out;
}

.footer-interactive:hover {
    background: var(--bg-card-hover);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.footer-card-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    background: var(--gold-glow);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.instagram-pill-btn {
    background: var(--instagram-gradient);
    color: var(--text-main) !important;
    border: none;
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.instagram-pill-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(220, 39, 67, 0.4);
    color: var(--text-main);
}

.footer-divider {
    border-color: var(--border-subtle);
}

.text-muted {
    --bs-text-opacity: 1;
    color: var(--text-muted) !important;
}

.modal-header .btn-close {
    position: absolute;
    left: 10px;
}

/* Logo and header */
.brand-logo-img {
    width: 180px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px var(--shadow-color));
}

@media (min-width: 768px) {
    .brand-logo-img {
        width: 180px;

    }

    .brand-name {
        font-size: 2rem;
    }

    .brand-tagline {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .brand-logo-img {
        width: 120px;

    }
    .dish-thumb-box {
        width: 75px;
        height: 75px;
        min-width: 75px;
    }

    .brand-name {
        font-size: 2rem;
    }

    .dish-price-column {
        min-width: 70px;
    }

    .dish-price-val {
        font-size: 0.85rem;
    }
}

/* Sold out */
.dish-card.is-soldout {
    opacity: 0.65;
    filter: grayscale(40%);
    position: relative;
}

.dish-card.is-soldout .dish-thumb-box::after {
    content: "ناموجود";
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--danger);
    color: var(--danger-text);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.dish-soldout-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: var(--danger-text);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
}

/* Service alert */
.service-alert {
    background: linear-gradient(135deg, var(--bg-card-hover), var(--bg-card));
    border: 1px solid var(--border-subtle);
    border-right: 4px solid var(--gold);
    border-radius: 12px;
    padding: 14px 18px;
    margin-top: 15px;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px var(--shadow-color);
}

/* Instagram and nav scrollbars */
.sticky-nav .nav-track {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sticky-nav .nav-track::-webkit-scrollbar {
    display: none;
}

     /* پس‌زمینه موقت تصویر غذا */
 .dish-thumb-box {
     background-color: var(--bg-card);
     overflow: hidden;
     display: flex;
     align-items: center;
     justify-content: center;
 }

.dish-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* دکمه بازگشت به بالا */
#btnBackToTop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bg-card);
    color: var(--gold);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease,
        transform 0.3s ease,
        background-color 0.2s ease;
    box-shadow: 0 4px 14px var(--shadow-color);
}

#btnBackToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#btnBackToTop:hover {
    background-color: var(--gold);
    color: var(--bg-primary);
    border-color: var(--gold);
}

/* بازنویسی کلاس‌های روشن بوت‌استرپ برای تم جدید */
.text-light {
    --bs-text-opacity: 1;
    color: var(--text-main) !important;
}

/* در صورت استفاده از text-white در بخش‌های قالب */
.text-white {
    --bs-text-opacity: 1;
    color: var(--text-main) !important;
}
.text-white-50  {
    --bs-text-opacity: 1;
    color: var(--text-main) !important;
}
.modal-content {
    background: var(--bg-primary);

}
.modal-header .btn-close {
    color: #eee !important;

}
.cat-nav-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* حالت عادی تب */
.cat-nav-icon-mask {
    background-color: var(--text-muted);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: background-color 0.2s ease;
}

/* حالت هاور و تب انتخاب‌شده: رنگ آیکون همرنگ متن دکمه می‌شود */
.nav-pill-custom:hover .cat-nav-icon-mask,
.nav-pill-custom.active .cat-nav-icon-mask {
    background-color: var(--bg-primary);
}
