body {
    font-family: 'Vazir', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

.products {
    max-width: 1200px;
    margin: 80px auto 40px;
    padding: 20px;
}

.products h1 {
    text-align: center;
    color: #1a3c34;
    margin-bottom: 30px;
}

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

.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.product-card h2 {
    font-size: 18px;
    color: #1a3c34;
    margin: 0 0 10px;
}

.product-card p {
    font-size: 14px;
    color: #555;
    margin: 0 0 10px;
}

.product-card .price {
    font-size: 16px;
    color: #2c6e49;
    font-weight: bold;
}

.add-to-cart {
    background: #2c6e49;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.add-to-cart:hover {
    background: #3d8b5f;
}

/* استایل‌های مدال سبد خرید */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.cart-content {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.cart-content h2 {
    color: #1a3c34;
    text-align: center;
    margin-bottom: 20px;
}

.cart-items {
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-left: 10px;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-info h3 {
    font-size: 14px;
    color: #1a3c34;
    margin: 0 0 5px;
}

.cart-item-info p {
    font-size: 12px;
    color: #555;
    margin: 0;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    margin: 0 10px;
}

.cart-item-quantity button {
    background: #2c6e49;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.cart-item-quantity button:hover {
    background: #3d8b5f;
}

.cart-item-quantity span {
    margin: 0 10px;
    font-size: 14px;
}

.cart-item-remove {
    background: #d32f2f;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.cart-item-remove:hover {
    background: #b71c1c;
}

.cart-total {
    font-size: 16px;
    color: #2c6e49;
    text-align: left;
    margin: 10px 0;
}

.cart-close, .cart-checkout {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 5px;
}

.cart-close {
    background: #ccc;
    color: #333;
}

.cart-checkout {
    background: #2c6e49;
    color: #fff;
}

.cart-checkout:hover {
    background: #3d8b5f;
}

@media (max-width: 768px) {
    .products {
        margin-top: 60px;
        padding: 15px;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    .product-card {
        padding: 15px;
    }
    .product-card img {
        height: 150px;
    }
    .product-card h2 {
        font-size: 16px;
    }
    .product-card p {
        font-size: 13px;
    }
    .add-to-cart {
        padding: 8px 15px;
    }
    .cart-content {
        width: 95%;
        padding: 15px;
    }
    .cart-item img {
        width: 50px;
        height: 50px;
    }
    .cart-item-info h3 {
        font-size: 13px;
    }
    .cart-item-info p {
        font-size: 11px;
    }
}