/* ============================================ */
/* Elegant Theme - Modern & Creative Design */
/* ============================================ */

:root {
    --primary-red: var(--color-primary, #ce1212);
    --dark-bg: var(--color-secondary, #37373f);
    --card-bg: var(--color-card-bg, #2a2a32);
    --text-color: var(--color-text, #ffffff);
    --overlay: var(--color-overlay, rgba(0, 0, 0, 0.75));
    --elegant-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --elegant-shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.5);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
    --border-radius-small: 12px;
}

* {
    box-sizing: border-box;
}

html {
    background-color: transparent !important;
    scroll-behavior: smooth;
}

body {
    background-color: transparent !important;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Tajawal', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.elegent-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ============================================ */
/* Top Bar - Elegant Design */
/* ============================================ */
.top-bar-elegent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.logo-elegent {
    height: 50px;
    display: flex;
    align-items: center;
}

.logo-elegent img {
    height: 100%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Language Selector */
.language-selector-elegent {
    position: relative;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: var(--border-radius-small);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.language-selector-elegent:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.language-selector-elegent .fa-globe {
    color: var(--primary-red);
    font-size: 1.1rem;
}

.language-selector-elegent .current-language {
    font-size: 0.9rem;
    font-weight: 500;
}

.language-selector-elegent .fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.language-selector-elegent:hover .fa-chevron-down {
    transform: rotate(180deg);
}

.language-dropdown-elegent {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-small);
    padding: 8px 0;
    display: none;
    min-width: 140px;
    box-shadow: var(--elegant-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001;
    animation: dropdownFadeIn 0.2s ease;
}

.language-dropdown-elegent.active {
    display: block;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-option-elegent {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
}

.language-option-elegent:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-red);
}

/* Action Buttons */
.action-btn-elegent {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-small);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.action-btn-elegent:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-red);
    color: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.action-btn-elegent i {
    font-size: 1.1rem;
}

/* Search Bar */
.search-bar-elegent {
    display: none;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 280px;
    margin-inline-end: 8px;
}

.search-bar-elegent.active {
    display: flex;
}

.top-actions.search-active #search-btn-elegent {
    display: none;
}

.search-input-elegent {
    flex: 1;
    min-width: 0;
    padding: 10px 16px;
    border-radius: var(--border-radius-small);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.search-input-elegent::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input-elegent:focus {
    outline: none;
    border-color: var(--primary-red);
    background: rgba(0, 0, 0, 0.5);
}

.search-close-elegent {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-small);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.search-close-elegent:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.menu-item-elegent.search-hidden {
    display: none !important;
}

.group-section-elegent.search-empty {
    display: none !important;
}

.category-section-elegent.search-empty {
    display: none !important;
}

/* ============================================ */
/* Category Navigation */
/* ============================================ */
.category-nav-elegent {
    display: flex;
    overflow-x: auto;
    padding: 16px 20px;
    gap: 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: sticky;
    top: 82px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 999;
}

.category-nav-elegent::-webkit-scrollbar {
    display: none;
}

.category-item-elegent {
    min-width: 110px;
    max-width: 110px;
    text-align: center;
    cursor: pointer;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 8px;
    border: 2px solid transparent;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.category-item-elegent:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.category-item-elegent.active {
    border-color: var(--primary-red);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--primary-red) 40%, transparent);
    transform: translateY(-4px);
}

.category-thumb-elegent {
    position: relative;
    width: 100%;
    height: 70px;
    border-radius: var(--border-radius-small);
    overflow: hidden;
    margin-bottom: 8px;
}

.category-thumb-elegent img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-overlay-elegent {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
}

.category-name-elegent {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
}

/* Category nav: button style when scrolled (like group nav) */
.category-nav-elegent.scrolled .category-thumb-elegent {
    display: none;
}

.category-nav-elegent.scrolled .category-item-elegent {
    min-width: auto;
    max-width: none;
    padding: 10px 18px;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-nav-elegent.scrolled .category-item-elegent:hover {
    transform: translateY(-2px);
}

.category-nav-elegent.scrolled .category-item-elegent.active {
    transform: translateY(-2px);
}

.category-nav-elegent.scrolled .category-name-elegent {
    font-size: 0.9rem;
}

.category-nav-elegent.scrolled {
    padding: 12px 20px;
    gap: 12px;
}

/* ============================================ */
/* Menu Container */
/* ============================================ */
#menu-container-elegent {
    scroll-behavior: smooth;
    overflow-y: auto;
    height: calc(100vh - 250px);
    padding: 24px 20px;
}

#menu-container-elegent::-webkit-scrollbar {
    width: 8px;
}

#menu-container-elegent::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 4px;
}

#menu-container-elegent::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

/* Group Navigation */
.group-nav-elegent {
    display: flex;
    overflow-x: auto;
    padding: 12px 20px;
    gap: 12px;
    scrollbar-width: none;
    position: sticky;
    top: 162px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 998;
}

.group-nav-elegent::-webkit-scrollbar {
    height: 4px;
}

.group-nav-elegent::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 2px;
}

.group-nav-elegent::-webkit-scrollbar-track {
    background: transparent;
}

.group-item-elegent {
    background: var(--card-bg);
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--border-radius-small);
    border: 2px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.group-item-elegent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.group-item-elegent.active {
    border-color: var(--primary-red);
    background: color-mix(in srgb, var(--primary-red) 20%, var(--card-bg));
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-red) 30%, transparent);
}

/* Category Section */
.category-section-elegent {
    margin-bottom: 48px;
}

.category-header-elegent {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
}

.category-title-elegent {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    font-family: 'Playfair Display', serif;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    position: relative;
    display: inline-block;
    padding: 0 24px;
}

.category-title-elegent::before,
.category-title-elegent::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
}

.category-title-elegent::before {
    right: 100%;
}

.category-title-elegent::after {
    left: 100%;
}

/* Group Section */
.group-section-elegent {
    margin-bottom: 40px;
}

.group-title-elegent {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 24px 0;
    padding: 12px 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    font-family: 'Playfair Display', serif;
}

/* Menu Items Grid */
.menu-items-grid-elegent {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

@media (min-width: 768px) {
    .menu-items-grid-elegent {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 28px;
    }
}

@media (min-width: 1024px) {
    .menu-items-grid-elegent {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 32px;
    }
}

/* Menu Item Card */
.menu-item-elegent {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--elegant-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.menu-item-elegent:hover {
    transform: translateY(-8px);
    box-shadow: var(--elegant-shadow-hover);
    border-color: var(--primary-red);
}

.item-image-elegent {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.item-image-elegent img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.menu-item-elegent:hover .item-image-elegent img {
    transform: scale(1.1);
}

.item-image-elegent a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.image-overlay-elegent {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.menu-item-elegent:hover .image-overlay-elegent {
    opacity: 1;
}

.image-overlay-elegent i {
    color: #fff;
    font-size: 2rem;
    transform: scale(0.8);
    transition: var(--transition-smooth);
}

.menu-item-elegent:hover .image-overlay-elegent i {
    transform: scale(1);
}

.item-info-elegent {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.item-name-elegent {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    font-family: 'Playfair Display', serif;
}

.item-description-elegent {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 16px 0;
    line-height: 1.6;
    flex-grow: 1;
}

.item-price-elegent {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-red);
    margin-top: auto;
}

/* ============================================ */
/* Scroll to Top Button */
/* ============================================ */
.scroll-to-top-elegent {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    background: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 1000;
    box-shadow: var(--elegant-shadow);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.scroll-to-top-elegent.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top-elegent:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--elegant-shadow-hover);
}

.scroll-to-top-elegent i {
    color: white;
    font-size: 1.3rem;
}

/* ============================================ */
/* Footer */
/* ============================================ */
.footer-elegent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999;
}

.footer-elegent a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.footer-elegent a:hover {
    color: var(--primary-red);
}

/* ============================================ */
/* Modals */
/* ============================================ */
.modal-content-elegent {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--elegant-shadow-hover);
}

.modal-header-elegent {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title-elegent {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    font-family: 'Playfair Display', serif;
}

.btn-close-elegent {
    filter: invert(1);
    opacity: 0.8;
    transition: var(--transition-smooth);
}

.btn-close-elegent:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-body-elegent {
    padding: 24px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

.modal-body-elegent a {
    color: var(--primary-red);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.modal-body-elegent a:hover {
    text-decoration: underline;
}

.wifi-name-elegent,
.wifi-password-elegent {
    font-size: 1.1rem;
    margin: 12px 0;
    font-weight: 500;
}

.wifi-password-elegent {
    color: var(--primary-red);
    font-size: 1.3rem;
    font-weight: 700;
}

/* ============================================ */
/* Responsive Design */
/* ============================================ */
@media (max-width: 767px) {
    .top-bar-elegent {
        padding: 12px 16px;
    }

    .logo-elegent {
        height: 40px;
    }

    .language-selector-elegent {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .language-selector-elegent .current-language {
        display: none;
    }

    .action-btn-elegent {
        width: 40px;
        height: 40px;
    }

    .search-bar-elegent {
        max-width: 100%;
    }

    .search-input-elegent {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .search-close-elegent {
        width: 36px;
        height: 36px;
    }

    .category-nav-elegent {
        top: 64px;
        padding: 12px 16px;
        gap: 12px;
    }

    .group-nav-elegent {
        top: 144px;
        padding: 10px 16px;
    }

    .category-nav-elegent.scrolled + .group-nav-elegent {
        top: 126px;
    }

    .category-item-elegent {
        min-width: 95px;
        max-width: 95px;
    }

    .category-thumb-elegent {
        height: 60px;
    }

    #menu-container-elegent {
        height: calc(100vh - 230px);
        padding: 20px 16px;
    }

    .menu-items-grid-elegent {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .item-image-elegent {
        height: 200px;
    }

    .category-title-elegent {
        font-size: 2rem;
    }

    .group-title-elegent {
        font-size: 1.3rem;
    }

    .scroll-to-top-elegent {
        width: 48px;
        height: 48px;
        bottom: 80px;
        right: 20px;
    }
}

/* RTL Support */
[dir="rtl"] .language-dropdown-elegent {
    right: auto;
    left: 0;
}

[dir="rtl"] .scroll-to-top-elegent {
    right: auto;
    left: 32px;
}

[dir="rtl"] .category-title-elegent::before {
    right: auto;
    left: 100%;
}

[dir="rtl"] .category-title-elegent::after {
    left: auto;
    right: 100%;
}

@media (max-width: 767px) {
    [dir="rtl"] .scroll-to-top-elegent {
        left: 20px;
    }
}
