/* Modern Animated Search Styles */
.search-container-modern {
    margin: 30px 0 40px;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.search-input-modern {
    width: 100%;
    padding: 20px 25px 20px 60px;
    font-size: 18px;
    font-weight: 300;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 
        0 10px 40px rgba(0, 123, 255, 0.15),
        0 2px 10px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #333;
    outline: none;
}

.search-input-modern:focus {
    box-shadow: 
        0 15px 50px rgba(0, 123, 255, 0.25),
        0 5px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
}

.search-input-modern::placeholder {
    color: #999;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.search-icon-modern {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: #007bff;
    font-size: 22px;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.search-input-modern:focus + .search-icon-modern {
    color: #0056b3;
    transform: translateY(-50%) scale(1.1);
}

.search-clear {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    background: #e9ecef;
    color: #6c757d;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 14px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear.visible {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

.search-clear:hover {
    background: #dc3545;
    color: white;
}

.search-results-count {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.3s forwards;
    min-height: 24px;
}

.search-results-count span {
    font-weight: 600;
    color: #007bff;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    margin-top: 10px;
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.search-suggestions.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.search-suggestion-item {
    padding: 15px 25px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    color: #333;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover,
.search-suggestion-item.active {
    background: linear-gradient(to right, #f0f7ff, #e8f4ff);
    color: #007bff;
    padding-left: 30px;
}

.search-suggestion-item .icon {
    margin-right: 12px;
    color: #007bff;
    opacity: 0.7;
}

/* Product filtering animation */
.product-item {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    height: 0;
    margin: 0;
    overflow: hidden;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* Loading animation */
.search-loading {
    display: none;
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-input-modern {
        padding: 16px 20px 16px 50px;
        font-size: 16px;
    }
    
    .search-icon-modern {
        left: 20px;
        font-size: 20px;
    }
    
    .search-clear {
        right: 20px;
    }
}

/* Enhanced pagination styles for better visibility */
.pagination-enhanced .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin: 30px 0;
}

.pagination-enhanced .page-item {
    margin: 2px;
}

.pagination-enhanced .page-link {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-enhanced .page-item.active .page-link {
    background: linear-gradient(135deg, #007bff, #0056b3);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.pagination-enhanced .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-enhanced .page-link:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Ellipsis styling */
.pagination-enhanced .page-item.disabled:not(.active) .page-link {
    background: none;
    border: none;
    box-shadow: none;
    min-width: auto;
    color: #6c757d;
}

/* Page info styling */
.page-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
}

.page-info p {
    margin: 0;
}

.no-products {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}