:root {
    --primary-font: Arial, sans-serif; /* Fallback to a standard font */
    --heading1-size: 2.8em;
    --category-heading-size: 2.2em;
    --item-name-size: 1.4em;
    --item-price-size: 1.2em;
    --description-size: 0.9em;
    --base-font-size: 1em; /* This is typically 16px */
}

body {
    font-family: var(--primary-font);
    margin: 0;
    background-color: #eef2f6;
    color: #333;
    line-height: 1.6;
    font-size: var(--base-font-size);
}

header {
    background-color: #2c3e50; /* Darker blue-gray */
    color: #fff;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    position: sticky; /* Make the header sticky */
    top: 0; /* Stick it to the top of the viewport */
    z-index: 1000; /* Ensure it stays on top of other content */
}

.logo img {
    height: 60px; /* Slightly larger logo */
    border-radius: 5px; /* Slight round on logo if it's rectangular */
}

.language-selector a {
    color: #ecf0f1; /* Lighter text for contrast */
    text-decoration: none;
    margin-left: 15px;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.language-selector a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.language-selector a.active {
    background-color: #3498db; /* A vibrant blue for active state */
    color: #fff;
    font-weight: bold;
    text-decoration: none; /* Remove underline for active to make it stand out */
}

main {
    padding: 30px;
    max-width: 960px;
    margin: 30px auto;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #2c3e50; /* Matching header color */
    margin-bottom: 40px;
    font-size: var(--heading1-size);
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

h1::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #3498db;
    border-radius: 2px;
}

.category-header-with-image {
    position: relative;
    margin-bottom: 30px; /* Space below the entire block */
}

.category-heading {
    position: absolute; /* Position over the image */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center horizontally and vertically */
    color: white; /* White text color */
    z-index: 2; /* Ensure it's above the image */
    font-size: var(--category-heading-size);
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Add a subtle shadow for readability */
    width: 100%; /* Ensure it takes full width for centering */
    text-align: center; /* Center text within its own width */
    margin: 0; /* Remove default margins */
    padding: 0; /* Remove default padding */
}

.menu {
    /* No specific changes needed for grid now that it's a list */
}

.menu-item {
    background-color: #fff; /* Keep background white */
    padding: 15px 0; /* Adjust padding for list look */
    border-bottom: 1px solid #ddd; /* Add bottom border for separation */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.menu-item:last-child {
    border-bottom: none; /* No border for the last item */
}

.menu-item:hover {
    background-color: #f0f0f0; /* Subtle hover effect */
}

.item-details {
    flex-grow: 1;
    padding-right: 20px; /* Space before price */
}

.item-name {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: var(--item-name-size);
    font-weight: 600;
    display: flex;
    justify-content: flex-start; /* Align items to the start (left) */
    align-items: center;
}

.item-description {
    color: #666;
    font-size: var(--description-size);
    margin-top: 5px;
    margin-bottom: 0; /* Adjust margin */
}

.item-price {
    font-weight: bold;
    color: #e74c3c; /* A distinct color for price */
    font-size: var(--item-price-size);
    flex-shrink: 0;
    text-align: right; /* Ensure price aligns right */
}

.item-description .description-price {
    float: right;
    color: #e74c3c;
    font-weight: bold;
}

.item-description::after {
    content: "";
    display: table;
    clear: both;
}

/* Admin Panel Specific Styles (keep existing for now, add new if needed) */
.dashboard-container, .container {
    max-width: 900px;
    margin: 50px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.login-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 300px;
    text-align: center;
}

.login-container h2 {
    margin-bottom: 20px;
    color: #333;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.login-container input[type="submit"] {
    background-color: #333;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

.login-container input[type="submit"]:hover {
    background-color: #555;
}

.message {
    color: red;
    margin-top: 10px;
}

/* Admin Form and List Specifics */
.menu-form input[type="text"],
.menu-form textarea,
.menu-form select,
.category-form input[type="text"] {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.menu-form input[type="submit"],
.category-form input[type="submit"] {
    background-color: #28a745;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.menu-form input[type="submit"]:hover,
.category-form input[type="submit"]:hover {
    background-color: #218838;
}

.menu-list table,
.category-list table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.menu-list th,
.menu-list td,
.category-list th,
.category-list td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.menu-list th,
.category-list th {
    background-color: #f2f2f2;
}

.menu-list .actions a,
.category-list .actions a {
    margin-right: 10px;
    text-decoration: none;
    color: #007bff;
}

.menu-list .actions a.delete,
.category-list .actions a.delete {
    color: #dc3545;
}

/* Drag and drop styling */
.menu-list tbody tr,
.category-list tbody tr {
    cursor: grab;
}

.menu-list tbody tr.dragging,
.category-list tbody tr.dragging {
    opacity: 0.5;
}

.menu-list tbody tr.over,
.category-list tbody tr.over {
    border-top: 2px solid #007bff;
}

.save-order-btn {
    background-color: #007bff;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
    display: inline-block;
}

.save-order-btn:hover {
    background-color: #0056b3;
}

.message-box {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.message-box.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.message-box.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.category-section h4 {
    margin-top: 30px;
    margin-bottom: 10px;
    color: #007bff;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.pdf-download {
    text-align: center;
    margin-bottom: 30px;
}

.pdf-download a {
    display: inline-block;
    background-color: #e74c3c;
    color: #fff;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.pdf-download a:hover {
    background-color: #c0392b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        display: flex; /* Ensure it's a flex container */
        flex-direction: row; /* Arrange items in a row */
        justify-content: flex-start; /* Align items to the start (left) */
        align-items: center; /* Vertically align items */
        padding: 1rem 20px; /* Adjust padding */
    }
    .header-right-controls {
        display: flex;
        align-items: center;
        gap: 15px; /* Space between language selector and hamburger */
        margin-left: auto; /* Push to the right */
    }
    .language-selector {
        /* margin-top: 10px; */ /* Removed for better alignment */
    }
    .hamburger-menu {
        display: flex !important; /* Show hamburger on mobile */
    }
    main {
        margin: 15px auto;
        padding: 15px;
    }
    h1 {
        font-size: var(--heading1-size) * 0.8; /* Adjust for mobile */
        margin-bottom: 30px;
    }
    .category-heading {
        font-size: 3em; /* Increased font size for mobile */
        margin-top: 40px;
        margin-bottom: 20px;
    }

    .menu-item {
        flex-direction: row; 
        align-items: flex-start;
        padding: 10px 0;
    }

    .item-details {
        padding-right: 15px; /* Ensure some space */
        flex-basis: 70%; /* Give more space to details */
        word-wrap: break-word; /* Allow long words to break */
        overflow-wrap: break-word;
    }

    .item-name {
        font-size: var(--item-name-size) * 0.9; /* Adjust for mobile */
    }

    .item-description {
        font-size: var(--description-size) * 0.9; /* Adjust for mobile */
    }

    .item-price {
        font-size: var(--item-price-size) * 0.9; /* Adjust for mobile */
        margin-left: auto; /* Push price to the right */
        text-align: right;
        padding-top: 0; /* Remove top padding for better alignment */
        border-top: none; /* Remove top border */
    }
}

.category-description {
    text-align: center;
    color: #555;
    font-size: 1.1em;
    margin-top: -15px;
    margin-bottom: 20px;
    padding: 0 20px;
}

.category-description.align-left {
    text-align: left;
}

.category-image-container {
    text-align: center; /* Center the image */
    margin-bottom: 20px; /* Space below the image */
}

.category-image {
    max-width: 100%; /* Ensure image is responsive */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Remove extra space below image */
    margin: 0 auto; /* Center image if max-width is less than container */
    width: 900px; /* Set desired width */
    height: 337px; /* Set desired height */
    object-fit: cover; /* Cover the area, cropping if necessary */
    border-radius: 8px; /* Slightly rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}


/* Admin Sidebar Layout */
.admin-body {
    background-color: #f4f6f9;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: #fff;
    position: fixed;
    height: 100%;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    background-color: #1a242f;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li a {
    display: block;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background-color 0.3s;
}

.sidebar-nav li a:hover {
    background-color: #34495e;
}

.sidebar-nav li a.active {
    background-color: #2980b9;
    font-weight: bold;
}

.admin-main-content {
    margin-left: 250px; /* Same as sidebar width */
    padding: 30px;
    width: calc(100% - 250px);
}

/* Override default container styles for admin pages */
.admin-body .container,
.admin-body .dashboard-container,
.admin-body .form-container {
    margin: 0 auto; /* Remove top margin, keep it centered */
    max-width: 100%; /* Allow it to fill the content area */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Softer shadow */
}

/* Responsive adjustments for sidebar */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .admin-main-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }
    .admin-wrapper {
        flex-direction: column;
    }
}

/* Hamburger Menu Icon */
.hamburger-menu {
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    padding: 5px;
    box-sizing: content-box;
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    height: 100%;
    width: 0; /* Hidden by default */
    position: fixed;
    z-index: 1001; /* Above header */
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.9); /* Dark overlay */
    overflow-x: hidden;
    transition: 0.5s; /* Smooth transition */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.mobile-nav-overlay.open {
    width: 100%; /* Show when open */
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.mobile-nav-links li {
    margin: 20px 0;
}

.mobile-nav-links a {
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    font-size: 25px;
    color: #818181;
    display: block;
    transition: 0.3s;
}

.mobile-nav-links a:hover {
    color: #f1f1f1;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 45px;
    font-size: 60px;
    color: #f1f1f1;
    cursor: pointer;
}



.allergen-text {
    color: red;
    font-size: 0.8em; /* Adjust as needed to make it smaller than item name */
    margin-left: 5px; /* Small margin to separate from item name */
    text-transform: lowercase; /* Keep lowercase as it was before */
}

