/* Core Variables & Reset */
:root {
    --primary: #d4af37;
    /* Gold */
    --primary-dark: #b4941f;
    --bg-color: #f4f6f8;
    /* Light Gray Background */
    --card-bg: #ffffff;
    /* White Cards */
    --text-main: #333333;
    --text-muted: #666666;
    --danger: #e74c3c;
    --success: #2ecc71;
    --border: #e0e0e0;
    --font-main: 'Outfit', sans-serif;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    box-shadow: 0 4px 6px rgba(212, 175, 55, 0.3);
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(212, 175, 55, 0.4);
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 6px rgba(231, 76, 60, 0.3);
}

.btn-block {
    width: 100%;
    text-align: center;
}

h1,
h2,
h3 {
    margin-bottom: 1rem;
    color: #222;
}

/* Header */
header {
    background: #ffffff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7)), 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;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    color: #222;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding-bottom: 3rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.product-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
    background: #fff;
    /* Ensure white background */
}

.product-price {
    color: #2c3e50;
    /* Dark blue-gray for better visibility or distinct look */
    font-size: 1.8rem;
    /* Larger */
    font-weight: 800;
    margin: 0.5rem 0;
    letter-spacing: -0.5px;
}

/* Cart Page */
.cart-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Admin Sidebar Logic (To fix user issue) */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #fff;
    border-right: 1px solid var(--border);
    padding: 2rem;
    position: fixed;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 100;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 10px;
}

.main-content {
    margin-left: 250px;
    padding: 2rem;
    flex: 1;
    background: var(--bg-color);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    color: var(--text-muted);
    border-radius: 8px;
    font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary);
}

/* Add Product Modal */
.modal {
    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;
    /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal.show {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .admin-layout {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .main-content {
        margin-left: 0;
    }
}