/* Featured Categories Animations */
.featured-categories-section {
    background: linear-gradient(135deg, var(--theme-secondary) 0%, var(--theme-card) 100%);
}

.category-card {
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.category-card::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.5s ease;
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: translateY(-8px) scale(1.05);
}

/* Smooth entrance animation */
.category-card {
    animation: slideInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.category-card:nth-child(1) {
    animation-delay: 0.1s;
}

.category-card:nth-child(2) {
    animation-delay: 0.2s;
}

.category-card:nth-child(3) {
    animation-delay: 0.3s;
}

.category-card:nth-child(4) {
    animation-delay: 0.4s;
}

.category-card:nth-child(5) {
    animation-delay: 0.5s;
}

.category-card:nth-child(6) {
    animation-delay: 0.6s;
}

.category-card:nth-child(7) {
    animation-delay: 0.7s;
}

.category-card:nth-child(8) {
    animation-delay: 0.8s;
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badge animations */
.category-card .count-badge {
    transform: scale(1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 20px;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-card:hover .count-badge {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.35);
}

.category-card .action-badge {
    transform: translateY(2px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover .action-badge {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* Badge glow effect */
.category-card:hover .count-badge::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.2));
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    animation: badge-glow 2s ease-in-out infinite;
}

@keyframes badge-glow {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* Enhanced badge visibility inside card */
.count-badge {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.count-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: inherit;
    z-index: -1;
}

/* Menu section styles */
.menu-section {
    @apply bg-theme-menu text-theme-primary;
}

.menu-section::before {
    content: '';
    @apply absolute inset-0;
    background: linear-gradient(to right, rgba(var(--bg-primary-rgb), 0.05), transparent);
}

.menu-section .overflow-x-auto::-webkit-scrollbar {
    @apply h-1;
}

.menu-section .overflow-x-auto::-webkit-scrollbar-track {
    @apply bg-theme-secondary rounded-full;
}

.menu-section .overflow-x-auto::-webkit-scrollbar-thumb {
    @apply bg-theme-tertiary rounded-full;
}

.menu-section .overflow-x-auto::-webkit-scrollbar-thumb:hover {
    @apply bg-main;
}

.menu-section a {
    @apply text-theme-secondary hover:text-theme-primary;
}

.menu-section a:hover {
    @apply border-main;
}

.menu-section a::after {
    content: '';
    @apply absolute bottom-0 left-0 w-0 h-0.5 bg-main transition-all duration-300;
}

.menu-section a:hover::after {
    @apply w-full;
}

.menu-section .text-main {
    @apply text-main;
}

/* Featured Categories Responsive Styles */

@media (max-width: 1024px) {
    .category-card {
        min-width: 140px;
        max-width: 200px;
        padding: 1rem 1.25rem;
    }

    .category-card h3 {
        font-size: 1rem;
    }

    .category-card p {
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .menu-section {
        @apply py-4;
    }

    .menu-section .space-x-6 > * + * {
        @apply ml-4;
    }

    .menu-section .space-x-4 > * + * {
        @apply ml-3;
    }

    .category-card {
        min-width: 130px;
        max-width: 180px;
        padding: 0.875rem 1rem;
    }

    .category-card h3 {
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
    }

    .category-card p {
        font-size: 0.75rem;
    }

    .featured-categories-section {
        padding: 1.5rem 0;
    }
}

@media (max-width: 640px) {
    .category-card {
        min-width: 120px;
        max-width: 160px;
        padding: 0.75rem;
    }

    .category-card h3 {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }

    .category-card p {
        font-size: 0.7rem;
    }

    .featured-categories-section {
        padding: 1rem 0;
    }

    .count-badge {
        min-width: 18px;
        min-height: 18px;
    }

    .count-badge span {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .category-card {
        min-width: 110px;
        max-width: 140px;
        padding: 0.625rem;
    }

    .category-card h3 {
        font-size: 0.75rem;
    }

    .category-card p {
        font-size: 0.65rem;
    }
}
