/* Core Variables & Colors - Premium Dark Theme */
:root {
    --bg-color: #0d0d0d;
    --bg-gradient: radial-gradient(circle at top, #1f1f2e 0%, var(--bg-color) 60%);
    --card-bg: rgba(25, 25, 35, 0.45);
    --card-border: rgba(255, 215, 0, 0.15);
    --text-primary: #fdfdfd;
    --text-secondary: #a3a3b5;
    --accent-color: #e6c200; /* Rich Gold */
    --accent-hover: #ffdf33;
    --accent-glow: rgba(230, 194, 0, 0.4);
    --nav-bg: rgba(13, 13, 13, 0.85);
    
    --font-main: 'Outfit', sans-serif;
    --border-radius: 20px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset & Basic Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden; /* Added to prevent horizontal sliding */
}

.app-container {
    max-width: 768px; /* Slightly wider for tablets */
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    background: transparent;
    box-shadow: 0 0 40px rgba(0,0,0,0.5); /* Adds depth on desktop */
    overflow-x: hidden; /* Added to prevent horizontal sliding */
}

/* Hero Header */
.hero {
    position: relative;
    height: 320px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    padding-bottom: 2.5rem;
    overflow: hidden;
    background: #000;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.8s ease;
}

.hero:hover .hero-img {
    transform: scale(1.05);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--bg-color);
    filter: blur(20px);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, #0d0d0d 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 2rem;
    animation: fadeInDown 1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.brand-name {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    text-shadow: 0 4px 20px var(--accent-glow);
}

@media (max-width: 480px) {
    .brand-name {
        font-size: 2.3rem;
        letter-spacing: 0;
    }
    .hero {
        height: auto;
        min-height: 360px;
        align-items: center;
        justify-content: center;
        padding-top: 3rem;
        padding-bottom: 2rem;
    }
}

.brand-slogan {
    font-size: 1.15rem;
    font-weight: 300;
    color: #dfdfdf;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.time-status {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #00ff88;
    box-shadow: 0 0 12px #00ff88, 0 0 20px rgba(0, 255, 136, 0.4);
    animation: pulse 2s infinite;
}

/* Sticky Category Navigation */
/* Sticky Category Navigation Container */
.category-nav-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative; /* For pseudo-element fades */
}

.category-nav {
    padding: 0.8rem 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}

/* Subtle Scrollbar for Desktop */
@media (hover: hover) {
    .category-nav {
        scrollbar-width: thin;
        scrollbar-color: var(--accent-color) transparent;
    }
    .category-nav::-webkit-scrollbar {
        height: 3px;
    }
    .category-nav::-webkit-scrollbar-track {
        background: transparent;
    }
    .category-nav::-webkit-scrollbar-thumb {
        background-color: var(--accent-color);
        border-radius: 20px;
    }
}

/* Scrollbar hidden on touch devices */
@media (hover: none) {
    .category-nav {
        scrollbar-width: none;
    }
    .category-nav::-webkit-scrollbar {
        display: none;
    }
}

/* Edge Fades & Indicators - Now on container for fixed positioning */
.category-nav-container::before,
.category-nav-container::after {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--accent-color);
    visibility: hidden;
    opacity: 0;
}

.category-nav-container::before {
    content: '◀';
    left: 0;
    background: linear-gradient(to right, var(--bg-color) 30%, transparent 100%);
    padding-left: 5px;
    justify-content: flex-start;
}

.category-nav-container::after {
    content: '▶';
    right: 0;
    background: linear-gradient(to left, var(--bg-color) 30%, transparent 100%);
    padding-right: 5px;
    justify-content: flex-end;
}

.category-nav-container.show-left::before { 
    visibility: visible;
    opacity: 1; 
}
.category-nav-container.show-right::after { 
    visibility: visible;
    opacity: 1; 
}

.category-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.8rem;
    padding: 0 1.5rem;
    list-style: none;
    width: max-content; /* Critical for centering flex with overflow */
    margin: 0 auto; /* Centers when not overflowing */
}

/* Fixes right padding cut-off on horizontal scroll */
.category-list::after {
    content: '';
    padding-right: 0.1rem;
}

.category-item {
    white-space: nowrap;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    flex-shrink: 0; /* Prevents squishing on mobile */
    user-select: none; /* Premium feel: no accidental text selection on tap */
}

.category-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.category-item:hover::before {
    transform: translateX(100%);
}

.category-item:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.2);
}

.category-item.active {
    background: var(--accent-color);
    color: #111;
    border-color: var(--accent-color);
    box-shadow: 0 6px 20px var(--accent-glow);
    font-weight: 600;
}

/* Menu Main Area */
.menu-container {
    padding: 2rem 1.5rem;
    min-height: 50vh;
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    transition: opacity 0.4s ease;
}

@media (min-width: 600px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Shared State Elements */
.loading-state, .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    grid-column: 1 / -1; /* Span all columns */
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Item Card - Enhanced Glassmorphism */
.menu-card {
    display: flex;
    flex-direction: row;
    gap: 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 1rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

/* Subtle gradient border effect */
.menu-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.menu-card:hover::before {
    opacity: 0.5;
}

.menu-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(35, 35, 45, 0.6);
    border-color: rgba(230, 194, 0, 0.4);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4), 0 0 15px rgba(230, 194, 0, 0.1) inset;
}

.card-image-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.menu-card:hover .card-image {
    transform: scale(1.1);
}

/* Sold Out / Tükendi State */
.menu-card.sold-out {
    filter: grayscale(0.8);
    opacity: 0.85;
    pointer-events: none;
}

.sold-out-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 0.5rem 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    border: 2px solid white;
    letter-spacing: 1px;
}

/* Image Blur-up / Lazy Load */
.card-image.loading {
    filter: blur(20px);
    transform: scale(1.1);
}


.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
    background: rgba(230, 194, 0, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(230, 194, 0, 0.2);
}

.card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    line-height: 1.4;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

/* Add button removed by request */
.add-btn {
    display: none !important;
}


/* Footer */
.bottom-bar {
    text-align: center;
    padding: 3rem 1.5rem 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    background: linear-gradient(to top, #000 0%, transparent 100%);
    position: relative;
    margin-bottom: 0;
    padding-bottom: 2rem;
}

.bottom-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; width: 80%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    70% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

/* Base Linter Fixes */
.brand-name {
    -webkit-background-clip: text;
    background-clip: text;
}



/* Mobile Adjustments for Small Screens */
@media (max-width: 480px) {
    .menu-container {
        padding: 1.5rem 1rem;
    }
    .menu-card {
        padding: 0.8rem;
        gap: 0.8rem;
    }
    .card-image-wrapper {
        width: 85px;
        height: 85px;
    }
    .card-header {
        flex-wrap: wrap; /* Allows price to wrap if title is too long */
        gap: 0.3rem;
    }
    .card-title {
        font-size: 1.05rem;
        width: 100%; /* forces price down if title takes full width, or just let them wrap naturally */
    }
    .card-price {
        font-size: 1rem;
        padding: 0.15rem 0.5rem;
        margin-top: 0.2rem;
    }
    .card-description {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
    }
    .add-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }
    .add-btn span {
        font-size: 1rem;
    }
}

