/* Products Page Styles - Harakah Studio */

/* Products Hero */
.products-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 100px 0 60px;
    margin-top: -80px;
    padding-top: 180px;
    text-align: center;
}

.products-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 15px;
}

.products-hero p {
    color: var(--gray);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Products Controls */
.products-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 12px 20px 12px 45px;
    border: 2px solid #ddd;
    border-radius: 50px;
    width: 300px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(254, 194, 0, 0.1);
    outline: none;
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.sort-select {
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.sort-select:focus {
    border-color: var(--primary);
    outline: none;
}

/* Products Section */
.products-section {
    padding: 60px 0 100px;
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.results-count {
    color: var(--secondary);
    font-weight: 600;
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    background: transparent;
    color: var(--secondary);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.view-btn:hover {
    border-color: var(--secondary);
}

.view-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* Products Container */
.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    transition: all 0.3s ease;
}

.products-container.list-view {
    grid-template-columns: 1fr;
}

.products-container.list-view .product-card {
    display: grid;
    grid-template-columns: 250px 1fr;
    align-items: start;
}

@media (max-width: 768px) {
    .products-container.list-view .product-card {
        grid-template-columns: 1fr;
    }
}

/* No Products */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: #f9f9f9;
    border-radius: 15px;
}

.no-products i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.no-products h3 {
    color: var(--secondary);
    margin-bottom: 10px;
}

.no-products p {
    color: var(--gray);
    margin-bottom: 25px;
}

.no-products a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: var(--primary);
    color: var(--secondary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.no-products a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(254, 194, 0, 0.3);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.page-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    background: transparent;
    color: var(--secondary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-btn:hover {
    border-color: var(--secondary);
    background: var(--secondary);
    color: white;
}

.page-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.page-btn.next {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    width: auto;
}

/* Product Card (List View Specific) */
.list-view .product-card {
    min-height: 200px;
}

.list-view .product-image {
    padding-top: 0;
    height: 200px;
}

.list-view .product-info {
    padding: 20px;
}

.list-view .product-name {
    font-size: 1.3rem;
}

.list-view .product-description {
    -webkit-line-clamp: 3;
}

.list-view .product-actions {
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-hero h1 {
        font-size: 2.5rem;
    }
    
    .products-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .search-box input,
    .sort-select {
        width: 100%;
        max-width: 300px;
    }
    
    .results-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .products-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .products-hero h1 {
        font-size: 2rem;
    }
    
    .products-hero p {
        font-size: 1rem;
    }
    
    .products-container {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .page-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .page-btn.next {
        padding: 8px 15px;
    }
}

/* Loading States */
.products-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.products-loading .spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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