/* Menu Page Specific Styles */

/* Navigation spacing fix */
body {
    padding-top: 80px; /* Add padding to prevent content overlap with fixed navbar */
}

nav {
    height: 80px; /* Fixed height to match home page */
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

nav a {
    text-decoration: none;
    color: white;
    position: relative;
}

/* Main content spacing fixes */
main.container {
    padding-top: 2rem;
    position: relative;
    z-index: 1;
}

/* Navbar link underline effect */
.hidden.md\:flex a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: #ef4444;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.hidden.md\:flex a:hover::after {
    width: 100%;
}

.hidden.md\:flex a.active::after,
.hidden.md\:flex a.active::after {
    width: 100%;
}

.hidden.md\:flex.space-x-10 {
    margin-right: 1rem;
}

/* Flavor Heaven text alignment */
.logo-container + span {
    display: inline-block;
    vertical-align: middle;
}

/* Animated border for menu items on hover */
.menu-item {
    position: relative;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1;
    border-radius: 0.5rem;
}

.menu-item:hover::before {
    border-color: #ef4444;
    transform: scale(0.98);
}

/* Menu item image container */
.menu-item .relative {
    height: 200px;
    overflow: hidden;
    position: relative;
    background-color: #f3f4f6;
}

.menu-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease-in-out;
    display: block !important;
    background-color: #f3f4f6;
}

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

/* Image loading states */
.menu-item img[src=""],
.menu-item img:not([src]) {
    background: linear-gradient(45deg, #f3f4f6 25%, #e5e7eb 25%, #e5e7eb 50%, #f3f4f6 50%, #f3f4f6 75%, #e5e7eb 75%);
    background-size: 20px 20px;
    animation: loading-shimmer 1s linear infinite;
}

@keyframes loading-shimmer {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

/* Ensure images are visible */
.menu-item-card img {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Menu item card specific styles */
.menu-item-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.menu-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.menu-item-card .relative {
    height: 192px; /* h-48 equivalent */
    overflow: hidden;
    position: relative;
    background-color: #f3f4f6;
    flex-shrink: 0;
}

.menu-item-card .p-4 {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.menu-item-card .line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-item-card .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    height: 3em; /* 2 lines * 1.5 line-height */
}

.menu-item-card .dietary-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.menu-item-card .add-to-cart-btn {
    margin-top: auto;
    transition: all 0.3s ease;
}

.menu-item-card .add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Improve hover overlay visibility */
.menu-item .relative .absolute {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu-item .relative:hover .absolute {
    opacity: 1 !important;
    transform: translateY(0);
}

.menu-item .relative .absolute {
    transform: translateY(10px);
}

/* Menu item content */
.menu-item .p-4 {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.menu-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1f2937;
    line-height: 1.4;
}

.menu-item .description {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.95rem;
    height: 4.5em; /* Fixed height for description - approximately 3 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Price and add to cart button container */
.menu-item .flex.justify-between {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.menu-item .price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.menu-item .add-to-cart {
    padding: 0.5rem 1rem;
    background-color: #ef4444;
    color: white;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.menu-item .add-to-cart:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.menu-item .add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
    z-index: -1;
}

.menu-item .add-to-cart:hover::before {
    left: 100%;
}

/* Dietary tags */
.menu-item .mt-2 {
    margin-top: 0.75rem;
    min-height: 30px; /* Fixed height for tags area */
}

.menu-item .inline-block {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Featured badge */
.menu-item .absolute.top-2.right-2 {
    z-index: 10;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background-color: #ef4444;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Grid alignment fixes */
#menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

#menu-items .menu-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Equal height cards */
#menu-items > div {
    height: 100%;
}

/* Animated category buttons */
.category-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.category-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.category-btn:hover::after {
    width: 70%;
}

.category-btn.active::after {
    width: 70%;
    background-color: white;
}

.category-btn:not(.active):hover {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 9999px;
}

.badge-vegetarian {
    background-color: #dcfce7;
    color: #166534;
}

.badge-vegan {
    background-color: #bbf7d0;
    color: #166534;
}

.badge-gluten-free {
    background-color: #fef9c3;
    color: #854d0e;
}

.badge-spicy {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Price tag styles */
.price-tag {
    position: relative;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #ef4444;
    color: white;
    font-weight: bold;
    clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%, 5% 50%);
}

/* Notification toast animation */
@keyframes toastIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toastOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.toast-enter {
    animation: toastIn 0.3s forwards;
}

.toast-exit {
    animation: toastOut 0.3s forwards;
}

/* Custom checkbox styling */
.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.custom-checkbox::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s ease;
}

input[type="checkbox"]:checked + .custom-checkbox {
    background-color: #ef4444;
    border-color: #ef4444;
}

input[type="checkbox"]:checked + .custom-checkbox::after {
    opacity: 1;
}

/* Enhanced filter label hover effects */
.inline-flex.items-center {
    transition: all 0.3s ease;
}

.inline-flex.items-center:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Improve dietary filter checkbox hover */
.dietary-filter {
    cursor: pointer;
}

.dietary-filter:hover + span {
    color: #ef4444;
}

/* Quantity input styling */
.quantity-input {
    display: flex;
    align-items: center;
    border-radius: 0.375rem;
    overflow: hidden;
}

.quantity-btn {
    background-color: #f3f4f6;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.quantity-btn:hover {
    background-color: #e5e7eb;
}

.quantity-input input {
    width: 40px;
    text-align: center;
    border: 1px solid #e5e7eb;
    -moz-appearance: textfield;
}

.quantity-input input::-webkit-outer-spin-button,
.quantity-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Modal animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

/* Loading animation */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.loading-shimmer {
    background: linear-gradient(to right, #f6f7f8 8%, #edeef1 18%, #f6f7f8 33%);
    background-size: 800px 104px;
    animation: shimmer 1.5s infinite linear;
}

/* Dietary tags animation */
.menu-item .inline-block {
    transition: transform 0.3s ease;
}

.menu-item:hover .inline-block {
    transform: translateY(-2px);
}

/* Button animation */
.add-to-cart {
    position: relative;
    overflow: hidden;
}

.add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transition: left 0.6s ease;
}

.add-to-cart:hover::before {
    left: 100%;
}

/* Search bar animation */
.search-input {
    transition: all 0.3s ease;
}

.search-input:focus {
    transform: scale(1.02);
}

/* Filters animation */
.dietary-filter:checked + span {
    animation: pulse 0.4s ease-in-out;
}

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

/* Responsive menu layout */
@media (max-width: 640px) {
    #menu-items {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .menu-item .relative {
        height: 180px;
    }
    
    .menu-item .description {
        height: 3.9em;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    #menu-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #menu-items {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1025px) {
    #menu-items {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Navigation bar styles matching home page */
nav {
    position: fixed;
    width: 100%;
    background-color: #1f2937;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 50;
    transition: background-color 0.4s ease, transform 0.4s ease;
}

nav.transparent {
    background-color: rgba(26, 32, 44, 0.9);
}

nav.scrolled {
    background-color: rgba(26, 32, 44, 0.97);
}

nav.hidden {
    transform: translateY(-100%);
}

nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

/* Logo container */
.logo-container {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

nav a {
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ef4444;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a.active::after {
    width: 100%;
}

nav a.text-red-400 {
    position: relative;
    font-weight: 700;
}

/* Cart icon with enhanced style */
.cart-icon {
    position: relative;
    display: inline-block;
    margin-right: 1rem;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ef4444;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    cursor: pointer;
    padding: 0.5rem;
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Mobile menu adjustments */
.mobile-menu {
    top: 80px; /* Start below the navbar */
    height: calc(100% - 80px); /* Adjusted height */
    position: fixed;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 41;
}

.mobile-menu-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding-top: 2rem;
}

.mobile-menu-items a {
    position: relative;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-menu-items a:hover {
    color: #ef4444;
    transform: translateY(-3px);
}

.mobile-menu-items a.text-red-400 {
    font-weight: 700;
}

.mobile-menu-items a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: #ef4444;
    transition: width 0.3s ease;
}

.mobile-menu-items a:hover::after {
    width: 100%;
}

/* Desktop menu spacing */
.hidden.md\:flex.space-x-6 {
    display: flex;
}

@media (max-width: 768px) {
    .hidden.md\:flex.space-x-6 {
        display: none;
    }
}

/* Cart dropdown styles */
.cart-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    width: 300px;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    transform: translateY(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 40;
}

.cart-icon:hover .cart-dropdown {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.cart-dropdown h3 {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.cart-count.active {
    animation: pulse 0.5s ease;
}

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

/* Ensure consistent spacing in navbar */
@media (min-width: 768px) {
    .hidden.md\:flex a {
        padding: 0.5rem 0;
        margin: 0 0.75rem;
    }
}

/* Header adjustments */
header.bg-cover {
    margin-top: 0; /* Remove margin since we're using padding on body */
}

/* Mobile menu adjustments */
@media (max-width: 768px) {
    nav {
        height: 70px; /* Slightly smaller on mobile */
    }
    
    .mobile-menu {
        top: 70px; /* Adjust to match nav height on mobile */
        height: calc(100% - 70px);
    }
    
    body {
        padding-top: 70px;
    }
}

/* Enhanced filter styles */
.group input[type="checkbox"]:checked + div {
    background-color: #ef4444;
    border-color: #ef4444;
}

.group input[type="checkbox"]:checked + div i {
    opacity: 1 !important;
}

.group input[type="radio"]:checked + div {
    border-color: #10b981;
}

.group input[type="radio"]:checked + div div {
    opacity: 1 !important;
}

/* Category button active state */
.category-btn.active {
    background-color: #ef4444 !important;
    color: white !important;
    border-color: #ef4444 !important;
}

.category-btn:not(.active):hover {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
    border-color: #fecaca !important;
}

/* Enhanced search input */
.search-input:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1), 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Filter section animations */
.filter-section {
    animation: slideInUp 0.6s ease-out;
}

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

/* Improved hover effects for filter options */
.group:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Custom select dropdown styling */
.sort-select:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Reset button styling */
#reset-filters:hover {
    transform: scale(1.05);
}

/* Section title animation */
.text-center h2 {
    animation: fadeInDown 0.8s ease-out;
}

.w-24.h-1.bg-red-500 {
    animation: expandWidth 1s ease-out 0.5s both;
}

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

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 6rem;
    }
}

/* Enhanced floating food icons */
.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -15px, 0);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -7px, 0);
    }
    90% {
        transform: translate3d(0,-2px,0);
    }
}

/* Backdrop blur support */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Gradient text effect */
.text-red-400 {
    background: linear-gradient(45deg, #ef4444, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
    .grid.grid-cols-1.lg\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .grid.grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .category-btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .search-input {
        font-size: 1rem;
        padding: 0.875rem 3rem 0.875rem 2.5rem;
    }
}

/* Smooth transitions for all interactive elements */
* {
    transition: all 0.2s ease;
}

/* Focus states for accessibility */
.category-btn:focus,
.dietary-filter:focus,
input[name="price-range"]:focus,
.sort-select:focus,
.search-input:focus {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

/* Compact Filter Dropdown Styles */
.relative button {
    transition: all 0.2s ease;
}

.relative button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.relative button .fa-chevron-down {
    transition: transform 0.2s ease;
}

/* Dropdown menu styles */
.relative > div[id$="-dropdown"] {
    animation: dropdownFadeIn 0.2s ease-out;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

/* Active filter tags */
#active-filters span {
    animation: tagFadeIn 0.3s ease-out;
}

@keyframes tagFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Dropdown hover effects */
.relative > div[id$="-dropdown"] label:hover {
    background-color: #f9fafb;
    transform: translateX(2px);
}

/* Compact filter section responsive */
@media (max-width: 768px) {
    .flex.flex-wrap.items-center.justify-between {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .flex.flex-wrap.items-center.gap-3 {
        justify-content: center;
    }
    
    .flex.items-center.gap-3:last-child {
        justify-content: space-between;
    }
    
    .relative > div[id$="-dropdown"] {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90vw;
        max-width: 300px;
        z-index: 50;
    }
}

/* Enhanced dropdown button states */
.relative button[id$="-dropdown-btn"] {
    position: relative;
    overflow: hidden;
}

.relative button[id$="-dropdown-btn"]::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 ease;
}

.relative button[id$="-dropdown-btn"]:hover::before {
    left: 100%;
}

/* Sort select enhanced styling */
.sort-select {
    background-image: none;
    position: relative;
}

.sort-select:focus {
    transform: translateY(-1px);
}

/* Filter section compact spacing */
.mb-8.bg-white.rounded-xl {
    margin-bottom: 2rem;
}

/* Active filters container */
#active-filters {
    min-height: 24px;
    transition: all 0.3s ease;
}

#active-filters:empty {
    display: none;
}

/* Reset button enhanced */
#reset-filters {
    position: relative;
    overflow: hidden;
}

#reset-filters::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.1), transparent);
    transition: left 0.5s ease;
}

#reset-filters:hover::before {
    left: 100%;
}

/* Dropdown z-index management */
.relative {
    z-index: auto;
}

.relative > div[id$="-dropdown"]:not(.hidden) {
    z-index: 30;
}

/* Smooth transitions for all filter elements */
.dietary-filter,
input[name="price-range"] {
    transition: all 0.2s ease;
}

.dietary-filter:checked,
input[name="price-range"]:checked {
    transform: scale(1.1);
}