/* QR Menu Custom Styles */

/* Additional Grid Layout */
.menu-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    align-items: stretch;
}

/* Category Section Styling */
.category-section {
    margin-bottom: 4rem;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.category-section:last-child {
    margin-bottom: 2rem;
}

.category-section.fade-out {
    opacity: 0;
}

.category-section.fade-in {
    opacity: 1;
}

/* Enhanced Menu Item Styling */
.menu-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.menu-item:hover::before {
    opacity: 1;
}

.menu-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Image Container with Aspect Ratio */
.menu-item-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    flex-shrink: 0;
}

.menu-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.menu-item:hover .menu-item-image {
    transform: scale(1.08);
}

/* Resimi olmayan ürünler için stil */
.menu-item:not(:has(.menu-item-image-container)) {
    min-height: auto;
}

.menu-item:not(:has(.menu-item-image-container)) .menu-item-content {
    padding: 2rem 1.8rem;
}

/* Content Styling */
.menu-item-content {
    padding: 1.8rem;
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.menu-item-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.menu-item-description {
    color: #5a6c7d;
    margin-bottom: 1.2rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.menu-item-ingredients {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
    line-height: 1.5;
    padding: 0.8rem;
    background: rgba(0,0,0,0.02);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

/* Enhanced Price Styling */
.menu-item-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    display: inline-block;
    position: relative;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    margin-top: auto;
    align-self: flex-start;
}

.menu-item-price::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
}

/* Loading and Error States */
.loading-spinner {
    text-align: center;
    padding: 3rem;
}

.loading-spinner .loading {
    margin: 0 auto 1rem;
}

.error {
    text-align: center;
    padding: 2rem;
    background: #fee;
    color: #c33;
    border-radius: 10px;
    margin: 2rem 0;
}

.no-items {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.no-items h3 {
    color: #34495e;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.no-items p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Enhanced Category Navigation */
.category-nav li a {
    position: relative;
    overflow: hidden;
}

.category-nav li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.category-nav li a:hover::before {
    left: 100%;
}

/* QR Section Enhancements */
.qr-section {
    position: relative;
    overflow: hidden;
}

.qr-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(102, 126, 234, 0.1) 50%, transparent 60%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.qr-code {
    position: relative;
    z-index: 1;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Print Styles for QR Menu */
@media print {
    body {
        background: white !important;
        font-size: 12pt;
    }
    
    .header {
        background: none !important;
        color: black !important;
        page-break-inside: avoid;
    }
    
    .menu-categories,
    .footer,
    .back-to-top {
        display: none !important;
    }
    
    .menu-item {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        margin-bottom: 20pt;
    }
    
    .menu-item-image {
        max-height: 150pt;
        object-fit: cover;
    }
    
    .menu-item-price {
        background: #f0f0f0 !important;
        color: black !important;
    }
    
    .tag {
        border: 1px solid #ccc !important;
        background: #f9f9f9 !important;
        color: black !important;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e4e4e4;
        --light-bg: #1a1a1a;
        --white: #2c2c2c;
        --border-color: #404040;
    }
    
    body {
        background-color: var(--light-bg);
        color: var(--text-color);
    }
    
    .menu-item {
        background: var(--white);
        border-color: var(--border-color);
    }
    
    .menu-item-title {
        color: var(--text-color);
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .menu-item {
        border: 2px solid #000;
    }
    
    .menu-item-price {
        border: 2px solid #fff;
    }
    
    .tag {
        border: 1px solid #000;
    }
}

/* Focus styles for keyboard navigation */
.category-filter:focus,
.back-to-top:focus {
    outline: 3px solid #ffb700;
    outline-offset: 2px;
}

/* Mobile-first responsive design enhancements */
@media (max-width: 768px) {
    /* Container padding */
    .container {
        padding: 0 10px;
    }
    
    /* Header mobile */
    .header {
        padding: 1.5rem 0;
    }
    
    .header h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    /* Category navigation mobile */
    .menu-categories {
        padding: 0.8rem 0;
        position: relative;
        overflow-x: hidden;
    }
    
    .category-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.5rem;
        justify-content: flex-start;
        padding: 0 10px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .category-nav::-webkit-scrollbar {
        display: none;
    }
    
    .category-nav li a {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        min-width: auto;
        text-align: center;
        border-radius: 20px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* Menu grid mobile */
    .menu-items-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        margin-top: 1.5rem;
    }
    
    /* Menu item mobile */
    .menu-item {
        margin-bottom: 0;
        border-radius: 15px;
    }
    
    .menu-item-image-container {
        height: 200px;
    }
    
    .menu-item-content {
        padding: 1.2rem;
    }
    
    .menu-item:not(:has(.menu-item-image-container)) .menu-item-content {
        padding: 1.5rem 1.2rem;
    }
    
    .menu-item-title {
        font-size: 1.1rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
    
    .menu-item-description {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 0.8rem;
    }
    
    .menu-item-ingredients {
        font-size: 0.8rem;
        padding: 0.6rem;
        margin-bottom: 1rem;
    }
    
    .menu-item-price {
        font-size: 1.1rem;
        padding: 0.6rem 1.2rem;
    }
    
    /* Section title mobile */
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }
    
    /* Menu section mobile */
    .menu-section {
        padding: 2rem 0;
    }
    
    /* Tags mobile */
    .tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        margin-left: 0.3rem;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .container {
        padding: 0 8px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .category-nav {
        padding: 0 8px;
    }
    
    .category-nav li a {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
        min-width: auto;
    }
    
    .menu-item-content {
        padding: 1rem;
    }
    
    .menu-item:not(:has(.menu-item-image-container)) .menu-item-content {
        padding: 1.3rem 1rem;
    }
    
    .menu-item-image-container {
        height: 180px;
    }
    
    .section-title {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
}

/* Large screen optimizations */
@media (min-width: 1400px) {
    .menu-items-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .container {
        max-width: 1400px;
    }
}

/* Tablet landscape optimizations */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .menu-items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Touch-friendly mobile interactions */
@media (max-width: 768px) {
    .category-nav li a {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .menu-item {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Reduce hover effects on touch devices */
    .menu-item:hover {
        transform: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    }
    
    .menu-item:hover .menu-item-image {
        transform: none;
    }
    
    .category-nav li a:hover {
        transform: none;
    }
    
    /* Better spacing for touch */
    .category-nav li {
        margin: 0;
    }
}

/* Menu items load instantly - no animation delays */
