/* CBA Category Page Enhancements */

/* Enhanced focus states for form elements */
.search-section input:focus,
.search-section select:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

/* Smooth transitions for all interactive elements */
.search-section * {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced hover effects for product cards */
.product-card {
    position: relative;
    overflow: hidden;
}

/* Fix image zoom to stay centered */
.product-card img {
    transform-origin: center center !important;
    will-change: transform;
}

.product-card .overflow-hidden,
.product-card [class*="overflow-hidden"] {
    position: relative;
    overflow: hidden;
}

/* Ensure image container maintains position during zoom */
.product-card .relative.overflow-hidden {
    position: relative;
    overflow: hidden;
}

.product-card .relative.overflow-hidden img {
    transform-origin: center center !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

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

.product-card:hover::before {
    left: 100%;
}

/* Enhanced search button glow effect */
.search-btn {
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.search-btn:hover::before {
    left: 100%;
}

/* Enhanced form field animations */
.form-field {
    position: relative;
}

.form-field label {
    transition: all 0.3s ease;
}

.form-field input:focus + label,
.form-field select:focus + label {
    transform: translateY(-2px);
    color: #ffffff;
}

/* Enhanced background pattern animation */
.bg-pattern {
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

/* Enhanced shadow effects */
.enhanced-shadow {
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

.enhanced-shadow:hover {
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Enhanced border radius consistency */
.enhanced-rounded {
    border-radius: 1rem;
}

/* Enhanced typography */
.enhanced-text {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Enhanced loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced responsive design */
@media (max-width: 768px) {
    .search-section {
        padding: 2rem 1rem;
    }

    .search-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .enhanced-rounded {
        border-radius: 0.75rem;
    }
}

/* Enhanced accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Enhanced dark mode support */
@media (prefers-color-scheme: dark) {
    .bg-gradient-to-r.from-blue-600.to-blue-800 {
        background: linear-gradient(to right, #1e40af, #1e3a8a);
    }
}

/* Enhanced print styles */
@media print {
    .search-section,
    .pagination {
        display: none;
    }
}
