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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

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

/* Header Styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    position: relative;
}

/* Quick Menu Hamburger - LEFT SIDE */
.quick-menu-toggle {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

/* Logo - CENTER */
.logo {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Language Switcher - RIGHT SIDE */
.language-switcher {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.flag-btn {
    background: none;
    border: 2px solid transparent;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.flag-btn:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.flag-btn.active,
.flag-btn[data-active="true"] {
    opacity: 1 !important;
    border-color: #333 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}

/* Ensure inactive flags don't have border */
.flag-btn:not(.active),
.flag-btn[data-active="false"] {
    border-color: transparent !important;
    box-shadow: none !important;
}

.logo {
    flex: 1;
    text-align: center;
    order: 1;
}

.logo-image {
    height: 80px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

nav {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 20px;
    justify-content: center;
    width: 100%;
    order: 2;
}

.nav-btn {
    padding: 10px 20px;
    border: 2px solid #333;
    background: transparent;
    color: #333;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.nav-btn:hover, .nav-btn.active {
    background-color: #333;
    color: white;
}

/* Quick Menu Hamburger Styles */
.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu:hover span {
    background-color: #007bff;
}

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

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

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

/* Quick Menu Dropdown Styles */
.quick-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.quick-menu-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.quick-menu-dropdown {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90vw;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.quick-menu-overlay:not(.hidden) .quick-menu-dropdown {
    transform: translateX(0);
}

.quick-menu-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.quick-menu-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #e9ecef;
}

.quick-menu-content {
    padding: 0;
}

.quick-menu-categories {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.quick-menu-loading {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.quick-menu-main-category {
    border-bottom: 1px solid #f0f0f0;
}

.quick-menu-main-category-header {
    padding: 18px 20px;
    background: #8DB580;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quick-menu-main-category-header:hover {
    background: #7BA671;
}

.quick-menu-main-category-header .arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.quick-menu-main-category-header.expanded .arrow {
    transform: rotate(90deg);
}

.quick-menu-subcategories {
    display: none;
    background: #f8f9fa;
}

.quick-menu-subcategories.expanded {
    display: block;
}

.quick-menu-subcategory {
    padding: 14px 35px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-menu-subcategory:hover {
    background-color: #e9ecef;
}

.quick-menu-subcategory::before {
    content: "→";
    color: #8DB580;
    font-weight: bold;
}

/* Mobile Responsiveness for Quick Menu */
@media (max-width: 768px) {
    .quick-menu-dropdown {
        width: 100%;
        max-width: none;
    }
    
    .hamburger-menu {
        margin-right: 10px;
    }
    
    .quick-menu-main-category-header {
        padding: 20px;
        font-size: 18px;
    }
    
    .quick-menu-subcategory {
        padding: 16px 40px;
        font-size: 16px;
    }
}

.admin-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.admin-link:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

/* Main Content */
main {
    padding: 40px 20px;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: #666;
}

.menu-section {
    display: none;
}

.menu-section.active {
    display: block;
}

.menu-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: #333;
    letter-spacing: 2px;
}

.menu-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.category {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.category h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

/* Drinks Menu Green Theme */
#drinks-menu .category h3 {
    color: #8DB580;
    border-bottom-color: #8DB580;
}

/* Food Menu Red Theme */
#food-menu .category h3 {
    color: #C85450;
    border-bottom-color: #C85450;
}

.menu-items {
    display: grid;
    gap: 15px;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px dotted #ddd;
}

.menu-item:last-child {
    border-bottom: none;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 5px;
}

.item-description {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.item-price {
    font-weight: bold;
    color: #333;
    font-size: 1rem;
    margin-left: 15px;
    white-space: nowrap;
}

.item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-left: 15px;
}

/* Admin Styles */
.admin-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: white;
    padding: 30px 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.admin-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.2rem;
    font-weight: bold;
}

.admin-header p {
    margin: 0 0 20px 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Admin Controls */
.admin-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #666;
    font-size: 14px;
}

.user-info span {
    color: #333;
    font-weight: 500;
}

.admin-controls .language-switcher {
    position: relative;
    top: 0;
    right: 0;
    margin: 0;
    display: flex;
    gap: 10px;
}

.admin-controls .language-switcher .flag-btn {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
}

.admin-controls .language-switcher .flag-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.6);
    transform: scale(1.05);
}

.admin-controls .language-switcher .flag-btn.active {
    background: rgba(255,255,255,0.3);
    border-color: white;
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

.admin-controls .btn {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.admin-controls .btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

/* Mobile responsiveness for admin */
@media (max-width: 768px) {
    .admin-header {
        padding: 20px 15px;
    }
    
    .admin-header h1 {
        font-size: 1.8rem;
    }
    
    .admin-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .admin-controls .language-switcher {
        order: 1;
    }
    
    .admin-controls .btn {
        order: 2;
        width: 100%;
        text-align: center;
    }
}

.admin-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.admin-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

/* Checkbox styling */
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: normal !important;
    cursor: pointer;
    margin: 0;
}

.checkbox-label input[type="checkbox"] {
    margin: 0 !important;
    width: auto !important;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

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

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

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

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    background: #f9f9f9;
}

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

.admin-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.item-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 20px;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .logo-image {
        height: 60px;
        max-width: 150px;
    }

    .menu-categories {
        grid-template-columns: 1fr;
    }

    .nav-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .menu-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .item-price {
        margin-left: 0;
    }

    .item-image {
        width: 100%;
        height: 200px;
        margin-left: 0;
    }

    .admin-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .admin-item-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Category Management Styles */
.categories-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.admin-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.admin-section h3 {
    color: #34495e;
    margin: 20px 0 15px 0;
    font-size: 1.3em;
}

/* Form styling enhancements */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.eye-icon {
    font-size: 16px;
    margin-left: 4px;
    margin-right: 0;
}

/* Ensure the text and eye icon are close together */
.checkbox-group label span:last-child {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Parent/Child Category Styling */
.parent-category {
    border-left: 4px solid #3498db;
    background: #f8f9fa;
}

.child-category {
    border-left: 4px solid #95a5a6;
    background: #ffffff;
    margin-left: 20px;
    position: relative;
}

.child-category::before {
    content: "└─";
    position: absolute;
    left: -15px;
    top: 20px;
    color: #95a5a6;
    font-family: monospace;
}

/* Category selector styling */
select#category-parent,
select#edit-category-parent {
    font-size: 14px;
    padding: 12px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* ===== TIME-BASED AVAILABILITY STYLES ===== */

/* Time unavailable items */
.time-unavailable {
    opacity: 0.6;
    filter: grayscale(50%);
    position: relative;
}

.time-available {
    opacity: 1;
    filter: none;
}

/* Unavailable overlay */
.unavailable-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0,0,0,0.7) !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    border-radius: 8px !important;
    z-index: 10 !important;
    font-size: 14px !important;
}

/* Availability schedule form styling */
.days-selector,
.edit-days-selector {
    display: flex;
    gap: 10px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.days-selector label,
.edit-days-selector label {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 14px;
    cursor: pointer;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    transition: background-color 0.2s;
}

.days-selector label:hover,
.edit-days-selector label:hover {
    background: #e9e9e9;
}

.days-selector input[type="checkbox"]:checked + *,
.edit-days-selector input[type="checkbox"]:checked + * {
    background: #8DB580;
    color: white;
}

/* Custom time fields styling */
#custom-time-fields,
#edit-custom-time-fields {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-top: 10px;
}

#custom-time-fields input[type="time"],
#edit-custom-time-fields input[type="time"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

/* Availability indicator in item cards */
.menu-item-card.time-unavailable .item-price::after {
    content: " ⏰";
    color: #e74c3c;
    font-size: 12px;
}

.menu-item-card.time-available .item-price::after {
    content: " ✅";
    color: #27ae60;
    font-size: 12px;
}

/* Admin panel time status indicator */
.admin-time-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.admin-time-status.available {
    background: rgba(39, 174, 96, 0.8);
}

.admin-time-status.unavailable {
    background: rgba(231, 76, 60, 0.8);
}

/* ===== END TIME-BASED AVAILABILITY STYLES ===== */
