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

:root {
    --bg-dark: #0f0f12;
    --bg-card: #18181f;
    --primary: #f59e0b;      /* Warm Amber */
    --primary-hover: #d97706;
    --primary-light: rgba(245, 158, 11, 0.1);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border-color: #27272a;
    --glass-bg: rgba(24, 24, 31, 0.75);
    --glass-border: rgba(255, 255, 255, 0.05);
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 90px; /* Space for sticky cart bar */
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 24px;
    color: var(--primary);
    animation: pulse 2s infinite;
}

.logo-text {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #ffffff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.table-badge {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
}

/* Hero Section */
.hero {
    padding: 50px 20px 60px 20px;
    text-align: center;
    background: radial-gradient(circle at top, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
}

.hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero p {
    color: var(--text-muted);
    font-size: 15px;
    max-width: 400px;
    margin: 0 auto;
}

/* Category Navigation (Horizontal Scroll) */
.categories-nav-wrapper {
    position: sticky;
    top: 65px; /* height of header */
    z-index: 99;
    background: var(--bg-dark);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.categories-nav {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 5px 20px;
    gap: 12px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.categories-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.category-tab {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.category-tab.active, .category-tab:hover {
    background-color: var(--primary);
    color: #000;
    border-color: var(--primary);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* Menu Items Section */
.menu-section {
    padding: 25px 20px;
    scroll-margin-top: 130px; /* Offset for sticky headers */
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    padding-bottom: 6px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 5px;
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 600px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Menu Item Card */
.menu-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.menu-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: var(--shadow-premium);
}

.menu-image-container {
    position: relative;
    width: 100%;
    padding-top: 60%; /* 5:3 Aspect Ratio */
    background-color: #27272a;
    overflow: hidden;
}

.menu-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

.no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    gap: 8px;
}

.no-image-icon {
    font-size: 32px;
    opacity: 0.5;
}

.menu-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.menu-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}

.menu-description {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.menu-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.menu-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.add-btn {
    background-color: var(--primary-light);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: 600;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.add-btn:hover {
    background-color: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
    transform: scale(1.05);
}

/* Floating Cart Bar */
.cart-floating-bar {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.95));
    border-radius: 50px;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
    text-decoration: none;
    color: #000;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.cart-floating-bar:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(245, 158, 11, 0.5);
}

.cart-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-icon-wrapper {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ffffff;
    color: #000;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary);
}

.cart-btn-text {
    font-size: 16px;
}

/* Cart Page / Order Page */
.page-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 0 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
    transition: var(--transition-smooth);
}

.back-link:hover {
    color: var(--primary);
}

.cart-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 25px;
    box-shadow: var(--shadow-premium);
}

.cart-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-info {
    flex-grow: 1;
    margin-right: 15px;
}

.cart-item-name {
    font-weight: 600;
    font-size: 16px;
}

.cart-item-price {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
}

.quantity-controls {
    display: flex;
    align-items: center;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 4px;
    gap: 8px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition-smooth);
}

/* Azaltma (-) Butonu - Yumuşak Kırmızı */
.dec-btn-ajax {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.dec-btn-ajax:hover {
    background-color: #ef4444;
    color: #fff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* Arttırma (+) Butonu - Temalı Turuncu */
.inc-btn-ajax {
    background-color: var(--primary);
    color: #000;
    border: 1px solid var(--primary);
}

.inc-btn-ajax:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.qty-val {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    font-size: 14px;
}

.cart-totals {
    margin-top: 25px;
    background-color: var(--bg-dark);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 18px;
}

.total-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 20px;
}

.btn-primary {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #000;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 25px;
    text-align: center;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
}

/* Success & State Pages */
.state-container {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 64px;
    color: #10b981;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease-out;
}

.info-icon {
    font-size: 64px;
    color: var(--primary);
    margin-bottom: 20px;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }
    100% {
        transform: scale(1);
    }
}

/* Prompt dialog for Table number (if access index.php without table) */
.table-picker-card {
    text-align: center;
    padding: 40px 30px;
    background-color: var(--bg-card);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    margin-top: 40px;
}

.table-input {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 16px;
    text-align: center;
    margin-top: 20px;
    outline: none;
    transition: var(--transition-smooth);
}

.table-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}

/* --- PREMIUM USER INTERFACE ADDITIONS --- */

/* Floating Service Button */
.service-floating-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1001;
    background: linear-gradient(135deg, var(--bg-card), #2a2a35);
    border: 1px solid var(--border-color);
    color: var(--primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: var(--transition-smooth);
    animation: pulse 3s infinite;
}

.service-floating-btn:hover {
    background: var(--primary);
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

/* Modal Overlay & Base */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-premium);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.close-btn {
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
}

.close-btn:hover {
    color: var(--primary);
}

.modal-body {
    padding: 20px 24px;
}

/* Service Request Options */
.service-option {
    display: flex;
    align-items: center;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.service-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.08);
}

.service-option-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 16px;
}

.waiter-color {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.bill-color {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.service-option-info {
    flex-grow: 1;
}

.service-option-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.service-option-info p {
    font-size: 12px;
    color: var(--text-muted);
}

.service-option-arrow {
    color: var(--text-muted);
    font-size: 14px;
    transition: var(--transition-smooth);
}

.service-option:hover .service-option-arrow {
    color: var(--primary);
    transform: translateX(3px);
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 3000;
    color: #000;
    font-weight: 600;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    text-align: center;
    width: 90%;
    max-width: 350px;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Premium Search Card & Filter UI */
.premium-search-card {
    background: linear-gradient(135deg, rgba(24, 24, 31, 0.7), rgba(15, 15, 18, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-premium);
    margin: -35px 20px 25px 20px;
    position: relative;
    z-index: 10;
}

@media (min-width: 1040px) {
    .premium-search-card {
        margin: -35px auto 25px auto;
        max-width: 960px;
    }
}

.search-filter-container {
    padding: 0;
    max-width: 1000px;
    margin: 0 auto;
}

.search-box-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 18px;
}

.search-input {
    width: 100%;
    padding: 14px 44px 14px 48px;
    border-radius: 50px;
    background-color: rgba(9, 9, 11, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    font-size: 15px;
    outline: none;
    transition: var(--transition-smooth);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
    background-color: rgba(9, 9, 11, 0.85);
}

.search-icon-inside {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.search-input:focus ~ .search-icon-inside {
    color: var(--primary);
}

.search-clear-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    display: none;
    transition: var(--transition-smooth);
}

.search-clear-btn:hover {
    color: var(--primary);
}

.filter-tags-wrapper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 5px;
    align-items: center;
}

.filter-tags-wrapper::-webkit-scrollbar {
    display: none;
}

.filter-tag-btn {
    background-color: rgba(9, 9, 11, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-smooth);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Individual modern tag themes */
.filter-tag-btn[data-tag="all"].active {
    background-color: rgba(245, 158, 11, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}

.filter-tag-btn[data-tag="spicy"].active {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #fca5a5;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

.filter-tag-btn[data-tag="vegetarian"].active {
    background-color: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #a7f3d0;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.filter-tag-btn[data-tag="glutenfree"].active {
    background-color: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #93c5fd;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}

.filter-tag-btn[data-tag="vegan"].active {
    background-color: rgba(139, 92, 246, 0.15);
    border-color: #8b5cf6;
    color: #c4b5fd;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.filter-tag-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Card Badge Tags */
.card-tags {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 2;
}

.tag-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
}

.tag-badge.spicy {
    background-color: rgba(239, 68, 68, 0.85);
    color: #fff;
}

.tag-badge.vegetarian {
    background-color: rgba(16, 185, 129, 0.85);
    color: #fff;
}

.tag-badge.glutenfree {
    background-color: rgba(59, 130, 246, 0.85);
    color: #fff;
}

.tag-badge.vegan {
    background-color: rgba(139, 92, 246, 0.85);
    color: #fff;
}

/* Detail Modal Specifics */
.detail-modal-image-container {
    width: 100%;
    height: 220px;
    background-color: #27272a;
    position: relative;
    overflow: hidden;
}

.detail-modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 18px 0;
    background-color: var(--bg-dark);
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.detail-meta-item {
    display: flex;
    flex-direction: column;
}

.detail-meta-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.detail-meta-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

