* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Referans siteden ilham alınan renk paleti */
    --color-background: rgb(245, 245, 245);
    --color-white: rgb(255, 255, 255);
    --color-text: rgb(101, 101, 101);
    --color-text-light: rgb(147, 147, 147);
    --color-accent: rgb(96, 101, 84);
    --color-accent-light: #f0f0f0;
    --color-border: #e5e5e5;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    
    /* Font değişkenleri (referans siteden) */
    --font-display: "EB Garamond", "Cormorant Garamond", serif;
    --font-heading: "Playfair Display", Georgia, serif;
    --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-serif: var(--font-display);
    
    /* Eski değişkenler (geriye dönük uyumluluk) */
    --primary-color: var(--color-accent);
    --secondary-color: #d32f2f;
    --text-color: var(--color-text);
    --text-light: var(--color-text-light);
    --bg-color: var(--color-background);
    --card-bg: var(--color-white);
    --border-color: var(--color-border);
    --shadow: var(--shadow-sm);
}

body {
    font-family: var(--font-sans);
    background: var(--color-background);
    min-height: 100vh;
    color: var(--color-text);
    line-height: 1.5;
    font-size: 16px;
    /* Scroll performansı için */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: transparent; /* Arka plan rengi body'den gelsin */
    min-height: 100vh;
    /* Scroll performansı için */
    contain: layout style;
    will-change: scroll-position;
}

.header {
    text-align: center;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: none;
}

.header-content {
    background: transparent;
    padding: 0;
}

.header-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.restaurant-logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.restaurant-logo-container.visible {
    margin-bottom: 15px;
}

.restaurant-logo-container.visible ~ .restaurant-info .restaurant-name {
    font-size: 1.8rem;
    margin-top: 0;
}

.restaurant-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    border-radius: 0;
    display: block;
    margin: 0 auto;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.restaurant-logo:hover {
    opacity: 0.8;
}

@media (min-width: 768px) {
    .header {
        margin-bottom: 2rem;
    }
    
    .restaurant-logo {
        height: 60px;
    }
}

@media (min-width: 1024px) {
    .header {
        padding: 2rem 0;
    }
    
    .restaurant-logo {
        height: 70px;
    }
}

.restaurant-info {
    width: 100%;
    text-align: center;
}

.restaurant-info:empty,
.restaurant-info[style*="display: none"] {
    display: none !important;
}

.restaurant-name {
    font-family: 'Playfair Display', 'EB Garamond', 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.restaurant-tagline {
    font-size: 1rem;
    color: var(--color-text-light);
    font-weight: 400;
}

.main-content {
    margin-bottom: 30px;
}

.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-color);
}

.menu-container {
    display: flex;
    flex-direction: column;
}

/* Tab Sistemi */
.tab-system {
    width: 100%;
}

.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: none;
    margin: 1rem auto;
    padding-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox - scrollbar gizle */
    -ms-overflow-style: none; /* IE ve Edge - scrollbar gizle */
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 800px;
}

.tab-nav::-webkit-scrollbar {
    display: none; /* Scrollbar gizle ama scroll çalışsın */
    width: 0;
    height: 0;
}

.tab-button {
    padding: 0.75rem 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 33%;
    flex: 1;
}

.tab-button .category-icon {
    width: 100%;
    height: 40px;
    object-fit: contain;
    opacity: 0.7;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.tab-button:hover .category-icon,
.tab-button.active .category-icon {
    opacity: 1;
}

.tab-button:hover .category-icon {
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .tab-nav {
        max-width: 1200px;
        margin: 1.5rem auto;
        gap: 0;
    }
    
    .tab-button {
        flex: 1;
        min-width: 120px;
        padding: 0.75rem;
        margin: 0 0.5rem;
    }
    
    .tab-button .category-icon {
        height: 50px;
        margin-bottom: 6px;
    }
    
    .tab-button:hover {
        transform: translateY(-2px);
    }
}

.tab-button.active .category-icon {
    opacity: 1;
}

.tab-content-container {
    position: relative;
    min-height: 400px;
    contain: layout style;
}

.tab-panel {
    display: none;
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.tab-panel.active {
    display: block;
    animation: slideFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideFadeIn {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alt Tab Sistemi */
.sub-tab-system {
    width: 100%;
}

.sub-tab-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem auto;
    padding: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox - scrollbar gizle */
    -ms-overflow-style: none; /* IE ve Edge - scrollbar gizle */
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    max-width: 100%;
    justify-content: flex-start;
}

@media screen and (max-width: 768px) {
    .sub-tab-nav {
        padding: 0 1rem;
    }
}

.sub-tab-nav::-webkit-scrollbar {
    display: none; /* Scrollbar gizle ama scroll çalışsın */
    width: 0;
    height: 0;
}

.sub-tab-button {
    padding: 0.75rem 1.5rem;
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--color-text);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    position: relative;
    box-shadow: var(--shadow-sm);
    flex: 0 0 auto;
    will-change: transform, background-color;
    backface-visibility: hidden;
}

.sub-tab-button:hover {
    background-color: var(--color-accent-light);
}

.sub-tab-button.active {
    color: #fff;
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    font-weight: 400;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translate3d(0, -1px, 0);
}

.sub-tab-button.active:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.sub-tab-content-container {
    position: relative;
    margin-top: 1.5rem;
}

.sub-tab-panel {
    display: none;
    opacity: 0;
    transform: translate3d(-10px, 0, 0);
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.sub-tab-panel.active {
    display: block;
    animation: slideFadeInHorizontal 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideFadeInHorizontal {
    from {
        opacity: 0;
        transform: translate3d(-10px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* 3. Seviye Gruplar (Başlık/Paragraf) */
.nested-groups-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    contain: layout style;
}

/* Section container - referans sitedeki gibi arka plan ve border ile */
.section-content {
    background-color: var(--color-white);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 0;
    contain: layout style paint;
    will-change: contents;
}

.nested-group-header {
    margin-bottom: 15px;
}

.nested-group-header:not(:first-child) {
    margin-top: 2.5rem;
}

.nested-group-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    letter-spacing: 0.5px;
    position: relative;
}

.nested-group-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nested-group-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
    font-style: italic;
}

/* Kompakt Menü İtemleri */
.menu-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    contain: layout style;
}

.menu-item-compact {
    display: flex;
    gap: 15px;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    transition: box-shadow 0.2s ease;
    contain: layout style paint;
    will-change: box-shadow;
}

.menu-item-compact:hover {
    box-shadow: var(--shadow-sm);
}

.item-image-compact {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-color);
    contain: layout style paint;
}

.item-image-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.item-image-placeholder-compact {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    border-radius: 6px;
    background-image: url('../constants/placeholder.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.item-image-placeholder-compact.modal-placeholder {
    height: 100%;
    border-radius: 16px 16px 0 0;
}

.item-content-compact {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    min-width: 0;
}

.item-text {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.item-description {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    font-weight: 400;
}

.item-price-compact {
    flex-shrink: 0;
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #f5f5f5;
    white-space: nowrap;
}

.item-price-compact .currency {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Modal/Popup */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
    will-change: opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

/* Açılış / popup video (config: popupVideo) — tam ekran değil, merkez kart */
.intro-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    opacity: 0;
    transition: opacity 0.2s ease;
    box-sizing: border-box;
}

.intro-video-overlay.show {
    opacity: 1;
}

.intro-video-dialog {
    position: relative;
    width: 100%;
    max-width: min(520px, 100%);
    max-height: min(78vh, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    padding: 10px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.intro-video {
    width: 100%;
    max-height: min(62vh, 520px);
    height: auto;
    border-radius: 10px;
    background: #000;
    vertical-align: middle;
    display: block;
}

.intro-video-close {
    top: 6px;
    right: 6px;
    z-index: 4;
    background: rgba(0, 0, 0, 0.52) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.intro-video-close:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.38) !important;
    color: #fff !important;
    transform: scale(1.05);
}

.intro-video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.intro-video-play:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%) scale(1.03);
}

.intro-video-mute-wrap {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 3;
}

.intro-video-mute-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.intro-video-mute-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.38);
    color: #fff;
    transform: scale(1.05);
}

.intro-video-mute-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.intro-video-svg {
    display: block;
    flex-shrink: 0;
}

.intro-video-svg--hidden {
    display: none;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: all 0.2s ease;
    z-index: 10;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    background: var(--card-bg);
    transform: scale(1.1);
}

.modal-image-container {
    width: 100%;
    min-height: 300px;
    max-height: 500px;
    height: auto;
    overflow: hidden;
    background: var(--bg-color);
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    object-position: center;
}

.modal-info {
    padding: 30px;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.modal-description {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-price {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
    padding: 3px 8px;
    border-radius: 4px;
    background-color: #f5f5f5;
}

/* Modal responsive */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
    }

    .modal-image-container {
        min-height: 250px;
        max-height: 400px;
    }
    
    .modal-image {
        max-height: 400px;
    }

    .modal-title {
        font-size: 1.6rem;
    }

    .modal-info {
        padding: 20px;
    }

    .restaurant-name {
        font-size: 1.8rem;
    }

    .restaurant-logo {
        max-width: 220px;
        max-height: 120px;
    }

    .tab-button {
        font-size: 1.8rem !important;
        padding: 24px 36px;
        letter-spacing: 0.5px;
    }

    .tab-button.active {
        font-size: 1.8rem !important; /* Aynı boyut */
    }

    .sub-tab-button {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }

    .sub-tab-button.active {
        font-size: 0.9rem;
    }

    .nested-group-title {
        font-size: 1.4rem;
    }

    .tab-nav {
        gap: 15px;
        margin-bottom: 40px;
        justify-content: flex-start;
    }

    .sub-tab-nav {
        gap: 0.75rem;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }

    .restaurant-logo {
        max-width: 200px;
        max-height: 110px;
    }
    
    .restaurant-name {
        font-size: 1.6rem;
    }

    .modal-image-container {
        min-height: 200px;
        max-height: 300px;
    }
    
    .modal-image {
        max-height: 300px;
    }

    .modal-title {
        font-size: 1.4rem;
    }

    .tab-button {
        font-size: 1.6rem !important;
        padding: 20px 28px;
        letter-spacing: 0.3px;
    }

    .tab-button.active {
        font-size: 1.6rem !important; /* Aynı boyut */
    }

    .sub-tab-button {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }

    .sub-tab-button.active {
        font-size: 0.9rem;
    }

    .nested-group-title {
        font-size: 1.3rem;
        padding-bottom: 10px;
    }

    .tab-nav {
        margin-bottom: 35px;
        gap: 12px;
        justify-content: flex-start;
    }

    .sub-tab-nav {
        gap: 0.75rem;
        margin-bottom: 0;
    }

    .nested-groups-list {
        gap: 25px;
    }
}

.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.service-fee-notice {
    font-style: italic;
    color: var(--color-text-light);
    font-size: 0.875rem;
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-top: 1.5rem;
    padding-bottom: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    display: block !important;
    width: 100%;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 1;
    background: transparent !important;
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-top: 1px solid var(--color-border) !important;
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .restaurant-name {
        font-size: 1.5rem;
    }

    .restaurant-tagline {
        font-size: 0.9rem;
    }

    .tab-button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .sub-tab-button {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .item-image-compact {
        width: 80px;
        height: 80px;
    }

    .menu-item-compact {
        padding: 10px;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .restaurant-name {
        font-size: 1.3rem;
    }

    .header {
        padding: 20px 10px;
    }

    .tab-button {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .sub-tab-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .item-image-compact {
        width: 70px;
        height: 70px;
    }

    .item-content-compact {
        flex-direction: column;
        gap: 8px;
    }

    .item-price-compact {
        align-self: flex-start;
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Lazy loading için */
.item-image {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.item-image.loaded {
    opacity: 1;
}

