/* QR Menü - Frontend Stilleri */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    padding-bottom: 100px;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0,0,0,0.08);
    width: 100%;
    position: relative;
}

/* Header */
.menu-header {
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0;
    margin-bottom: 0;
    margin-top: 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.menu-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.menu-header .header-spacer {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    visibility: hidden;
}

.back-button {
    color: white;
    text-decoration: none;
    padding: 0;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.back-button svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 3;
    transition: transform 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.back-button:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.4);
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.back-button:hover svg {
    transform: translate(-50%, -50%) translateX(-2px);
}

.back-button:active {
    transform: translateX(-1px) scale(0.95);
}

.restaurant-logo {
    max-width: 120px;
    max-height: 120px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 4px solid rgba(255,255,255,0.3);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.restaurant-name {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.category-page-title {
    font-size: 2em;
    margin: 0;
    font-weight: 800;
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    letter-spacing: -0.5px;
    text-transform: uppercase;
    width: 100%;
    text-align: center;
}

.restaurant-description {
    font-size: 1em;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    font-style: italic;
}

/* Section Titles */
.section-title {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #333;
    text-align: left;
    font-weight: 600;
    padding: 0 5px;
}

/* Categories Grid */
.categories-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
    margin-bottom: 40px;
    margin-top: 0;
    width: 100%;
}

.categories-section .categories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
}

.category-card {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.category-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
    border-radius: 6px;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.08);
}

/* Overlay for category name */
.category-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 35%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.3) 80%, transparent 100%);
    pointer-events: none;
    border-radius: 0 0 6px 6px;
}

.category-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 20px;
    z-index: 2;
}

.category-info h3 {
    font-size: 1.4em;
    margin-bottom: 0;
    color: white;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    line-height: 1.3;
    letter-spacing: 0.3px;
}

.category-info p {
    display: none;
}

/* Fallback for categories without image */
.category-card > .category-info {
    position: static;
    padding: 30px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card > .category-info h3 {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Category Header */
.category-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.category-banner {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.category-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-title {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.category-description {
    font-size: 1.1em;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

/* Products List */
.products-section {
    padding: 0;
}

.products-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 40px;
}

.product-item {
    background: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    margin-bottom: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.product-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.product-item:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
    border-color: #e0e0e0;
}

.product-item:hover::before {
    opacity: 1;
}

.product-image-wrapper {
    flex-shrink: 0;
    width: 350px !important;
    height: auto !important;
    min-width: 350px !important;
    min-height: 350px !important;
    border-radius: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    box-shadow: none;
    position: relative;
    align-self: stretch;
    display: flex;
    align-items: center;
}

.product-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-item:hover .product-image-wrapper::after {
    opacity: 1;
}

.product-image-wrapper .product-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.product-item:hover .product-image-wrapper .product-image {
    transform: scale(1.08);
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-image-placeholder svg {
    opacity: 0.5;
}

.product-content {
    flex: 1;
    min-width: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 20px;
}

.product-name {
    font-size: 1.5em;
    margin: 0;
    color: #1a1a1a;
    font-weight: 700;
    line-height: 1.4;
    flex: 1;
    letter-spacing: -0.3px;
}

.product-price-main {
    font-size: 1.6em;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: -0.5px;
}

.product-description {
    color: #666;
    margin-bottom: 14px;
    line-height: 1.8;
    font-size: 0.98em;
    max-width: 100%;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: justify;
    text-justify: inter-word;
    text-indent: 20px;
}

.product-price {
    font-size: 1.5em;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 10px;
    letter-spacing: -0.5px;
}

/* Product Portions */
.product-portions {
    margin-top: 14px;
    padding-top: 16px;
    border-top: 2px solid #f5f5f5;
}

.portion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.2s;
}

.portion-item:last-child {
    margin-bottom: 0;
}

.portion-item:hover {
    background: linear-gradient(135deg, #f0f2f5 0%, #e9ecef 100%);
    border-color: #dee2e6;
    transform: translateX(4px);
}

.portion-name {
    font-size: 1em;
    color: #495057;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.portion-price {
    font-size: 1.15em;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    letter-spacing: -0.3px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
    font-size: 1.2em;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    margin: 20px 0;
}

.empty-state p {
    margin: 0;
    font-weight: 500;
    color: #6c757d;
}

/* Footer */
.menu-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    text-align: left;
    margin-top: 30px;
    border-top: 1px solid #e9ecef;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    z-index: 9999 !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.menu-footer p {
    margin: 4px 0;
    color: #6c757d;
    font-size: 0.85em;
    line-height: 1.5;
}

.menu-footer strong {
    color: #495057;
    font-weight: 600;
    margin-right: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    
    .menu-footer {
        padding: 12px 15px !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        max-width: 100% !important;
        position: fixed !important;
        bottom: 0 !important;
        z-index: 9999 !important;
        margin: 0 !important;
    }
    
    .menu-footer p {
        font-size: 0.8em;
        margin: 3px 0;
    }
    
    .menu-container {
        padding-bottom: 120px !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
    
    .menu-header {
        padding: 18px 15px;
        min-height: 56px;
    }
    
    .back-button {
        width: 40px;
        height: 40px;
    }
    
    .back-button svg {
        width: 22px;
        height: 22px;
        stroke-width: 3;
    }
    
    .category-page-title {
        font-size: 1.5em;
    }
    
    .back-button:hover {
        transform: translateY(-50%) scale(1.1);
    }
    
    .category-page-title {
        font-size: 1.5em;
    }
    
    .menu-container {
        padding: 0;
        padding-bottom: 120px !important;
    }
    
    .products-section {
        padding: 0;
    }

    .restaurant-name {
        font-size: 1.8em;
    }

    .section-title {
        font-size: 1.5em;
    }

    .categories-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    .category-card {
        aspect-ratio: 1 / 1;
    }
    
    .category-info h3 {
        font-size: 1.2em;
    }
    
    .product-item {
        flex-direction: column;
        padding: 3px;
        align-items: stretch;
    }
    
    .product-item::before {
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 4px;
    }
    
    .product-image-wrapper {
        width: 100%;
        height: 220px;
        align-self: center;
        max-width: 300px;
    }
    
    .product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .product-price-main {
        align-self: flex-start;
        margin-top: 5px;
    }
    
    .product-description {
        max-width: 100%;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .category-title {
        font-size: 1.8em;
    }

    .back-button {
        position: static;
        display: inline-block;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .restaurant-name {
        font-size: 1.5em;
    }

    .category-title {
        font-size: 1.5em;
    }

    .product-name {
        font-size: 1.2em;
    }

    .product-price {
        font-size: 1.5em;
    }
}

