:root {
    --primary: #27ae60;
    --primary-dark: #1e8449;
    --primary-light: #2ecc71;
    --primary-transparent: rgba(39, 174, 96, 0.1);
    --secondary: #f1c40f;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --gray: #6c757d;
    --success: #27ae60;
    --danger: #e74c3c;
    --white: #ffffff;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --radius: 10px;
    --radius-lg: 20px;
    --radius-pill: 50px;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    color: var(--dark);
    background-color: var(--light);
}

/* Page-scoped tweaks for menu page */
body.menu-page {
    padding-top: 0;
}
body.menu-page .navbar-brand img {
    height: 35px;
}

.hero-section {
    background-image: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.75)), url('https://images.unsplash.com/photo-1555396273-367ea4eb4db5?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1074&q=80');
    background-size: cover;
    background-position: center;
    color: var(--white);
    position: relative;
    padding: 120px 0 160px;
    margin-bottom: 0;
}

.hero-title {
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 1px;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
    opacity: 0.9;
    font-size: 1.25rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
    transform: translateY(1px);
}

/* Hero background elements */
.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(39, 174, 96, 0.1);
    opacity: 0.6;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation: float 8s infinite ease-in-out;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: 10%;
    animation: float 6s infinite ease-in-out reverse;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 30%;
    right: 20%;
    animation: float 10s infinite ease-in-out;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(15px, 15px) rotate(5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* Hero images */
.hero-images {
    position: relative;
    height: 450px;
    width: 100%;
}

.hero-image-main {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    z-index: 3;
}

.hero-image-accent {
    position: absolute;
    width: 40%;
    z-index: 2;
}

.accent-1 {
    top: 0;
    right: 0;
    animation: float 6s infinite ease-in-out;
}

.accent-2 {
    bottom: 5%;
    left: 5%;
    animation: float 8s infinite ease-in-out reverse;
}

/* Hero features */
.hero-features {
    display: flex;
    gap: 30px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.hero-feature i {
    font-size: 18px;
    background: rgba(255, 255, 255, 0.2);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Section badge */
.section-badge {
    display: inline-block;
    background-color: var(--primary-transparent);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 20px;
    border-radius: var(--radius-pill);
    margin-bottom: 1rem;
}

.card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    height: 100%;
    background-color: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.15);
    border-color: rgba(39, 174, 96, 0.2);
}

.card-body {
    padding: 1.25rem;
}

.menu-item-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
    opacity: 0.2;
    margin: 8px 0;
}

.menu-item-image {
    height: 180px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.3s ease;
}

.card:hover .menu-item-image {
    transform: scale(1.05);
}

.social-links {
    display: flex;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: white;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* New footer styles */
.footer-heading {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    padding-left: 0;
    position: relative;
}

.footer-links li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

/* Footer logout link specific styles */
.footer-links li a[href*="logout"] {
    color: #dc3545 !important;
}

.footer-links li a[href*="logout"]:hover {
    color: #c82333 !important;
}

.opening-hours li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: rgba(255,255,255,0.7);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: rgba(255,255,255,0.7);
}

.contact-info i {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(39, 174, 96, 0.15);
    border-radius: 50%;
}

/* Category filter styles */
.category-filters {
    display: flex !important;
    justify-content: center;
    margin-bottom: 10px; /* reduced from 40px to tighten space */
}

.category-dropdown {
    position: relative;
    min-width: 250px;
}

.category-dropdown-button {
    background: linear-gradient(135deg, var(--white), var(--light));
    border: 2px solid var(--primary);
    color: var(--dark);
    padding: 12px 20px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: between;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.1);
}

.category-dropdown-button:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.25);
}

.category-dropdown-button i.dropdown-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.category-dropdown.open .category-dropdown-button i.dropdown-arrow {
    transform: rotate(180deg);
}

.category-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.2);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.category-dropdown.open .category-dropdown-menu {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.category-dropdown-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(39, 174, 96, 0.1);
}

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

.category-dropdown-item:hover {
    background: var(--primary-transparent);
    color: var(--primary-dark);
    padding-left: 25px;
}

.category-dropdown-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-weight: 600;
}

.category-dropdown-item.active:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding-left: 20px;
}

.category-item-icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.category-item-count {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 10px;
}

.category-dropdown-item.active .category-item-count {
    background: rgba(255, 255, 255, 0.2);
}

.category-filter {
    border-radius: var(--radius-pill);
    font-weight: 600;
    padding: 12px 24px;
    font-size: 0.9rem;
    background-color: var(--light);
    color: var(--dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    margin: 0;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.category-filter::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.category-filter:hover::before {
    left: 100%;
}

.category-filter:hover {
    background-color: var(--primary-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.25);
    border-color: var(--primary);
}

.category-filter.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: var(--primary-dark);
    color: white;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
    transform: translateY(-1px);
}

.category-filter.active::before {
    display: none;
}

.category-filter:hover:not(.active) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-filter i {
    margin-right: 8px;
    font-size: 0.85rem;
}

.category-count {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 8px;
    font-weight: 700;
}

.category-filter:not(.active) .category-count {
    background: var(--primary);
    color: white;
}

.menu-item-image-placeholder {
    height: 180px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.category-badge {
    top: 12px;
    left: 12px;
    background-color: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    backdrop-filter: blur(3px);
}

.btn-primary {
    background-color: #27ae60;
    border: none;
    border-radius: 25px;
    padding: 8px 16px;
    font-weight: 600;
    transition: all 0.3s;
    text-transform: none;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    background-color: #229954;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.25);
}

.quantity-input {
    max-width: 100px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
}

.quantity-input .form-control {
    border: 1px solid #27ae60;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 12px;
}

.price-tag {
    background-color: #27ae60;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(39,174,96,0.2);
}

.menu-category-title {
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.menu-category-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: #27ae60;
    border-radius: 2px;
}

.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-brand {
    color: #2c3e50 !important;
    font-size: 1.5rem;
    font-weight: 600;
}

.navbar-brand img {
    height: 40px;
    margin-right: 10px;
}

.nav-link {
    color: #2c3e50 !important;
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: color 0.3s;
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #27ae60;
    bottom: 0;
    left: 0;
    transition: width 0.3s;
}

.nav-link:hover {
    color: #27ae60 !important;
}

.nav-link:hover:after {
    width: 100%;
}

/* Logout button specific styles */
.nav-link.logout-link {
    color: #dc3545 !important;
}

.nav-link.logout-link:hover {
    color: #c82333 !important;
}

.nav-link.logout-link:after {
    background: #dc3545;
}

.navbar-toggler {
    border: none;
    padding: 0;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(44, 62, 80, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Cart Modal Styles */
.cart-modal {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1050;
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
}

.cart-modal.show {
    right: 0;
}

.cart-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
}

.cart-modal-backdrop.show {
    display: block;
}

.cart-modal-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.cart-modal-body {
    padding: 1rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* Custom scrollbar styling */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.cart-modal-footer {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    position: sticky;
    bottom: 0;
    background: white;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 1rem;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-quantity {
    width: 60px;
    text-align: center;
}

@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    .menu-item-image {
        height: 160px;
    }
    .menu-item-image-placeholder {
        height: 160px;
    }
    .card-title {
        font-size: 1rem;
    }
    .price-tag {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
    .btn-primary {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    .quantity-input {
        max-width: 80px;
    }
    .quantity-input .form-control {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    /* 2x2 grid for mobile menu items */
    #menuItemsContainer .col-xl-3 {
        width: 50% !important;
        flex: 0 0 50%;
        max-width: 50%;
        padding-left: 6px;
        padding-right: 6px;
    }
    /* Category filters mobile styling */
    .category-dropdown {
        min-width: 200px;
    }
    .category-dropdown-button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    .category-dropdown-item {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    .category-item-icon {
        margin-right: 8px;
        font-size: 0.8rem;
    }
    .category-item-count {
        padding: 1px 6px;
        font-size: 0.7rem;
        margin-left: 8px;
    }
}

@media (max-width: 576px) {
    .card {
        margin-bottom: 1rem;
    }
    .menu-item-image {
        height: 140px;
    }
    .menu-item-image-placeholder {
        height: 140px;
    }
    .card-body {
        padding: 0.8rem;
    }
    .card-title {
        font-size: 0.9rem;
    }
    .price-tag {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    .btn-primary {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}

/* Compact card layout for smaller screens */
@media (min-width: 1200px) {
    .menu-item .card {
        max-width: 280px;
        margin: 0 auto;
    }
}

/* Extras button styles */
.btn-extras {
    border: 1px dashed var(--bs-success);
    color: var(--bs-success);
    line-height: 1.2;
    white-space: nowrap;
}

.btn-extras:hover {
    background-color: var(--bs-success);
    color: #fff;
}

/* Mobile layout fixes for price + extras row */
@media (max-width: 768px) {
    .price-extras-row {
        flex-wrap: wrap;
        gap: 6px;
    }
    .price-extras-row .price-tag {
        margin-bottom: 2px;
    }
    .price-extras-row .btn-extras {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
}

@media (max-width: 576px) {
    .price-extras-row .btn-extras {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.6);
}

.back-to-top.show {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Cart Button */
.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 90px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary), #f39c12);
    color: var(--dark);
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.4);
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.floating-cart:hover {
    background: linear-gradient(135deg, #f39c12, var(--secondary));
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(241, 196, 15, 0.6);
}

.floating-cart.show {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

.floating-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    .floating-cart {
        bottom: 20px;
        right: 75px;
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    .floating-cart-badge {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
    }
}
