/* --- تنظیمات مشترک و متغیرها --- */
:root {
    --primary-color: #2563eb;
    --secondary-color: #f59e0b;
    --dark-color: #1e293b;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-color: #334155;
    --border-color: #e2e8f0;
    --radius: 12px;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Vazirmatn', sans-serif; 
    background-color: var(--light-bg); 
    color: var(--text-color); 
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: 0.3s; 
}

img { 
    display: block; 
    max-width: 100%; 
}

/* --- استایل هدر --- */
.page-header {
    background: linear-gradient(135deg, #00a793 0%, #0d9488 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.breadcrumb-text {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* --- استایل کارت‌های محصول --- */
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f8fafc;
}

.product-img {
    width: 100%;
    height: 260px;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: 50px;
    font-weight: 700;
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.1rem;
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.price {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 12px;
}

.add-btn {
    width: 100%;
    padding: 12px;
    background: var(--dark-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.add-btn:hover {
    background: var(--primary-color);
    transform: scale(1.02);
    color: white;
}

/* --- استایل جستجو و فیلتر --- */
.search-input,
.filter-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    font-family: inherit;
    height: 50px;
}

.search-input:focus,
.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-btn {
    border-radius: 8px;
    background-color: var(--primary-color);
    border: none;
    padding: 0 25px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background-color: #1e40af;
}

/* --- استایل پیج بندی --- */
.pagination .page-link {
    color: var(--dark-color);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 8px;
    margin: 0 3px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    border-radius: 8px;
}

/* --- سایدبار (اختیاری) --- */
.sidebar-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.sidebar-card h5 {
    color: var(--dark-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

/* --- واکنش‌گرایی --- */
@media (max-width: 1200px) {
    .product-img {
        height: 220px;
    }
}

@media (max-width: 992px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .product-img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 40px 0;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .product-img {
        height: 180px;
    }
    
    .search-btn {
        padding: 0 15px;
        height: 45px;
    }
    
    .search-input,
    .filter-select {
        height: 45px;
        padding: 10px 12px;
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .product-img {
        height: 160px;
    }
    
    .product-title {
        font-size: 0.95rem;
    }
    
    .price {
        font-size: 1rem;
    }
    
    .add-btn {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .card-body {
        padding: 15px;
    }
}