:root {
    --primary-color: #DAA520;
    --secondary-color: #0d0d0d;
    --text-dark: #f8f8f8;
    --text-light: #AAAAAA;
    --border-color: #222222;
    --card-bg: #1a1a1a;
    --shadow-light: 0 4px 12px 0 rgba(0, 0, 0, 0.4);
    --shadow-dark: 0 8px 25px 0 rgba(0, 0, 0, 0.8);
    --unavailable-color: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--secondary-color);
    line-height: 1.6;
    color: var(--text-dark);
    direction: rtl;
    padding-top: 130px; 
    overflow-x: hidden;
    position: relative;
    min-height: 100vh; 
}


body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #0d0d0d;
    /* This creates the pattern using the SVG code directly */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M0 0l40 40L80 0M0 80l40-40 40 40' fill='none' stroke='%23DAA520' stroke-width='0.5' opacity='0.15'/%3E%3C/svg%3E");
    background-attachment: fixed; /* Pattern stays still while menu scrolls */
    line-height: 1.6;
    color: var(--text-dark);
    direction: rtl;
    padding-top: 130px; 
    overflow-x: hidden;
}

/* We can remove the old wing-background image since we have the SVG now */
#wing-background {
    display: none; 
}

/* ------------------ PRELOADER (Splash Screen) ------------------ */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    z-index: 9999;
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* --- UPDATED: Image Logo Styling --- */
.logo-splash-image {
    width: 140px; /* Reduced size for visual balance */
    height: auto;
    object-fit: contain;
    /* Apply similar pulse/shadow effect to the image */
    box-shadow: 0 0 30px rgba(218, 165, 32, 0.9);
    border-radius: 50%; /* If the image is a circle, this helps */
    animation: pulse 2.5s ease-in-out infinite alternate;
}

/* --- OLD: logo-splash removed as it's no longer used for text --- */

@keyframes pulse {
    from {
        transform: scale(1);
        opacity: 1;
    }

    to {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.loading-bar {
    width: 160px; /* Reduced width to match smaller logo */
    height: 3px;
    background-color: var(--border-color);
    margin-top: 25px;
    overflow: hidden;
    border-radius: 2px;
}

.loading-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 50%;
    background-color: var(--primary-color);
    animation: loading 1.5s infinite linear;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}


.nav-item {
    position: relative;
    transition: color 0.3s ease;
}

.nav-item::after {
    content: "";
    position: absolute;
    bottom: -2px;
    right: 0;
    height: 2px;
    width: 0%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-item.active::after {
    width: 100%;
}


html {
    scroll-behavior: smooth;
}

/* ------------------ END PRELOADER ------------------ */
/* ------------------ FIXED HEADER & DROPDOWN ------------------ */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    box-shadow: var(--shadow-dark);
    z-index: 1000; /* High z-index to stay above wings */
}

.header-top {
    display: flex;
    justify-content: center; /* Center the title element */
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative; /* Establish positioning context for dropdown */
}

/* Dropdown Container - ABSOLUTELY POSITIONED FOR PERFECT TITLE CENTERING */
.dropdown-info-container {
    position: absolute; 
    right: 20px; /* Aligned with the header padding */
    top: 50%;
    transform: translateY(-50%); /* Vertical centering */
    z-index: 20; /* Ensure it stays above the title text */
}

.dropdown-toggle-button {
    background: transparent;
    border: none;
    font-size: 1.4rem;
}


.dropdown-toggle-button:hover {
    background-color: #f1c40f;
}

.dropdown-toggle-button span {
    margin-right: 5px;
    transition: transform 0.2s;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-dark);
    padding: 10px;
    z-index: 10;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Individual Buttons Inside Dropdown */
.info-button {
    width: 100%;
    text-align: right;
    background: none;
    border: none;
    padding: 8px 10px;
    font-weight: 400;
    color: var(--text-dark);
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.15s, color 0.15s;
    text-decoration: none;
    font-size: 0.9rem;
}

.info-button:hover {
    background-color: var(--border-color);
    color: var(--primary-color);
}

:root {
    --primary-color: #DAA520;
    --secondary-color: #0d0d0d;
    --text-dark: #f8f8f8;
    --text-light: #AAAAAA;
    --card-bg: #1a1a1a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Vazirmatn', sans-serif; /* Clean, mobile-optimized Persian font */
    background-color: #0d0d0d;
    /* Art Deco SVG Background */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 0l30 30-30 30L0 30z' fill='none' stroke='%23DAA520' stroke-width='0.5' opacity='0.1'/%3E%3C/svg%3E");
    background-attachment: fixed;
    line-height: 1.6;
    color: var(--text-dark);
    direction: rtl;
    /* FIX: Increased padding so items start below the search/nav */
    padding-top: 220px; 
    overflow-x: hidden;
}

.restaurant-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 6vw, 3.2rem);
    font-weight: 900;
    font-style: italic;
    letter-spacing: 1px;

    background: linear-gradient(
        to right, 
        #bf953f 0%, 
        #fcf6ba 25%, 
        #b38728 50%, 
        #fcf6ba 75%, 
        #bf953f 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    animation: continuousShine 3s linear infinite;
    filter: drop-shadow(0 0 8px rgba(218, 165, 32, 0.3));
}


@keyframes continuousShine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}


/* Professional Hamburger Button */
.dropdown-toggle-button {
    width: 36px;
    height: 36px;
    background: transparent;   /* remove yellow */
    border: none;              /* remove square border */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 0;
}

/* Lines */
.hamburger-line {
    width: 20px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animation when active */
.dropdown-toggle-button.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.dropdown-toggle-button.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.dropdown-toggle-button.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}




.floating-call-button {
    position: fixed;
    bottom: 20px; /* slightly higher from bottom */
    left: 20px;   /* slightly inward */
    z-index: 1000;

    display: flex;
    align-items: center;
    gap: 6px; /* smaller gap between icon and text */

    padding: 8px 14px; /* smaller padding */
    border-radius: 40px; /* slightly smaller radius for a compact look */

    text-decoration: none;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px; /* smaller font */
    font-weight: 500;

    color: #fff;

    /* Transparent glass with soft yellow */
    background: rgba(255, 215, 0, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    border: 1px solid rgba(255, 215, 0, 0.25);

    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.25);

    transition: all 0.3s ease;
}

/* Icon smaller */
.floating-call-button i {
    font-size: 14px;
}

/* Hover effect */
.floating-call-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 215, 0, 0.18);
    border: 1px solid rgba(255, 215, 0, 0.45);
    box-shadow: 
        0 8px 25px rgba(255, 215, 0, 0.25);
}

/* Phone Icon */
.floating-call-button i {
    font-size: 1rem;
}


/* Ensure the fixed header is contained */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    z-index: 1000;
}

@keyframes continuousShine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ------------------ (Remaining CSS) ------------------ */
.category-nav {
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    margin-right: 10px;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-item.active {
    color: var(--primary-color);
    font-weight: 700;
    border-bottom-color: var(--primary-color);
}

.nav-icon {
    width: 16px;
    height: 16px;
    margin-left: 5px;
    object-fit: contain;
}

#search-input {
    width: calc(100% - 40px);
    padding: 10px 15px;
    margin: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s;
}

.menu-container {
    padding: 20px;
}

.category-section {
    margin-bottom: 30px;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 8px;

    flex-direction: row-reverse; /* ðŸ”¥ this is the real fix */

    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);

    margin-bottom: 15px;
    padding-bottom: 5px;

    border-bottom: 2px solid var(--primary-color);

    width: fit-content; /* line fits text */
}

.category-title-icon {
    height: 1.1em;
    width: auto;
    object-fit: contain;
}

.item-card {
    display: flex;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 15px;
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.item-card.unavailable {
    opacity: 0.1;
    cursor: default;
}

.item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    margin-left: 15px;
}

.item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.item-description {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.item-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: left;
    direction: ltr;
}

.item-price span {
    font-size: 0.8rem;
    font-weight: 400;
    margin-left: 2px;
    direction: rtl;
}

.unavailable-label {
    color: var(--unavailable-color);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* ------------------ ITEM FOCUS MODAL STYLES ------------------ */
.item-focus-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
    overflow: auto;
}

.item-focus-modal.show {
    display: flex;
}

.focus-card {
    background-color: var(--card-bg);
    color: var(--text-dark);
    padding: 25px;
    border-radius: 15px;
    max-width: 90%;
    width: 450px;
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    box-shadow: 0 0 40px rgba(218, 165, 32, 0.5);
    border: 2px solid var(--primary-color);
    position: relative;
}

.item-focus-modal.show .focus-card {
    transform: scale(1);
    opacity: 1;
}

.focus-image {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: fill;
    border-radius: 10px;
    margin-bottom: 20px;
    cursor: pointer; /* Indicate it is clickable */
    transition: opacity 0.15s;
}

.focus-image:hover {
    opacity: 0.8;
}

.focus-name {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.focus-description {
    color: var(--text-light);
    margin-bottom: 15px;
}

.focus-price {
    margin-top: 15px;
    font-size: 1.5rem;
    color: var(--primary-color);
    direction: ltr;
}

/* ------------------ NEW: IMAGE LIGHTBOX STYLES ------------------ */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); 
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 3000; /* Higher than other modals */
    padding: 20px;
    transition: opacity 0.3s;
    opacity: 0;
    cursor: zoom-out; 
}

.image-lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-image {
    max-width: 95%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(218, 165, 32, 0.6);
}

.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
    overflow: auto;
}

.info-modal.show {
    display: flex;
}

.info-card {
    background-color: var(--card-bg);
    color: var(--text-dark);
    padding: 25px;
    border-radius: 15px;
    max-width: 90%;
    width: 400px;
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    box-shadow: 0 0 40px rgba(218, 165, 32, 0.5);
    border: 2px solid var(--primary-color);
    position: relative;
}

.info-modal.show .info-card {
    transform: scale(1);
    opacity: 1;
}

.info-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.info-content {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

.info-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.info-content a:hover {
    color: #f1c40f;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    z-index: 3010; 
}

.close-button:hover {
    color: var(--primary-color);
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-light);
    font-size: 1.2rem;
}

@media (min-width: 768px) {
    .restaurant-title {
        font-size: 2.2rem;
    }

    .menu-container {
        max-width: 760px;
        margin: 0 auto;
        padding-top: 20px;
    }

    .item-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .restaurant-title {
        font-size: 1.6rem;
        letter-spacing: 0.5px;
    }
}


@media (max-width: 600px) {
    .logo-splash-image {
        width: 100px; 
    }
    
    .loading-bar {
        width: 120px; 
    }
}