@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
    --primary-bg: rgba(0, 0, 0, 0.1);
    --header-bg: #ffffff;
    --text-primary: #000000;
    --text-secondary: rgba(0, 0, 0, 0.6);
    --overlay: rgba(0, 0, 0, 0.3);
}

html {
    width: 100%;
    height: 100%;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #f5f5f5;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--header-bg);
    height: 5rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.menu-btn:hover {
    opacity: 0.7;
}

.logo {
    max-height: 60px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background 0.3s;
}

.search-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    height: 640px;
    margin-top: 5rem;
    overflow: hidden;
}

.hero-video-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 0;
}

.view-menu-btn {
    background: #ffffff;
    color: #000000;
    padding: 1rem 3rem;
    border-radius: 9999px;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.view-menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Menu Section */
.menu-section {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0.5rem;
    scroll-margin-top: 5rem;
}

/* Category Row */
.category-row {
    width: 100%;
    margin: 0 auto 1rem;
    position: relative;
    display: flex;
    justify-content: center;
}

/* Desktop Sizes */
@media (min-width: 769px) {
    .category-row {
        margin-bottom: 1rem;
    }
    
    .category-single {
        width: 100%;
        height: 400px;
    }
    
    .category-double {
        width: 100%;
        gap: 1rem;
    }
    
    .category-item {
        width: 50%;
        height: 400px;
    }
    
    /* menu6 (Kahve - eski ekmekArasi) desktop */
    .menu6-category {
        flex: 1.5;
        height: 200px;
    }
    
    /* menu5 (Fırın - eski etDoner) desktop */
    .menu5-category {
        width: 400px;
        height: 200px;
    }
    
    .category-media {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* Single Category */
.category-single {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 16px;
    display: block;
    text-decoration: none;
}

.category-single:hover {
    transform: scale(1.02);
}

/* menu1 - KAHVALTI - from prselci.sql */
.menu1-category {
    width: 100%;
    height: 200px;
    border-radius: 16px;
}

.menu1-category .category-media {
    object-position: center 50% !important;
}

/* menu9 - CAĞ KEBABI - Normal size like other categories */
.menu9-category {
    width: 100%;
    height: 200px;
    border-radius: 16px;
}

.menu9-category .category-media {
    object-position: center 64% !important;
}

/* menu11 - İÇECEKLER (eski icecekler) */
.menu11-category {
    flex: 1;
    height: 200px;
    border-radius: 16px;
}

.menu11-category .category-media {
    object-position: center 45% !important;
}

/* menu2 - APERİTİF - from prselci.sql */
.menu2-category {
    flex: 1.5;
    height: 200px;
    border-radius: 16px;
}

.menu2-category .category-media {
    object-position: center 30% !important;
}

/* menu3 - TATLILAR - from prselci.sql */
.menu3-category {
    flex: 1;
    height: 200px;
    border-radius: 16px;
}

.menu3-category .category-media {
    object-position: center 28% !important;
}

/* menu4 - EV YEMEKLERİ - from prselci.sql */
.menu4-category {
    width: 100%;
    height: 200px;
    border-radius: 16px;
}

.menu4-category .category-media {
    object-position: center 28% !important;
}

/* menu6 - KAHVE - from prselci.sql */
.menu6-category {
    flex: 1.5;
    height: 200px;
    border-radius: 16px;
}

.menu6-category .category-media {
    object-position: center center !important;
}

/* menu5 - FIRIN ÜRÜNLERİ - from prselci.sql */
.menu5-category {
    width: 200px;
    height: 200px;
    border-radius: 16px;
}

.menu5-category .category-media {
    object-position: center 40% !important;
}

/* menu7 - SICAK İÇECEKLER - from prselci.sql */
.menu7-category {
    flex: 1;
    height: 200px;
    border-radius: 16px;
}

.menu7-category .category-media {
    object-position: center 64% !important;
}

/* menu8 - SOĞUK İÇECEKLER - from prselci.sql */
.menu8-category {
    flex: 1;
    height: 200px;
    border-radius: 16px;
}

.menu8-category .category-media {
    object-position: center 64% !important;
}

/* Two Categories Side by Side */
.category-double {
    display: flex;
    gap: 1rem;
    width: 100%;
}

/* LEFT LONG: Sol büyük + Sağ küçük */
.category-double.left-long {
    flex-direction: row;
}

/* CENTRED: İki eşit */
.category-double.centred {
    flex-direction: row;
}

.category-double.reverse {
    grid-template-columns: 1fr 2fr;
}

.category-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 16px;
    display: block;
    text-decoration: none;
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.category-item:hover {
    transform: scale(1.02);
}

.category-single {
    display: block;
    text-decoration: none;
}

/* Centered Two Categories */
.category-centered {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    height: 500px;
    width: 100%;
}

/* Category Media */
.category-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: block;
}

video.category-media {
    pointer-events: none;
}

/* Çocuk Menüsü ve İçecekler için Simetrik Düzen */
.symmetric-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    height: 320px;
    width: 100%;
}

/* menu10 - ÇOCUK MENÜSÜ - from prselci.sql */
.menu10-category {
    flex: 1;
    height: 200px;
    border-radius: 16px;
}

.menu10-category .category-media {
    object-position: center center !important;
}

.symmetric-categories .category-item {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 0.5rem;
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 1rem;
    color: white;
    text-align: left;
}

.category-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-transform: uppercase;
    line-height: 1.2;
    word-wrap: break-word;
}

/* menu3 (Tatlilar - eski salata) için dikey yazı */
.menu3-category .category-name {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* menu6 (Kahve - eski ekmekArasi) için dikey yazı */
.menu6-category .category-name {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* menu11 (İçecekler) için özel stil */
.menu11-category .category-overlay {
    padding: 0.75rem;
}

.menu11-category .category-name {
    font-size: 1.25rem;
    line-height: 1.1;
    word-break: break-word;
}

.menu11-category .category-description {
    font-size: 0.75rem;
}

.category-description {
    font-size: 0.875rem;
    opacity: 0.9;
    max-width: 600px;
    line-height: 1.3;
}

/* Footer */
footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary-bg);
    padding: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

.footer-icon {
    width: 9px;
    height: 18px;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--text-primary);
}

/* Modal for Menu Items */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.9);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    position: relative;
}

.modal-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 101;
}

.modal-close:hover {
    background: white;
    color: black;
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.modal-title {
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.menu-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.3s;
}

.menu-item:hover {
    transform: translateY(-5px);
}

.menu-item-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #000;
}

.menu-item-desc {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
}

.menu-item-prices {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.price-group {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        height: 4rem;
    }

    .hero-section {
        height: 100vh;
        min-height: 100vh;
        margin-top: 4rem;
    }

    .view-menu-btn {
        padding: 0.875rem 2.5rem;
        font-size: 1rem;
    }

    .category-double {
        gap: 0.5rem;
    }
    
    .menu-section {
        padding: 0.5rem;
    }
    
    .category-row {
        margin-bottom: 0.5rem;
    }

    .category-name {
        font-size: 1.5rem;
    }

    .category-description {
        font-size: 0.875rem;
    }

    .modal-content {
        padding: 1rem;
    }

    .modal-title {
        font-size: 2rem;
    }

    .menu-items {
        grid-template-columns: 1fr;
    }

    .menu-item {
        padding: 1.5rem;
    }
}

/* Sidebar Menu */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 999;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.close-btn:hover {
    opacity: 0.7;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.sidebar-link {
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: #f5f5f5;
    border-left-color: var(--text-primary);
}

/* Search Modal */
.search-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.search-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2rem;
}

.search-modal-content {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 1rem;
    margin: 0 1rem;
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    position: relative;
    animation: slideDown 0.3s ease;
}

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

.search-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #666;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 10;
}

.search-close:hover {
    background: #f5f5f5;
    color: #000;
}

.search-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.search-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    border: 2px solid #e5e5e5;
    border-radius: 0.75rem;
    outline: none;
    transition: border-color 0.3s;
    font-family: 'Inter', sans-serif;
}

.search-input:focus {
    border-color: #000;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    max-height: calc(100vh - 12rem);
}

.search-section {
    margin-bottom: 1.5rem;
}

.search-section:last-child {
    margin-bottom: 0;
}

.search-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}

.search-result-item:hover {
    background: #f5f5f5;
    transform: translateX(4px);
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 0.25rem;
}

.search-result-subtitle {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.search-result-desc {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.search-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
    font-size: 1rem;
}

.category-result {
    background: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
}

.category-result:hover {
    background: linear-gradient(135deg, #e5e5e5 0%, #d5d5d5 100%);
}

@media (max-width: 768px) {
    .search-modal.active {
        padding-top: 1rem;
    }

    .search-modal-content {
        margin: 0 0.5rem;
        border-radius: 0.75rem;
    }

    .search-input {
        font-size: 1rem;
        padding: 0.875rem;
    }

    .search-results {
        max-height: calc(100vh - 10rem);
    }
}
