/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* Brand Colors based on Karuwa Logo */
    --color-primary: #0a4d28;
    /* Deep Forest Green */
    --color-primary-dark: #052b16;
    --color-primary-light: #166e3b;

    --color-accent: #d4af37;
    /* Metallic Gold */
    --color-accent-hover: #b39025;

    /* Neutrals */
    --color-bg-body: #f8f9fa;
    --color-bg-surface: #ffffff;
    --color-text-main: #2c3e50;
    --color-text-muted: #6c757d;
    --color-border: #e9ecef;

    /* UI */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(10, 77, 40, 0.1);
    --shadow-lg: 0 10px 25px rgba(10, 77, 40, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--color-text-main);
    background-color: var(--color-bg-body);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    color: var(--color-primary);
    margin-bottom: 0.5em;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
}

.btn-accent:hover {
    background-color: var(--color-accent-hover);
}

/* Header & Navbar */
.main-header {
    background: var(--color-primary);
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--color-accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-accent);
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--color-accent);
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-extras {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(10, 77, 40, 0.8), rgba(10, 77, 40, 0.6)), url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 0;
    text-align: center;
    margin-bottom: 3rem;
    border-radius: 0 0 50px 50px;
}

.hero h1 {
    color: var(--color-accent);
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Category Filter */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.cat-btn {
    padding: 10px 20px;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    transition: all 0.3s;
}

.cat-btn:hover,
.cat-btn.active {
    background: var(--color-primary);
    color: #fff;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.menu-card {
    background: var(--color-bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-img-top {
    height: 180px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
}

.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.card-text {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price {
    font-weight: 700;
    color: var(--color-accent);
    font-size: 1.25rem;
}

.btn-add {
    width: 40px;
    height: 40px;
    line-height: 40px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.2rem;
}

/* Admin Panel */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--color-primary-dark);
    color: #fff;
    padding: 2rem 0;
    flex-shrink: 0;
}

.admin-sidebar h3 {
    text-align: center;
    color: var(--color-accent);
    margin-bottom: 2rem;
}

.admin-menu li a {
    display: block;
    padding: 1rem 2rem;
    color: rgba(255, 255, 255, 0.7);
    border-left: 4px solid transparent;
}

.admin-menu li a:hover,
.admin-menu li a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-left-color: var(--color-accent);
}

.admin-content {
    flex: 1;
    padding: 2rem;
    background: #f4f6f8;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(10, 77, 40, 0.1);
}

/* Footer */
footer {
    background: var(--color-primary-dark);
    color: #fff;
    padding: 3rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-col h4 {
    color: var(--color-accent);
}

/* Indicators */
.meta-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.food-type {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.food-type.veg {
    border-color: green;
}

.food-type.veg::after {
    content: '';
    width: 8px;
    height: 8px;
    background: green;
    border-radius: 50%;
}

.food-type.non_veg {
    border-color: #8b0000;
}

.food-type.non_veg::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #8b0000;
    border-radius: 50%;
}

.food-type.vegan {
    border-color: #2e7d32;
}

.food-type.vegan::after {
    content: '\f06c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #2e7d32;
    font-size: 10px;
}

.spice-level {
    font-size: 0.8rem;
    color: #d32f2f;
}

.allergen-icon {
    display: none;
    /* Deprecated */
}

.allergens-container {
    display: flex;
    gap: 4px;
}

.allergen-badge {
    color: #f57c00;
    font-size: 0.85rem;
    cursor: help;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #fff3e0;
    border-radius: 50%;
    transition: transform 0.2s;
}

.allergen-badge:hover {
    transform: scale(1.2);
    background: #ffe0b2;
}

/* Responsive */
/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: var(--color-primary);
        padding: 1rem 0;
        text-align: center;
        gap: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links li a {
        display: block;
        padding: 0.5rem 0;
    }

    /* Simplified mobile nav for now */
    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.order-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.order-details-table th,
.order-details-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.order-details-table th {
    font-weight: 600;
    color: var(--color-primary);
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.9rem;
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--color-primary);
    border-top: 2px solid #eee;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        padding: 1rem 0;
    }

    .admin-sidebar h3 {
        margin-bottom: 1rem;
    }

    .admin-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .admin-menu li a {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 4px;
        margin: 2px;
    }

    .admin-menu li a:hover,
    .admin-menu li a.active {
        border-left: none;
        border-bottom-color: var(--color-accent);
        background: rgba(255, 255, 255, 0.1);
    }

    .admin-content {
        padding: 1rem;
    }

    /* Make tables scrollable */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Adjust grid columns */
    .menu-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-width: 100%;
        margin-bottom: 1rem;
    }

    /* Order Management Filters */
    .admin-content h1+div {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-group {
        width: 100%;
    }
}