/* ========================================
   PRODUCTS - CATEGORY PAGE STYLES
   ======================================== */

/* Category Header */
.category-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 50px 0;
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.category-content {
    position: relative;
    z-index: 2;
}

.category-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.category-description {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Category Stats */
.category-stats {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: -30px auto 40px;
    max-width: 600px;
    position: relative;
    z-index: 3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    text-align: center;
}

.stat-item {
    padding: 15px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 5px;
    display: block;
}

.stat-label {
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Filter Bar */
.filter-bar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

.view-toggle {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: white;
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: #28a745;
    color: white;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-grid.list-view {
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.list-view .product-card {
    display: flex;
    align-items: center;
}

.list-view .product-card:hover {
    transform: none;
}

/* Product Images */
.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.list-view .product-image {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.list-view .product-card:hover .product-image img {
    transform: scale(1.02);
}

/* Product Content */
.product-content {
    padding: 20px;
    flex: 1;
}

.list-view .product-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-info {
    flex: 1;
}

.product-category-badge {
    background: #28a745;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: inline-block;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #333;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: #28a745;
}

.product-brand {
    background: linear-gradient(135deg, #fd7e14, #e55a4e);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 15px;
    display: inline-block;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.2);
    transition: all 0.3s ease;
}

.product-brand:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(253, 126, 20, 0.3);
    background: linear-gradient(135deg, #e55a4e, #fd7e14);
}

.product-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.list-view .product-description {
    margin-bottom: 10px;
    max-width: 400px;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 10px;
}

.list-view .product-actions {
    flex-direction: column;
    width: 120px;
}

.btn-view {
    flex: 1;
    background: #28a745;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    transition: background 0.3s ease;
    font-weight: 500;
}

.btn-view:hover {
    background: #218838;
    color: white;
}

/* No Products State */
.no-products {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 40px 0;
}

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

.no-products h3 {
    color: #333;
    margin-bottom: 15px;
}

.no-products p {
    color: #666;
    margin-bottom: 25px;
}

/* Related Categories */
.related-categories {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 40px;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.category-tag {
    background: #e9ecef;
    color: #495057;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-tag:hover {
    background: #28a745;
    color: white;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 40px;
    text-align: center;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .category-title {
        font-size: 2rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-left {
        justify-content: center;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .list-view .product-card {
        flex-direction: column;
    }

    .list-view .product-image {
        width: 100%;
        height: 200px;
    }

    .list-view .product-content {
        flex-direction: column;
        align-items: stretch;
    }

    .list-view .product-actions {
        width: 100%;
        flex-direction: row;
    }
}
