/* Products Page Specific Styles */

.page-header {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 60px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
}

/* Interactive Header Background Animation */
.header-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #6366f1, #8b5cf6, #ec4899, #f59e0b);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    z-index: 1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.page-header .container {
    position: relative;
    z-index: 2;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.breadcrumb-item {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.breadcrumb-item:hover {
    color: white;
    transform: translateY(-2px);
}

.breadcrumb-item.active {
    color: white;
    font-weight: 600;
}

.breadcrumb-separator {
    margin: 0 1rem;
    opacity: 0.6;
}

/* Animated Title */
.title-section {
    margin-bottom: 3rem;
}

.animated-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.title-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(50px) rotateX(90deg);
    animation: titleWordReveal 0.8s ease forwards;
}

.title-word.highlight {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.title-word.highlight::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    border-radius: 2px;
    animation: underlineGrow 0.8s ease 0.6s forwards;
    transform: scaleX(0);
    transform-origin: center;
}

@keyframes titleWordReveal {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

@keyframes underlineGrow {
    to {
        transform: scaleX(1);
    }
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Fade In Up Animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Stats */
.header-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
    animation-delay: 0.6s;
}

.stat-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #ffffff, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: numberPulse 2s ease infinite;
}

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

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Quick Filters */
.quick-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    animation-delay: 0.8s;
}

.filter-label {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
}

.quick-filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.quick-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.quick-filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.quick-filter-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.quick-filter-btn i {
    font-size: 1rem;
}

/* Floating Particles */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float var(--duration) ease-in-out infinite var(--delay);
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
}

.particle:nth-child(2) {
    top: 60%;
    left: 80%;
}

.particle:nth-child(3) {
    top: 40%;
    left: 20%;
}

.particle:nth-child(4) {
    top: 80%;
    left: 70%;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.8;
    }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    margin-bottom: 3rem;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.products-grid.list-view .product-card {
    display: flex;
    align-items: center;
    max-width: none;
}

.products-grid.list-view .product-image {
    width: 292px !important;
    flex-shrink: 0;
    margin-right: 1.5rem;
    border-radius: 8px;
}

.products-grid.list-view .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.products-grid.list-view .product-actions {
    margin-top: 1rem;
}

/* Loading State */
.loading-products {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    flex-direction: column;
    gap: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.no-results i {
    font-size: 4rem;
    color: #e2e8f0;
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    margin-bottom: 4rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
}

.page-btn:hover,
.page-btn.active {
    border-color: #6366f1;
    background: #6366f1;
    color: white;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn.disabled:hover {
    border-color: #e2e8f0;
    background: white;
    color: #64748b;
}

/* Product Card Enhancements for Products Page */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card .product-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(99, 102, 241, 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    display: none !important;
}

.product-card .product-rating {
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    display: none !important;
}

.discount-badge {
    display: none !important;
}

.product-card .stars {
    color: #fbbf24;
    font-size: 0.875rem;
}

.product-card .rating-text {
    color: #64748b;
    font-size: 0.75rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 40px 0 30px;
        min-height: 400px;
    }

    .animated-title {
        font-size: 2.5rem;
    }

    .header-stats {
        gap: 2rem;
        flex-wrap: wrap;
    }

    .stat-number {
        font-size: 2rem;
    }

    .quick-filters {
        flex-direction: column;
        gap: 1rem;
    }

    .quick-filter-buttons {
        justify-content: center;
    }

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

    .products-grid.list-view .product-card {
        flex-direction: column;
        text-align: center;
    }

    .products-grid.list-view .product-image {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        min-height: 350px;
    }

    .animated-title {
        font-size: 2rem;
    }

    .header-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .quick-filter-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .breadcrumb-nav {
        font-size: 0.8rem;
    }

    .products-grid {
        gap: 1.5rem;
    }

    .pagination {
        gap: 0.25rem;
    }

    .page-btn {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
}

/* Product Card Image: show full width, align to top, no crop center */
.products-grid .product-image, .product-card .product-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: top center;
    object-fit: cover;
    object-position: top;
    border-radius: 12px 12px 0 0;
    margin: 0;
    display: block;
}

/* Increase product image height */
.products-grid .product-image, .product-card .product-image {
    height: 292px !important;
}

/* Compact Product Info Section */
.product-info {
    padding: 0.75rem 1rem 1rem 1rem;
}
.product-title {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}
.product-description {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    line-height: 1.2;
}
.product-price {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.product-actions {
    justify-content: space-between;
}
.product-card {
    border: 2px solid #e1e1e1;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.btn-sm {
    padding: 8px 25px !important;
    font-size: 0.95rem !important;
}
.product-card .product-rating {
    margin-bottom: 0.25rem;
}

/* Fix search box and price range input width */
.filters-sidebar .search-box,
.filters-sidebar .price-inputs {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.filters-sidebar .search-box input,
.filters-sidebar .price-inputs input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}