/* Premium Popular Products Styles */
body {
    background-color: #f8fafc;
    font-family: var(--font-sans, 'Plus Jakarta Sans'), 'Outfit', sans-serif;
}

.popular-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 40px 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.popular-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 50%);
    pointer-events: none;
}

.popular-stats {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.popular-stats h3 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.filter-section {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 24px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255,255,255,0.8);
}

.period-filters .btn {
    border-radius: 30px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    border: 1px solid #e2e8f0;
    color: #475569;
    margin: 5px;
}

.period-filters .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}

.period-filters .btn-primary {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.product-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255,255,255,0.6);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.15);
    border-color: rgba(79, 70, 229, 0.3);
}

.popularity-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
}

.product-image-container {
    position: relative;
    height: 280px;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.wishlist-btn {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.wishlist-btn:hover, .wishlist-btn.active {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
}

.card-body-custom {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
    line-height: 1.4;
}

.price-section {
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-current {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
}

.price-original {
    font-size: 1rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.price-discount {
    background: #ef4444;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.btn-view-details {
    display: block;
    text-align: center;
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    border-radius: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-view-details:hover {
    background: #4f46e5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.2);
}

/* Pagination Adjustments */
.pagination {
    margin: 40px auto;
    gap: 10px;
}

.pagination .page-link {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    color: #4f46e5;
    font-weight: 700;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    background: #4f46e5;
    color: white;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.pagination .page-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}
