a    :root {
    /* --- LIGHT THEME (Varsayılan) --- */
    --bg-body: #f5f5f5;
    --bg-card: #ffffff;
    --bg-secondary: #f5f5f5; /* Sepet itemları, modal içi gri alanlar */
    --text-main: #333333;
    --text-secondary: #666666;
    --text-inverse: #ffffff; /* Buton üzerindeki yazılar */
    
    --border-color: #e0e0e0;
    
    --accent-color: #333333; /* Ana buton rengi (Siyah) */
    --accent-hover: #555555;
    
    --shadow-color: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.12);
    --overlay-bg: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] {
    /* --- DARK THEME --- */
    --bg-body: #121212;
    --bg-card: #1e1e1e;
    --bg-secondary: #2c2c2c;
    --text-main: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-inverse: #121212; /* Koyu tema buton yazısı */
    
    --border-color: #333333;
    
    --accent-color: #ffffff; /* Koyu temada butonlar beyaz */
    --accent-hover: #cccccc;
    
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
    --overlay-bg: rgba(0, 0, 0, 0.7);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: 80px;
    transition: background 0.3s, color 0.3s;
}

/* --- THEME SWITCH STYLES --- */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 26px;
    position: relative;
    width: 50px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    font-size: 12px;
}

.slider:before {
    background-color: #fff;
    bottom: 3px;
    content: "";
    height: 20px;
    left: 3px;
    position: absolute;
    transition: .4s;
    width: 20px;
    z-index: 2;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
    background-color: var(--bg-card); /* Dark modda topun rengi */
}

.icon-sun { opacity: 1; transition: 0.3s; }
.icon-moon { opacity: 1; transition: 0.3s; }

/* --- NAVBAR --- */
.navbar {
    background: var(--bg-card);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-main);
}

.burger-menu {
    width: 30px;
    height: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.burger-menu span {
    width: 100%;
    height: 3px;
    background: var(--text-main);
    border-radius: 3px;
    transition: 0.3s;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* --- MENU OVERLAY --- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: 2px 0 10px var(--shadow-color);
    transition: 0.3s;
    z-index: 200;
    padding: 80px 30px 30px;
}

.menu-overlay.active {
    left: 0;
}

.menu-overlay a {
    display: block;
    padding: 15px 0;
    color: var(--text-main);
    text-decoration: none;
    font-size: 18px;
    border-bottom: 1px solid var(--border-color);
    transition: 0.3s;
}

.menu-overlay a:hover {
    color: var(--text-secondary);
    padding-left: 10px;
}

.overlay-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--overlay-bg);
    display: none;
    z-index: 150;
}

.overlay-bg.active {
    display: block;
}

/* --- CONTAINER & KATEGORİLER --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.categories {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 20px 0;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.categories::-webkit-scrollbar {
    display: none;
}

.category-btn {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 16px;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.3s;
    color: var(--text-main);
}

.category-btn.active {
    background: var(--accent-color);
    color: var(--text-inverse);
    border-color: var(--accent-color);
}

/* --- ÜRÜN GRID --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* --- ÜRÜN KARTI --- */
.product-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: 0.3s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.product-card[data-category] {
    display: block;
}

.product-card.hidden {
    display: none;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-main);
}

.product-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-main);
}

.add-btn {
    background: var(--accent-color);
    color: var(--text-inverse);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
}

.add-btn:hover {
    background: var(--accent-hover);
}

/* Ekstra Data (Gizli) */
.product-extras {
    display: none;
}

/* --- SEPET BUTONU --- */
.cart-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--accent-color);
    color: var(--text-inverse);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 90; /* Navbar'ın altında kalmasın ama modal üstte kalsın */
}

.cart-button:hover {
    transform: scale(1.05);
    background: var(--accent-hover);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3b30; /* Bildirim rengi genellikle sabit kırmızı kalır */
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* --- SEPET MODAL --- */
.cart-modal {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 70vh;
    background: var(--bg-card);
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -4px 20px var(--shadow-color);
    transition: 0.3s;
    z-index: 300;
    display: flex;
    flex-direction: column;
}

.cart-modal.active {
    bottom: 0;
}

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

.cart-header h2 {
    font-size: 24px;
    color: var(--text-main);
}

.close-cart {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 10px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-main);
}

.cart-item-price {
    color: var(--text-secondary);
    font-weight: bold;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.qty-btn {
    background: var(--accent-color);
    color: var(--text-inverse);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--accent-hover);
}

.qty-display {
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    color: var(--text-main);
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-main);
}

.order-btn {
    width: 100%;
    background: var(--accent-color);
    color: var(--text-inverse);
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.order-btn:hover {
    background: var(--accent-hover);
}

.empty-cart {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* --- EXTRAS MODAL --- */
.extras-modal {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 80vh;
    background: var(--bg-card);
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -4px 20px var(--shadow-color);
    transition: 0.3s;
    z-index: 400;
    display: flex;
    flex-direction: column;
}

.extras-modal.active {
    bottom: 0;
}

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

.extras-header h2 {
    font-size: 22px;
    color: var(--text-main);
}

.close-extras {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
}

.extras-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.extras-section {
    margin-bottom: 25px;
}

.extras-section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-main);
}

.extra-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.extra-item:hover {
    background: var(--border-color); /* Hafif koyulaşma efekti için */
}

.extra-item.selected {
    background: var(--accent-color);
    color: var(--text-inverse);
}
.extra-item.selected .qty-display {
    color: black;
}

.extra-item-info {
    flex: 1;
}

.extra-item-name {
    font-weight: bold;
    margin-bottom: 3px;
}

.extra-item-price {
    font-size: 14px;
    color: var(--text-secondary);
}

.extra-item.selected .extra-item-price {
    color: rgba(255, 255, 255, 0.8);
    /* Dark modda eğer buton beyazsa yazı siyah olmalı, burayı duruma göre ayarlamak gerekebilir */
}
[data-theme="dark"] .extra-item.selected .extra-item-price {
    color: rgba(0, 0, 0, 0.7);
}


.extra-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--text-main);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.extra-item.selected .extra-checkbox {
    background: var(--bg-card);
    border-color: var(--bg-card);
}

.extra-checkbox::after {
    content: '✓';
    display: none;
    color: var(--text-main);
    font-weight: bold;
}

.extra-item.selected .extra-checkbox::after {
    display: block;
    color: var(--accent-color);
}

.note-section {
    margin-top: 20px;
}

.note-label {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-main);
}

.note-input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.note-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.extras-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.cancel-extras-btn {
    flex: 1;
    background: var(--bg-secondary);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.cancel-extras-btn:hover {
    background: var(--border-color);
}

.confirm-extras-btn {
    flex: 2;
    background: var(--accent-color);
    color: var(--text-inverse);
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.confirm-extras-btn:hover {
    background: var(--accent-hover);
}

.extras-total {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-main);
}
/* --- MEVCUT SİPARİŞLER (CURRENT ORDERS) STYLES --- */
.current-orders {
    margin-bottom: 30px;
}

.current-orders h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-main);
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: box-shadow 0.3s;
}

.order-item:hover {
    box-shadow: 0 4px 8px var(--shadow-hover);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.order-time {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
}

.order-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-inverse); /* Varsayılan olarak beyaz/koyu tema rengi */
}

/* Durum Renkleri */
.order-status.preparing {
    background-color: #ff9500; /* Turuncu */
}
.order-status.delivered {
    background-color: #34c759; /* Yeşil */
}
.order-status.cancelled {
    background-color: #ff3b30; /* Kırmızı */
}
.order-status.waiting {
    background-color: #007aff; /* Mavi */
}

.order-details {
    margin-bottom: 15px;
}

.product-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.product-qty-name {
    display: flex;
    gap: 10px;
    align-items: center;
}

.product-entry .qty {
    font-weight: bold;
    color: var(--accent-color);
    min-width: 25px;
}

.product-entry .name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

.product-entry .price {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

.extras-notes-list {
    list-style: none;
    padding-left: 15px;
    margin-top: 5px;
    margin-bottom: 10px;
    border-left: 2px solid var(--border-color);
}

.extra-item-display, .note-item {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 3px 0;
}

.note-item {
    font-style: italic;
    color: #007aff; /* Notları biraz daha öne çıkarmak için */
}

.order-footer {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: bold;
    padding-top: 10px;
    border-top: 2px solid var(--border-color);
    color: var(--text-main);
}

.total-amount {
    color: var(--accent-color);
}

.empty-orders {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--bg-secondary);
    border-radius: 10px;
}
/* Dark Theme aktifken logo rengini beyaz yapar */
[data-theme="dark"] .logo img {
    filter: brightness(0) invert(1); 
    /* brightness(0) resmi siyaha çevirir, invert(1) siyahı beyaza çevirir. 
       Bu, koyu renkli logoları beyaz yapmak için idealdir. */
}
/* ... Diğer stiller ... */

/* --- NAVBAR --- */
.navbar {
    background: var(--bg-card);
    /* ... diğer navbar stilleri ... */
}

/* YENİ EKLENECEK KURAL */
[data-theme="dark"] .navbar .logo img {
    filter: brightness(0) invert(1);
}

/* ... Diğer stiller ... */
/* Mevcut style.css içeriğiniz */
/* ... */
/* ... */

/* --- YENİ AKORDİYON STİLLERİ (siparisgoruntule.php'den taşındı) --- */
.accordion {
    border: 1px solid var(--border-color); /* Tema rengine uyumlu hale getirildi */
    border-radius: 8px;
    margin-top: 20px;
    overflow: hidden;
}

.accordion-header {
    background-color: var(--bg-secondary); /* Tema rengine uyumlu hale getirildi */
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s;
}

.accordion-header:hover {
    background-color: var(--border-color); /* Hover efekti */
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: var(--text-main);
}

.accordion-icon {
    font-size: 1.2em;
    transition: transform 0.3s;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding: 0 15px;
    background-color: var(--bg-card); /* İçerik arka planı */
}

.accordion-content.active {
    padding: 15px; /* JS ile max-height ayarlanacak */
}

/* --- DÜZENLENEBİLİR SİPARİŞ ÖĞE STİLLERİ --- */
.editable-item {
    border-bottom: 1px dashed var(--border-color);
    padding: 10px 0;
    display: flex;
    flex-direction: column;
}

.editable-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.item-name {
    font-weight: bold;
    flex: 1;
    color: var(--text-main);
}

.item-price-display {
    min-width: 80px;
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.9em;
    padding: 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-total span:last-child {
    font-weight: bold;
    color: #ff5722; /* Kırmızımsı vurgu rengi sabit bırakıldı */
    font-size: 1.2em;
}

.qty-control {
    display: flex;
    align-items: center;
}

.qty-control button {
    /* Genel .qty-btn stilini kullanıyoruz */
    background: var(--accent-color);
    color: var(--text-inverse);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    padding: 0;
}
.qty-control span {
    color: var(--text-main);
}


.editable-extras-section {
    margin-top: 5px;
    padding-left: 10px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.editable-extra-item {
    margin-bottom: 3px;
}

.editable-note-area {
    margin-top: 10px;
}

.editable-note-area textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
    background: var(--bg-card);
    color: var(--text-main);
    font-family: inherit;
}

.edit-order-footer {
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

.confirm-edit-btn {
    background-color: #4CAF50; /* Yeşil */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

.confirm-edit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.confirm-edit-btn:hover:not(:disabled) {
    background-color: #45a049;
}

.remove-item-btn {
    background-color: transparent;
    color: #ff5722;
    border: none;
    cursor: pointer;
    margin-left: 10px;
    font-weight: bold;
    font-size: 1em;
}