﻿/* Page wrapper */
.product-category-page {
    padding: 0;
}

/* Header */
.page-heading.header-text {
    background-color: #f8f9fa;
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
}

/* Filters */
.filters-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem;
    margin: 0 auto 2rem;
    text-align: center;
}

.filters {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0;
}

    .filters li a {
        text-decoration: none;
        color: #333;
        padding: 0.5rem 1.2rem;
        border-radius: 25px;
        transition: all 0.3s ease;
    }

        .filters li a.active,
        .filters li a:hover {
            background-color: #f0c085;
            color: #2c3e50;
        }

/* Products Grid */
.product-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 کارت در دسکتاپ */
    gap: 2rem;
    margin: 3rem 3rem 3rem 3rem; /* فاصله بیشتر از راست و چپ */
}

.product-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    min-height: 450px; /* ارتفاع ثابت برای جلوگیری از بهم ریختن */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }

/* Image */
.product-image {
    position: relative;
    display: block;
}

    .product-image img {
        width: 100%;
        height: 250px;
        object-fit: cover;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
    }

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image:hover .product-overlay {
    opacity: 1;
}

.view-details {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
    text-align: center;
}

/* Info */
.product-info {
    padding: 1rem 1rem 1.2rem;
    text-align: center;
}

.product-title a {
    color: #2c3e50;
    font-weight: bold;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

    .product-title a:hover {
        color: #f0c085;
    }

.product-short-desc {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

/* Price */
.product-price-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    align-items: center;
}

.original-price {
    text-decoration: line-through;
    color: #999;
}

.final-price {
    color: #f0c085;
    font-weight: bold;
}

/* Actions */
.product-actions {
    margin-top: 1rem;
}

.btn-view-details {
    padding: 0.5rem 1rem;
    background-color: #f0c085;
    color: #2c3e50;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

    .btn-view-details:hover {
        background-color: #d3a677;
        color: #2c3e50;
    }

/* Pagination */
.custom-pagination {
    margin-top: 2rem;
}

.pagination-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0;
}

.page-link, .nav-button {
    text-decoration: none;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

    .page-link:hover, .nav-button:hover {
        background-color: #f0c085;
        color: white;
    }

.current-page {
    background-color: #f0c085;
    color: white;
}

/* Responsive */
@media (max-width: 992px) {
    .product-list {
        grid-template-columns: repeat(2, 1fr); /* 2 کارت در تبلت */
        gap: 1.5rem;
        margin: 0 1.5rem 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .product-list {
        grid-template-columns: 1fr; /* 1 کارت در موبایل */
        gap: 1rem;
        margin: 0 1rem 2rem 1rem; /* فاصله سمت راست و چپ */
    }

    .filters-container {
        padding: 0.5rem;
    }

    .btn-view-details {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .product-list {
        grid-template-columns: 1fr; /* یک آیتم در هر ردیف */
        gap: 1rem;
        margin: 1rem; /* فاصله بیشتر از چپ، راست، بالا و پایین */
    }

    .filters-container {
        padding: 0.3rem;
    }

    .page-link, .nav-button {
        padding: 0.3rem 0.6rem;
    }

    .btn-view-details {
        font-size: 0.85rem;
    }
}
