/**
 * BEMELO Jewelry - Products Page Styles
 * Additional styles for the products listing page
 */

/* ============= PRODUCTS HEADER ============= */
.products-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(36, 36, 36, 0.9) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.products-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-image: url('../images/bg3.png');
    background-size: cover;
    background-position: center;
    opacity: 0.22;
    z-index: 0;
    will-change: auto;
}

.products-header::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(45, 27, 78, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.page-subtitle {
    font-size: 1.2rem;
    color: #D1D5DB;
    position: relative;
    z-index: 2;
}

/* ============= SEARCH SECTION ============= */
.search-section {
    padding: 40px 0;
    background: rgba(42, 42, 42, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(45, 27, 78, 0.4);
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(36, 36, 36, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(45, 27, 78, 0.4);
    border-radius: 50px;
    padding: 0 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.search-box:focus-within {
    border-color: #2D1B4E;
    box-shadow: 0 6px 25px rgba(45, 27, 78, 0.6);
}

.search-box i.fa-search {
    color: #5E3A7C;
    font-size: 1.2rem;
    margin-right: 15px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 18px 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    color: #FFFFFF;
    background: transparent;
}

.search-box input::placeholder {
    color: #9CA3AF;
}

.clear-btn {
    background: none;
    border: none;
    color: #9CA3AF;
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-btn:hover {
    color: #5E3A7C;
    background: rgba(45, 27, 78, 0.2);
}

.search-results-count {
    margin-top: 20px;
    text-align: center;
    color: #D1D5DB;
    font-size: 0.95rem;
}

.search-results-count strong {
    color: #5E3A7C;
    font-weight: 600;
}

/* ============= ALL PRODUCTS SECTION ============= */
.all-products {
    padding: 60px 0 100px;
    background: linear-gradient(180deg, rgba(36, 36, 36, 0.85) 0%, rgba(42, 42, 42, 0.85) 100%);
    position: relative;
    overflow: hidden;
}

.all-products::before {
    content: '';
    position: absolute;
    bottom: -15%;
    right: -8%;
    width: 550px;
    height: 550px;
    background-image: url('../images/bg3.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.14;
    z-index: 0;
    transform: rotate(20deg);
    filter: blur(3px);
    mask-image: radial-gradient(circle, black 35%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle, black 35%, transparent 70%);
    will-change: auto;
}

.all-products .container {
    position: relative;
    z-index: 1;
}

.all-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 35px;
}

/* ============= NO RESULTS ============= */
.no-results {
    text-align: center;
    padding: 80px 20px;
    background: rgba(36, 36, 36, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(45, 27, 78, 0.4);
    max-width: 500px;
    margin: 0 auto;
}

.no-results i {
    font-size: 4rem;
    color: rgba(45, 27, 78, 0.5);
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.8rem;
    color: #FFFFFF;
    margin-bottom: 15px;
    font-weight: 600;
}

.no-results p {
    color: #D1D5DB;
    margin-bottom: 30px;
    line-height: 1.6;
}

.no-results .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* ============= PRODUCT CARD ENHANCEMENTS ============= */
.all-products .product-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.all-products .product-card:nth-child(1) { animation-delay: 0.1s; }
.all-products .product-card:nth-child(2) { animation-delay: 0.2s; }
.all-products .product-card:nth-child(3) { animation-delay: 0.3s; }
.all-products .product-card:nth-child(4) { animation-delay: 0.4s; }
.all-products .product-card:nth-child(5) { animation-delay: 0.5s; }
.all-products .product-card:nth-child(6) { animation-delay: 0.6s; }
.all-products .product-card:nth-child(7) { animation-delay: 0.7s; }
.all-products .product-card:nth-child(8) { animation-delay: 0.8s; }

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

/* Hide product card when filtered out */
.product-card.hidden {
    display: none;
}

/* ============= RESPONSIVE DESIGN ============= */
@media (max-width: 968px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .all-products .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 640px) {
    .products-header {
        padding: 100px 0 40px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .search-section {
        padding: 30px 0;
    }
    
    .search-box {
        padding: 0 20px;
    }
    
    .search-box input {
        padding: 16px 10px;
        font-size: 0.95rem;
    }
    
    .all-products .products-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .all-products {
        padding: 40px 0 60px;
    }
    
    .no-results {
        padding: 60px 20px;
    }
    
    .no-results i {
        font-size: 3rem;
    }
    
    .no-results h3 {
        font-size: 1.5rem;
    }
}

/* ============= SEARCH HIGHLIGHT ============= */
.highlight {
    background: linear-gradient(135deg, #5E3A7C, #4A2D6E);
    color: #FFFFFF;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* ============= NEON EFFECTS FOR PRODUCTS PAGE ============= */
.clear-btn {
    position: relative;
}

.clear-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #2D1B4E, #5E3A7C);
    border-radius: 50%;
    opacity: 0;
    z-index: -1;
    filter: blur(6px);
    transition: opacity 0.3s ease;
}

.clear-btn:hover::before {
    opacity: 0.6;
}

.clear-btn:hover {
    color: #5E3A7C;
    box-shadow: 0 0 15px rgba(45, 27, 78, 0.5);
}

.search-box:focus-within {
    box-shadow: 0 6px 30px rgba(45, 27, 78, 0.4),
                0 0 20px rgba(45, 27, 78, 0.3);
}

/* ============= LOADING STATE ============= */
.loading {
    text-align: center;
    padding: 40px;
    color: #5E3A7C;
}

.loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ============= PAGINATION ============= */
.pagination-container {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #2D1B4E;
    background: rgba(36, 36, 36, 0.95);
    backdrop-filter: blur(10px);
    color: #5E3A7C;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: #2D1B4E;
    color: #FFFFFF;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(45, 27, 78, 0.5);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 8px;
}

.pagination-number {
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    border-radius: 12px;
    border: 2px solid transparent;
    background: rgba(36, 36, 36, 0.9);
    backdrop-filter: blur(10px);
    color: #D1D5DB;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-number:hover {
    background: rgba(45, 27, 78, 0.2);
    border-color: #2D1B4E;
    color: #5E3A7C;
}

.pagination-number.active {
    background: linear-gradient(135deg, #2D1B4E, #5E3A7C);
    color: #FFFFFF;
    border-color: #2D1B4E;
    box-shadow: 0 4px 15px rgba(45, 27, 78, 0.5);
}

.pagination-info {
    color: #D1D5DB;
    font-size: 0.95rem;
}

.pagination-info span {
    font-weight: 600;
    color: #5E3A7C;
}

@media (max-width: 640px) {
    .pagination-container {
        margin-top: 40px;
    }
    
    .pagination-btn {
        width: 40px;
        height: 40px;
    }
    
    .pagination-number {
        min-width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

