
.filter-btn {
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: #fb923c;
    color: #f97316;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: #f97316;
    color: white;
    border-color: #f97316;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.25);
}

.product-card {
    transition: all 0.3s ease;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -12px rgba(0, 0, 0, 0.1);
}

/* Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-image {
    background: linear-gradient(
        90deg,
        #e0e0e0 25%,
        #d0d0d0 50%,
        #e0e0e0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-text {
    height: 14px;
    border-radius: 8px;
}

.skeleton-title {
    height: 20px;
    border-radius: 8px;
}

.skeleton-button {
    height: 36px;
    border-radius: 8px;
}

/* Fade in animation for products */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}


/* Mobile Responsive - For phones (max-width: 640px) */

@media (max-width: 640px) {
    /* Force 2 cards per row on phones */
    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    /* Reduce padding inside product cards */
    .product-card > div:last-child {
        padding: 0.75rem !important;
    }
    
    /* Smaller product title text */
    .product-card h3 {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
        min-height: 2rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Category badge styling */
    .product-card .text-xs.font-semibold {
        font-size: 0.6rem !important;
    }
    
    /* Stock badge styling */
    .product-card .rounded-full {
        font-size: 0.6rem !important;
        padding: 0.15rem 0.4rem !important;
    }
    
    /* Smaller stars */
    .product-card svg.w-4.h-4 {
        width: 0.7rem !important;
        height: 0.7rem !important;
    }
    
    /* Price text */
    .product-card .text-xl {
        font-size: 0.85rem !important;
    }
    
    /* Buy button */
    .product-card button {
        padding: 0.25rem 0.6rem !important;
        font-size: 0.65rem !important;
    }
    
    /* Rating text */
    .product-card .text-xs.text-gray-400 {
        font-size: 0.6rem !important;
    }
    
    /* Top section spacing */
    .mb-12 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Filter buttons */
    .filter-btn {
        padding: 0.35rem 0.8rem !important;
        font-size: 0.7rem !important;
    }
    
    /* Filter buttons container */
    .mb-5 {
        gap: 0.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Page title */
    .text-4xl {
        font-size: 1.75rem !important;
    }
    
    /* Description text */
    .text-lg {
        font-size: 0.9rem !important;
    }
    
    /* Search section */
    .mt-8.max-w-xl {
        margin-top: 1rem !important;
    }
    
    /* Search input */
    input.pl-12 {
        padding-top: 0.6rem !important;
        padding-bottom: 0.6rem !important;
        font-size: 0.85rem !important;
    }
    
    /* Load more button */
    #loadMoreBtn button {
        padding: 0.5rem 1rem !important;
        font-size: 0.75rem !important;
    }
    
    #loadMoreBtn button svg {
        width: 1rem !important;
        height: 1rem !important;
    }
    
    /* No results section */
    #noResults svg {
        width: 3rem !important;
        height: 3rem !important;
    }
    
    #noResults .text-lg {
        font-size: 0.9rem !important;
    }
}

/* For very small phones (max-width: 380px) */
@media (max-width: 380px) {
    /* Smaller gap */
    .grid {
        gap: 0.5rem !important;
    }
    
    /* Less padding inside cards */
    .product-card > div:last-child {
        padding: 0.5rem !important;
    }
    
    /* Smaller title */
    .product-card h3 {
        font-size: 0.68rem !important;
    }
    
    /* Smaller price */
    .product-card .text-xl {
        font-size: 0.75rem !important;
    }
    
    /* Smaller button */
    .product-card button {
        padding: 0.2rem 0.5rem !important;
        font-size: 0.6rem !important;
    }
    
    /* Smaller filter buttons */
    .filter-btn {
        padding: 0.25rem 0.6rem !important;
        font-size: 0.65rem !important;
    }
}

/* For tablets (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    /* 3 cards per row on tablets */
    .grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
    }
    
    /* Slightly smaller padding */
    .product-card > div:last-child {
        padding: 0.85rem !important;
    }
    
    /* Tablet title size */
    .product-card h3 {
        font-size: 0.85rem !important;
    }
    
    /* Tablet price */
    .product-card .text-xl {
        font-size: 1rem !important;
    }
}

/* Fix for product title line clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ensure skeleton loaders also respect mobile layout */
@media (max-width: 640px) {
    .grid .bg-white.rounded-xl {
        min-width: 0;
    }
}