/* Product Listing Styles */
:root {
    /* Using the same color variables from site.css */
}

/* Main Layout */
.products-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
}

.category-sidebar {
    flex: 0 0 20%;
    margin-bottom: 2rem;
}

.products-main {
    flex: 0 0 78%;
    background-color: var(--gray);
    border-radius: 1rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.05);
}

/* Header Controls (Search and Sort) */
.header-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    background-color: var(--white);
    border-bottom: 3px solid var(--lightest-blue);
}

.search-container {
    position: relative;
    width: 300px;
    display: flex;
    align-items: center;
    flex: 1;
}

.search-container input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border-radius: 2rem;
    border: 1px solid var(--light-blue);
    background-color: var(--white);
    height: 38px; /* Match Bootstrap form-select height */
    transition: all 0.3s ease;
}

.search-container input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 0.2rem rgba(26, 62, 161, 0.2);
    outline: none;
}

.search-container i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--blue);
    z-index: 1;
}

.sort-container {
    display: flex;
    align-items: center;
    white-space: nowrap;
    width: auto;
}

.sort-container label {
    margin-right: 0.5rem;
    margin-bottom: 0;
    color: var(--blue);
    font-weight: 600;
}

.sort-container select {
    border-radius: 2rem;
    border: 1px solid var(--light-blue);
    padding: 0.5rem 2rem 0.5rem 1rem;
    background-color: var(--white);
    color: var(--text-black);
    width: auto;
    transition: all 0.3s ease;
    min-width: 165px;
}

.sort-container select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 0.2rem rgba(26, 62, 161, 0.2);
    outline: none;
}

/* Category List */
.category-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--blue);
    border-bottom: 2px solid var(--light-blue);
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.2rem;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
}

.category-item {
    margin-bottom: 0;
}

.category-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--text-light-black-transparent);
    background-color: var(--white);
    color: var(--text-black);
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.category-btn:hover {
    background-color: var(--lightest-blue);
    color: var(--blue);
    border-color: var(--lightest-blue);
    transform: translateX(5px);
}

.category-btn.active {
    background: linear-gradient(45deg, var(--blue), var(--accent-color));
    color: var(--white);
    border-color: var(--blue);
    box-shadow: 0 4px 10px rgba(26, 62, 161, 0.3);
    transform: translateX(8px);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* Product Card */
.product-item {
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    position: relative;
    border: 1px solid var(--text-light-black-transparent);
    background-color: var(--white);
}

.product-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 2rem rgba(26, 62, 161, 0.15);
    border-color: var(--blue);
}

.product-img-container {
    height: 200px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--text-light-black-transparent);
}

.product-img-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 50%);
    z-index: 1;
}

.product-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-item:hover .product-img-container img {
    transform: scale(1.08);
}

.product-info {
    padding: 1.2rem;
    background-color: var(--white);
    text-align: center;
    position: relative;
}

.product-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-black);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    height: 3rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}

.product-item:hover .product-name {
    color: var(--blue);
}

.product-price {
    font-family: 'Arial Black', sans-serif;
    font-size: 1.5rem;
    color: var(--blue);
    margin-bottom: 0;
    font-weight: bold;
    position: relative;
    display: inline-block;
}

.product-price::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 50%;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
    transform: translateX(-50%);
}

/* No results message */
.no-results {
    text-align: center;
    padding: 3rem;
    font-family: 'Poppins', sans-serif;
    color: var(--text-light-black);
    font-size: 1.5rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 1rem;
    margin-top: 2rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .products-container {
        flex-direction: column;
    }
    
    .category-sidebar {
        flex: 0 0 100%;
        margin-bottom: 1.5rem;
    }
    
    .products-main {
        flex: 0 0 100%;
    }
    
    /* Centered, wrapping categories for small screens */
    .category-list {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding-bottom: 0.5rem;
    }
    
    .category-item {
        flex: 0 0 auto;
        margin: 0 0.5rem 0.75rem 0.5rem;
    }
    
    .category-btn {
        white-space: nowrap;
        padding: 0.6rem 1.2rem;
        text-align: center;
    }
    
    .category-btn.active {
        transform: translateY(-5px);
    }
    
    .category-btn:hover {
        transform: translateY(-3px);
    }
    
    /* Make header controls stay horizontal */
    .header-controls {
        flex-wrap: nowrap;
        justify-content: space-between;
        padding: 0.75rem 1rem;
    }
    
    .sort-container {
        flex-shrink: 0;
        width: auto;
    }
    
    .sort-container label {
        display: none; /* Hide label on smaller screens */
    }
    
    .sort-container select {
        min-width: 140px;
        font-size: 0.9rem;
        padding: 0.5rem 1.5rem 0.5rem 0.8rem;
    }
    
    .search-container {
        width: auto;
        flex: 1;
        margin-left: 0.5rem;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .sort-container select {
        min-width: 120px;
    }
    
    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .sort-container select {
        min-width: 110px;
        font-size: 0.85rem;
    }
    
    .header-controls {
        padding: 0.5rem 0.75rem;
    }
} 