/* Modern QR Menü - Müşteri Tarafı */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FFD700;
    --secondary-color: #FFA500;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --text-color: #333;
    --border-radius: 16px;
    --shadow: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 50px rgba(0,0,0,0.3);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo {
    font-size: 48px;
    animation: bounce 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.header-text h1 {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.header-text p {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

/* Kategoriler - Tab Sistemi */
.categories-container {
    background: #fff;
    padding: 0;
    border-bottom: 3px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Header yoksa kategoriler yukarıda */
.app-header:empty + .categories-container,
body .app-container > .categories-container:first-child {
    top: 0;
}

.categories-scroll {
    display: flex;
    gap: 0;
    min-width: 100%;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 12px;
    background: #fff;
    border: none;
    border-bottom: 3px solid transparent;
    text-decoration: none;
    color: #999;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 12px;
    cursor: pointer;
    min-width: 80px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.category-chip:hover {
    background: #f8f9fa;
    color: var(--text-color);
}

.category-chip.active {
    background: #fff;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    font-weight: 700;
}

.chip-icon {
    font-size: 28px;
    transition: transform 0.3s ease;
}

.category-chip.active .chip-icon {
    transform: scale(1.2);
}

.chip-text {
    font-size: 11px;
    text-align: center;
}

/* Menü İçeriği - Swipe Container */
.menu-content {
    padding: 20px;
    padding-bottom: 80px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.swipe-container {
    position: relative;
    width: 100%;
}

.category-section {
    margin-bottom: 32px;
    display: none;
    animation: slideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.category-section.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
}

.category-icon {
    font-size: 32px;
}

.category-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
}

/* Ürün Listesi */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-item {
    display: flex;
    gap: 16px;
    background: #fff;
    border-radius: var(--border-radius);
    padding: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.product-item:hover::before {
    transform: scaleY(1);
}

.product-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-hover);
}

.product-img {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    background-color: #f0f0f0;
}

.product-img.no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--dark-color);
    line-height: 1.3;
}

.product-description {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: auto;
}

.product-arrow {
    font-size: 24px;
    color: #ccc;
    align-self: center;
    font-weight: 300;
}

/* Modal */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.product-modal.active {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.modal-container {
    position: relative;
    max-width: 480px;
    width: 100%;
    background: #fff;
    border-radius: 24px 24px 0 0;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0,0,0,0.8);
    transform: rotate(90deg);
}

.modal-body {
    padding: 0;
}

.modal-image {
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.modal-content {
    padding: 24px;
}

.modal-category {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.modal-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.modal-description {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 20px;
}

.modal-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

/* Varyasyonlar */
.modal-variations {
    margin: 20px 0;
}

.variation-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.variation-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.variation-group-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
}

.variation-required {
    font-size: 11px;
    color: #ef4444;
    font-weight: 600;
}

.variation-optional {
    font-size: 11px;
    color: #10b981;
    font-weight: 600;
}

.variation-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.variation-free-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 5px;
}

.variation-options {
    display: grid;
    gap: 10px;
}

.variation-option {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.variation-option:hover {
    border-color: var(--primary-color);
    background: #fffef0;
}

.variation-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
}

.variation-option input[type="checkbox"],
.variation-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.variation-option-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 10px;
    flex-shrink: 0;
}

.variation-option-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.variation-option-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
}

.variation-option-price.free {
    color: #10b981;
}

/* Footer */
.app-footer {
    background: var(--dark-color);
    color: #fff;
    text-align: center;
    padding: 24px 20px;
    margin-top: auto;
}

.app-footer p {
    font-size: 13px;
    margin: 4px 0;
    opacity: 0.8;
}

.footer-note {
    font-size: 11px;
    opacity: 0.6;
}

/* Empty State */
.empty-menu {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-menu h3 {
    font-size: 22px;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.empty-menu p {
    color: #666;
    font-size: 15px;
}

/* Responsive */
@media (max-width: 480px) {
    .app-container {
        box-shadow: none;
        max-width: 100%;
    }
    
    .modal-container {
        border-radius: 20px 20px 0 0;
    }
    
    /* Mobil için header sticky olmasın */
    .app-header {
        position: relative;
    }
    
    /* Kategoriler mobilde üstte kalsın */
    .categories-container {
        position: sticky;
        top: 0;
    }
    
    /* Mobilde kategoriler scroll edilebilir */
    .categories-scroll {
        overflow-x: auto;
        justify-content: flex-start;
    }
    
    .category-chip {
        flex: 0 0 auto;
        min-width: 70px;
    }
    
    /* Touch scroll optimizasyonu */
    body, .app-container, .menu-content {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

