/* Main Container */
.products-page-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Vazir', sans-serif;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.page-title {
    font-size: 2.5rem;
    color: #1a202c;
    margin-bottom: 15px;
    font-weight: 800;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layout */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding-bottom: 50px;
}

/* Product Card */
.product-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
    border: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1), 0 10px 20px -5px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e0;
}

/* Image Wrapper */
.product-image-wrapper {
    position: relative;
    height: 240px;
    width: 100%;
    overflow: hidden;
    background: #f7fafc;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* or contain, depending on image aspect ratios */
    object-position: center;
    transition: transform 0.6s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* Badge */
.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: #4a5568;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    backdrop-filter: blur(4px);
    z-index: 2;
    transition: all 0.3s;
}

.product-card:hover .category-badge {
    background: #4299e1;
    color: white;
}

/* Content */
.product-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-excerpt {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Action Area */
.product-footer {
    padding: 20px 25px;
    background: #fcfcfc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.view-details-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3182ce;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.view-details-btn:hover {
    color: #2b6cb0;
    transform: translateX(-4px); /* RTL: moves left */
}

/* Arrow Icon */
.arrow-icon {
    transition: transform 0.2s;
}
.view-details-btn:hover .arrow-icon {
    transform: translateX(-4px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .page-title {
        font-size: 2rem;
    }
}
