/* Elma Coffee Menu System - Main Stylesheet */

:root {
    --primary-color: #2d5016;
    --secondary-color: #d32f2f;
    --accent-color: #c8e6c9;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --bg-light: #f9f9f9;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ff9800;
}

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

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fff;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Genel Stiller */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1e3a0f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #388e3c;
}

/* Alert Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

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

/* Form Stiller */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Tablo Stiller */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.table thead {
    background-color: var(--primary-color);
    color: white;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: var(--bg-light);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Admin Panel Header */
.admin-header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.admin-header p {
    font-size: 14px;
    opacity: 0.9;
}

.admin-nav {
    background-color: #f9f9f9;
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.admin-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.admin-nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
    background-color: var(--primary-color);
    color: white;
}

/* Login Page */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box .logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-box .logo img {
    max-width: 150px;
    height: auto;
}

.login-box h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 24px;
}

/* Public Menu Page */
.menu-header {
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.menu-header .logo {
    margin-bottom: 20px;
}

.menu-header .logo img {
    max-width: 200px;
    height: auto;
    border-radius: 10px;
}

.menu-header h1 {
    color: white;
    font-size: 32px;
    margin-bottom: 10px;
}

.menu-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
}

/* Kategori Sekmeleri */
.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background-color: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-tab:hover,
.category-tab.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Kategori Başlığı */
.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 40px 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.category-header img {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    object-fit: cover;
}

.category-header h2 {
    color: var(--primary-color);
    font-size: 24px;
    margin: 0;
}

/* Ürün Kartları */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    background-color: var(--bg-light);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.product-description {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
    margin: 0;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-body {
    margin-bottom: 20px;
}

.modal-image {
    width: 100%;
    height: 300px;
    background-color: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

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

.modal-description {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .menu-header h1 {
        font-size: 24px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .category-header {
        margin: 30px 0 15px 0;
    }

    .admin-nav ul {
        gap: 10px;
    }

    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 10px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .login-box {
        padding: 30px 20px;
    }

    .modal-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .menu-header {
        padding: 30px 0;
    }

    .menu-header .logo img {
        max-width: 150px;
    }

    .menu-header h1 {
        font-size: 20px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .category-tabs {
        gap: 8px;
    }

    .category-tab {
        padding: 8px 16px;
        font-size: 13px;
    }

    .product-card {
        margin-bottom: 10px;
    }

    .admin-header h1 {
        font-size: 20px;
    }

    .admin-nav ul {
        flex-direction: column;
        gap: 5px;
    }

    .admin-nav a {
        display: block;
        padding: 10px;
    }
}
